first import

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-08 11:40:19 +02:00
commit 1bc61b12ad
8435 changed files with 1582817 additions and 0 deletions

View File

@@ -0,0 +1,92 @@
/* ============================================================
* bootstrap-dropdown.js v2.0.2
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function( $ ){
"use strict"
/* DROPDOWN CLASS DEFINITION
* ========================= */
var toggle = '[data-toggle="dropdown"]'
, Dropdown = function ( element ) {
var $el = $(element).on('click.dropdown.data-api', this.toggle)
$('html').on('click.dropdown.data-api', function () {
$el.parent().removeClass('open')
})
}
Dropdown.prototype = {
constructor: Dropdown
, toggle: function ( e ) {
var $this = $(this)
, selector = $this.attr('data-target')
, $parent
, isActive
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector)
$parent.length || ($parent = $this.parent())
isActive = $parent.hasClass('open')
clearMenus()
!isActive && $parent.toggleClass('open')
return false
}
}
function clearMenus() {
$(toggle).parent().removeClass('open')
}
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
$.fn.dropdown = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('dropdown')
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.dropdown.Constructor = Dropdown
/* APPLY TO STANDARD DROPDOWN ELEMENTS
* =================================== */
$(function () {
$('html').on('click.dropdown.data-api', clearMenus)
$('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
})
}( window.jQuery );

View File

@@ -0,0 +1,20 @@
Copyright (c) 2012 Davey IJzermans
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,49 @@
# jQuery.popover
Easy to use and customizable popover plugin for jQuery. For a demo and
documentation, visit http://daveyijzermans.nl/jquery/popover/demo.html
## Changelog
### v1.1.2
- Some code style tweaks
- Box shadow in stylesheet
- Moved preventDefault to setTrigger method
### v1.1.1
- Fixed hideAll method
### v1.1.0
- Fixed hideOnHTMLClick on iDevices
### v1.0.9
- Fixed url parameter
### v1.0.8
- Added automatic reposition.
- Changed offset logic, see docs.
### v1.0.7
- Added focus-trigger.
### v1.0.6
- Some z-index tweaks to make the popover appear on top of each other instead of the order they were instantiated.
### v1.0.5
- Added preventChildrenPropagation parameter.
### v1.0.4
- The preventDefault parameter now does what it's supposed to. preventDefault on the element the popover's invoked on instead of the popover itself.
### v1.0.3
- Again some small changes to the hover trigger.
- Hovering the popover now makes it stay.
### v1.0.2
- Added 'anchor' parameter, for attaching the popover to another element
### v1.0.1
- Fixed hover trigger
### v1.0.0
- Initial release

View File

@@ -0,0 +1,121 @@
/**
* CSS reset by Eric Meyer
* http://meyerweb.com/eric/tools/css/reset/
* v2.0 | 20110126
* License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/**
* Demo page styling
*/
body {
margin: 80px 10%;
font-family: Arial;
font-size: 15px;
line-height: 1.3em;
min-width: 1000px;
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 2em;
}
h3 {
font-size: 1.6em;
}
h4 {
font-size: 1.1em;
}
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
margin: 0.7em 0;
}
p {
margin: 1em 0;
}
strong {
font-weight: bold;
}
em {
font-style: italic;
}
ul, ol {
list-style: square;
margin: 0 2em;
}
ul ul, ul ol, ol ul, ol ol {
margin: 0 0 0 1.5em;
}
.sandbox {
margin: 0.7em 0;
padding: 1em;
background: #f9f9f9;
}
code {
font-family: Courier;
background: #f9f9f9;
}
pre {
margin: 1em 0; padding: 1em;
background: #f9f9f9;
overflow: auto;
}
.sandbox, pre {
border-radius: 5px;
}
table, tr, td, th {
border: 1px solid #ddd;
}
th {
background: #f9f9f9;
font-weight: bold;
}
th, td {
padding: 5px;
}

View File

@@ -0,0 +1,2 @@
Aww yeah!
<img src="http://www.myfacewhen.net/uploads/961-aww-yeah.jpg" width="300" />

View File

@@ -0,0 +1,588 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>jQuery.popover demo page</title>
<link rel="stylesheet" href="_page.css" type="text/css" media="screen" />
<link rel="stylesheet" href="popover.css" type="text/css" media="screen" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.popover-1.1.2.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
jQuery(document).ready(function($) {
$("#ex1").popover({
trigger: 'click'
});
$("#ex2").popover({
title: "Hello",
content: "Finally, I can speak!"
});
$("#ex3a").popover({
title: "<_<",
content: "Damn.",
trigger: 'none'
});
$("#ex3b").click(function(event) {
event.preventDefault();
event.stopPropagation();
$("#ex3a").popover('show');
});
$("#bubble_expl").popover({
title: "Bubble up",
content: "When you click a link on a web page, not only do you click that link, you also click it's parent. You clicked this linked, but also it's parent &lt;p&gt;-tag, and it's parent the &lt;body&gt;-tag and, it's parent the &lt;html&gt;-tag. The popover('hide') event is bound to the &lt;html&gt;-element, so this will trigger as well, causing the popover to fade out immediately. By using the stopPropagation() method we prevent this.",
classes: 'large'
});
$("#ex4a").popover({
title: "Guess what this is...",
content: "Pa's wijze lynx bezag vroom het fikse aquaduct.",
trigger: 'none'
});
$("#ex4b").click(function(event) {
event.preventDefault();
event.stopPropagation();
$("#ex4a").popover('show');
});
$("#ex4c").click(function(event) {
event.preventDefault();
event.stopPropagation();
$("#ex4a").popover('hide');
});
$("#ex4d").click(function(event) {
event.preventDefault();
event.stopPropagation();
$("#ex4a").popover('fadeOut');
});
$("#ex4e").click(function(event) {
event.preventDefault();
event.stopPropagation();
$("#ex4a")
.popover('destroy')
.text("Nooo! What have you done?!");
});
$("#ex5a").popover({
title: "Hmm...",
content: "And programming is your friendship!"
});
$("#ex5b, #ex5c").click(function(event) {
event.preventDefault();
event.stopPropagation();
$("#ex5a").popover(
'title',
$(this).text()+" is your friend"
).popover('show');
});
$("#ex6a").popover({
title: "Dynamic content",
content: "At least a popover that makes some sense..."
});
$("#ex6b").click(function(event) {
event.preventDefault();
event.stopPropagation();
$("#ex6a").popover(
'content',
"At least a popover that makes some sense... Don't get used to it."
).popover('show');
});
$("#ex7a").popover({
title: "What's this",
content: "...",
classes: "wider"
});
$("#ex7b").click(function(event) {
event.preventDefault();
event.stopPropagation();
$("#ex7a").popover(
'ajax',
"ajax.html"
).popover('title', "It's AJAX content!").popover('show');
});
/**
* Collapse code blocks
*/
var code_min_height = 150;
$('pre').each(function() {
$this = $(this);
var org_height = $this.height();
var toggld = false;
if(org_height > code_min_height)
$this.height(code_min_height);
$this.bind('click', function() {
$this = $(this);
if(toggld) {
$this.stop(true, true).animate({ height: code_min_height });
toggld = false;
} else {
$this.stop(true, true).animate({ height: org_height });
toggld = true;
}
})
});
/**
* Table of contents
*/
toc_paragraph = function(p) {
var ret = $('<li><a href="'+p.href+'">'+p.title+'</a></li>');
$.each(p.items, function(i, val) {
if(ret.children('ul').length === 0)
ret.append('<ul />');
ret.children('ul').append(toc_paragraph(val));
});
return ret;
}
generate_toc = function() {
var toc = {};
var toc_el = $('#table_of_contents');
$('a[name]').each(function() {
$this = $(this);
var item = {};
var name = $this.attr('name');
var href = "#" + name;
var title = $this.attr('title');
if(typeof title === "undefined")
title = $this.next().text();
item.href = href;
item.title = title;
item.items = {};
var split = $this.attr('name').split('_');
if(split.length > 1)
toc[split[0]].items[name] = item;
else
toc[name] = item;
});
toc_el.empty();
$.each(toc, function(i, val) {
toc_el.append(toc_paragraph(val));
});
}
generate_toc();
});
/* ]]> */
</script>
</head>
<body>
<h1>jQuery.popover</h1>
<p>Easy to use and customizable popover plugin for jQuery.</p>
<p>Take a look at <a href="http://wp.me/p12l3P-gT">this blog post</a> for more details.</p>
<a name="toc"></a>
<h2>Table of Contents</h2>
<ul id="table_of_contents"></ul>
<a name="usage"></a>
<h2>Usage</h2>
<a name="usage_initialization"></a>
<h3>Initialization</h3>
<p>With default settings, calling $(element).popover(); will initalize an empty popover on the element.</p>
<div class="sandbox">
<a href="#" id="ex1">I have a popover, but you can't see me. Yet.</a>
</div>
<p>When you click the link above, the popover is shown. This is achieved by using <code>{ trigger: 'click' }</code> in the parameters. <em>You can hide the popover by clicking anywhere there's not a popover.</em> The source code for the above example is:</p>
<pre><code>$("#ex1").popover({
trigger: 'click'
});</code></pre>
<p>When this code was executed, the popover was created but not shown. A <code>click</code> event was bound to the <code>a</code>-tag with which the popover is &#147;connected&#148;. When that element is clicked, the popover is shown.
<p>But hows an empty popover any fun? Let's try this:</p>
<div class="sandbox">
<a href="#" id="ex2">Please, let me speak!</a>
</div>
<p>Now we've put some content in our popover using the parameters <code>{ title: &quot;Hello&quot;, content: &quot;Finally, I can speak!&quot; }</code>, like so:</p>
<pre><code>$(&quot;#ex2&quot;).popover({
title: &quot;Hello&quot;,
content: &quot;Finally, I can speak!&quot;
});</code></pre>
<p>Note that I've ommited <code>{ trigger: 'click' }</code> in this example. It's the default setting for popovers.</p>
<a name="usage_manual"></a>
<h3>Pulling the trigger manually</h3>
<p>You can show, hide and fade out an initialized popover manually by calling <code>popover('show')</code>, <code>popover('hide')</code> and <code>popover('fadeOut')</code> on the element the popover was initialized over.</p>
<div class="sandbox">
<span id="ex3a">Nope, can't be triggered, bro.</span>
<a href="#" id="ex3b">Oh yes you can!</a>
</div>
<p>The code for this example is as follows. <em>Click a code box to expand it.</em></p>
<pre><code>$(&quot;#ex3a&quot;).popover({
title: &quot;&amp;lt;_&amp;lt;&quot;,
content: &quot;Damn.&quot;,
trigger: 'none'
});
$(&quot;#ex3b&quot;).click(function(event) {
event.preventDefault();
event.stopPropagation();
$(&quot;#ex3a&quot;).popover('show');
});</code></pre>
<p>You must must call <code>event.preventDefault()</code> and <code>event. stopPropagation()</code> on the triggeree (?) / element that triggers the popover, otherwise <code>click</code>-event will <a href="#" id="bubble_expl">bubble up</a> to the document and the popover will immediately be hidden.</p>
<p>You can call <code>popover('fadeOut')</code> and <code>popover('hide')</code> to hide popovers with and without a fade animation.</p>
<a name="usage_hiding"></a>
<h3>Hide and destroy</h3>
<p>Use <code>popover('hide')</code>, <code>popover('fadeOut')</code> and <code>popover('destory')</code> to hide, fade out and destroy popovers. Call these methods on the element where the popover was initialized over.</p>
<div class="sandbox">
<span id="ex4a">I have a popover.</span><br />
<a href="#" id="ex4b">Show</a> | <a href="#" id="ex4c">Hide</a> | <a href="#" id="ex4d">Fade out</a> | <a href="#" id="ex4e">Destroy</a>
</div>
<p>These methods can be seen as the <abbr title="Application Programming Interface">API</abbr> for jQuery.popover. Here the code for this example:</p>
<pre><code>$(&quot;#ex4a&quot;).popover({
title: &quot;Guess what this is...&quot;,
content: &quot;Pa's wijze lynx bezag vroom het fikse aquaduct.&quot;,
trigger: 'none'
});
$(&quot;#ex4b&quot;).click(function(event) {
event.preventDefault();
event.stopPropagation();
$(&quot;#ex4a&quot;).popover('show');
});
$(&quot;#ex4c&quot;).click(function(event) {
event.preventDefault();
event.stopPropagation();
$(&quot;#ex4a&quot;).popover('hide');
});
$(&quot;#ex4d&quot;).click(function(event) {
event.preventDefault();
event.stopPropagation();
$(&quot;#ex4a&quot;).popover('fadeOut');
});
$(&quot;#ex4e&quot;).click(function(event) {
event.preventDefault();
event.stopPropagation();
$(&quot;#ex4a&quot;)
.popover('destroy')
.text(&quot;Nooo! What have you done?!&quot;);
});</code></pre>
<p>It could probably be a bit shorter, but I'll let you figure that out.</p>
<a name="usage_modifying"></a>
<h3>Modifying on the fly</h3>
<a name="usage_modifying_title"></a>
<h4>Title</h4>
<p>You can change the title on the fly with by using <code>popover('title', "Text")</code>.</p>
<div class="sandbox">
<span id="ex5a">PHP or Ruby?</span>
<a href="#" id="ex5b">PHP</a> | <a href="#" id="ex5c">Ruby</a>
</div>
<pre><code>$("#ex5a").popover({
title: "Hmm...",
});
$("#ex5b, #ex5c").click(function(event) {
event.preventDefault();
event.stopPropagation();
$("#ex5a").popover(
'title',
$(this).text()+" is your friend"
).popover('show');
});</code></pre>
<a name="usage_modifying_content"></a>
<h4>Content</h4>
<p>You can change the title on the fly with by using <code>popover('content', "Text")</code>.</p>
<div class="sandbox">
<span id="ex6a">Click here first | </span>
<a href="#" id="ex6b">change content</a>
</div>
<pre><code>$(&quot;#ex6a&quot;).popover({
title: &quot;Dynamic content&quot;,
content: &quot;At least a popover that makes some sense...&quot;
});
$(&quot;#ex6b&quot;).click(function(event) {
event.preventDefault();
event.stopPropagation();
$(&quot;#ex6a&quot;).popover(
'content',
&quot;At least a popover that makes some sense... Don't get used to it.&quot;
).popover('show');
});</code></pre>
<a name="usage_modifying_ajax"></a>
<h4>Loading AJAX content</h4>
<p>You can load a webpage as content via AJAX by using <code>popover('ajax', "http://example.com/" [, options])</code>.</p>
<div class="sandbox">
<span id="ex7a">Click here first | </span>
<a href="#" id="ex7b">load ajax content</a>
</div>
<p>Please note this only works when running on a webserver.</p>
<pre><code>$(&quot;#ex7a&quot;).popover({
title: &quot;What's this&quot;,
content: &quot;...&quot;,
classes: &quot;wider&quot;
});
$(&quot;#ex7b&quot;).click(function(event) {
event.preventDefault();
event.stopPropagation();
$(&quot;#ex7a&quot;).popover(
'ajax',
&quot;ajax.html&quot;
).popover('title', &quot;It's AJAX content!&quot;).popover('show');
});</code></pre>
<p>Alternatively, you can set an URL in the initialization parameters to load an URL immediately on setup, like so:</p>
<pre><code>$(&quot;#selector&quot;).popover({
url: &quot;test.html&quot;
});</code></pre>
<a name="parameters"></a>
<h3>Parameters</h3>
<p>You may've noticed the <code>{ classes: "wider" }</code> parameter in the previous example. The value of the <code>classes</code>-parameter is applied to the popover by jQuery's <code>addClass()</code> method. You can use this to add classes for different sizes of popovers.</p>
<p>There are other parameters you can pass to the <code>popover()</code> method. Following is a list of them.</p>
<table>
<thead>
<tr>
<th>Option</th>
<th>Preffered type</th>
<th>Description</th>
<th>Default</th>
<th>Since</th>
</tr>
</thead>
<tbody>
<tr>
<td>verticalOffset</td>
<td>int</td>
<td><a name="parameters_verticalOffset" title="verticalOffset"></a>Offset the popover by y px vertically (movement depends on position of popover. If <code>position == 'bottom'</code>, positive numbers are down)</td>
<td><code>10</code></td>
<td>v1.0.0</td>
</tr>
<tr>
<td>horizontalOffset</td>
<td>int</td>
<td><a name="parameters_horizontalOffset" title="horizontalOffset"></a>Offset the popover by x px horizontally (movement depends on position of popover. If <code>position == 'right'</code>, positive numbers are right)</td>
<td><code>10</code></td>
<td>v1.0.0</td>
</tr>
<tr>
<td>title</td>
<td>bool|string</td>
<td><a name="parameters_title" title="title"></a>Contents of the heading. Set to false for no title.</td>
<td><code>false</code></td>
<td>v1.0.0</td>
</tr>
<tr>
<td>content</td>
<td>bool|string</td>
<td><a name="parameters_content" title="content"></a>Contents of the body of the popover. Set to false for no body.</td>
<td><code>false</code></td>
<td>v1.0.0</td>
</tr>
<tr>
<td>url</td>
<td>bool|string</td>
<td><a name="parameters_url" title="url"></a>Automatically load an URL into the content field on initialization, if set to an url.</td>
<td><code>false</code></td>
<td>v1.0.0</td>
</tr>
<tr>
<td>classes</td>
<td>string</td>
<td><a name="parameters_classes" title="classes"></a>Add stylesheet classes to the popover box on initalization, for example "large".</td>
<td><code>&quot;&quot;</code></td>
<td>v1.0.0</td>
</tr>
<tr>
<td>position</td>
<td>string</td>
<td><a name="parameters_position" title="position"></a>Determine place of the popover. Set to &quot;auto&quot; for automatic placement. <em>Yet to be implemented</em></td>
<td><code>&quot;auto&quot;</code></td>
<td>1.0.8</td>
</tr>
<tr>
<td>fadeSpeed</td>
<td>int</td>
<td><a name="parameters_fadeSpeed" title="fadeSpeed"></a>How fast to fade this popover out when fading out.</td>
<td><code>160</code></td>
<td>v1.0.0</td>
</tr>
<tr>
<td>trigger</td>
<td>string</td>
<td><a name="parameters_trigger" title="trigger"></a>How to trigger the popover. &quot;click&quot; activates the popover when the linked-to element is clicked, &quot;hover&quot; when it's hovered on, &quot;focus&quot; shows it when focused and hides the popover when unfocused/blurred, and everything else sets it to manual.</td>
<td><code>&quot;click&quot;</code></td>
<td>v1.0.0</td>
</tr>
<tr>
<td>preventDefault</td>
<td>bool</td>
<td><a name="parameters_preventDefault" title="preventDefault"></a>Execute <code>event.preventDefault()</code> method on the element the popover is called on. Set this to false if you want the element (for example an <code>a</code>-element) to still execute code already bound with <code>.click()</code>.</td>
<td><code>true</code></td>
<td>v1.0.0</td>
</tr>
<tr>
<td>stopChildrenPropagation</td>
<td>bool</td>
<td><a name="parameters_stopChildrenPropagation" title="stopChildrenPropagation"></a>Execute <code>event.preventPropagation()</code> method on all children of the popover, so <code>click</code> events won't bubble up and hide the popover.</td>
<td><code>true</code></td>
<td>v1.0.5</td>
</tr>
<tr>
<td>hideOnHTMLClick</td>
<td>bool</td>
<td><a name="parameters_hideOnHTMLClick" title="hideOnHTMLClick"></a>Hide all popovers when clicked outside of them.</td>
<td><code>true</code></td>
<td>v1.0.0</td>
</tr>
<tr>
<td>animateChange</td>
<td>bool</td>
<td><a name="parameters_animateChange" title="animateChange"></a>Animate a popover reposition. <em>Yet to be implemented.</em></td>
<td><code>true</code></td>
<td>-</td>
</tr>
<tr>
<td>autoReposition</td>
<td>bool</td>
<td><a name="parameters_autoReposition" title="autoReposition"></a>Automatically reposition popover on popover change and window resize.</td>
<td><code>true</code></td>
<td>v1.0.8</td>
</tr>
<tr>
<td>anchor</td>
<td>bool|string|jQuery</td>
<td><a name="parameters_anchor" title="anchor"></a>Use this parameter to anchor the popover to a different element than it's invoked on. This is useful when using <code>{ trigger: 'hover' }</code>.</td>
<td><code>false</code></td>
<td>v1.0.2</td>
</tr>
</tbody>
</table>
<a name="parameters_prototype" title="Default prototype"></a>
<p>For convienience, here is this plugin's defaults prototype.</p>
<pre><code>var defaults = {
verticalOffset: 10,
horizontalOffset: 10,
title: false,
content: false,
url: false,
classes: '',
position: 'auto',
fadeSpeed: 160,
trigger: 'click',
preventDefault: true,
stopChildrenPropagation:
hideOnHTMLClick: true,
animateChange: true,
autoReposition: true,
anchor: false: false
}</code></pre>
<a name="methods"></a>
<h3>Methods</h3>
<p>Following is a reference of all methods you can call. Every method returns a jQuery result set, to maintain chainability.</p>
<table>
<thead>
<tr>
<th>Method</th>
<th>Returns</th>
<th>Description</th>
<th>Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td>init</td>
<td>jQuery</td>
<td><a name="methods_init" title="init"></a>(default method) Initializes a popover on elements. Reads defaults (see above), combines them with parameters and makes and links the popover.</td>
<td><code>$("#selector").popover(["init", ] { title: "Test" });</code></td>
</tr>
<tr>
<td>destroy</td>
<td>jQuery</td>
<td><a name="methods_destroy" title="destroy"></a>Removes the linked popover(s) from the DOM, as well as it's data/settings.</td>
<td><code>$("#selector").popover('destroy');</code></td>
</tr>
<tr>
<td>show</td>
<td>jQuery</td>
<td><a name="methods_show" title="show"></a>Show a linked popover, if it exists.</td>
<td><code>$("#selector").popover('show');</code></td>
</tr>
<tr>
<td>hide</td>
<td>jQuery</td>
<td><a name="methods_hide" title="hide"></a>Hide a linked popover, if it exists.</td>
<td><code>$("#selector").popover('hide');</code></td>
</tr>
<tr>
<td>fadeOut</td>
<td>jQuery</td>
<td><a name="methods_fadeOut" title="fadeOut"></a>Fade out a linked popover, if it exists, in as many milliseconds you set the fadeSpeed parameter to on initialization, or how many as you passed to the method.</td>
<td><code>$("#selector").popover('fadeOut' [, 1000]);</code></td>
</tr>
<tr>
<td>hideAll</td>
<td>jQuery</td>
<td><a name="methods_hideAll" title="hideAll"></a>Hide all initialized popovers.</td>
<td><code>$("#selector").popover('hideAll');</code></td>
</tr>
<tr>
<td>fadeOutAll</td>
<td>jQuery</td>
<td><a name="methods_fadeOutAll" title="fadeOutAll"></a>Fade out all initialized popovers. The duration is set by using the parameter <code>fadeSpeed</code> when initiaizing, or passing this to the method.</td>
<td><code>$("#selector").popover('fadeOutAll' [, 1000]);</code></td>
</tr>
<tr>
<td>setTrigger</td>
<td>jQuery</td>
<td><a name="methods_setTrigger" title="setTrigger"></a>Sets a popover's trigger method (see <a href="#parameters_trigger">this</a> for information on triggers). Also unbinds the previous trigger(s).</td>
<td><code>$("#selector").popover('setTrigger', 'hover');</code></td>
</tr>
<tr>
<td>setOption</td>
<td>jQuery</td>
<td><a name="methods_setOption" title="setOption"></a>Sets an option to the specified value.</td>
<td><code>$("#selector").popover('setOption', 'fadeSpeed', 500);</code></td>
</tr>
<tr>
<td>getData</td>
<td>mixed</td>
<td><a name="methods_getData" title="getData"></a>Get a popover's data. If multiple elements are targeted, the function returns an array of objects.</td>
<td><code>$("#selector").popover('getData');</code></td>
</tr>
</tbody>
</table>
<a name="download"></a>
<h3>Download</h3>
<p>You can download jQuery.popover by cloning it from Github:</p>
<p><code>git clone git@github.com:klaas4/jQuery.popover.git</code></p>
<p>Or simply download the <a href="https://github.com/klaas4/jQuery.popover/zipball/master">zip-package</a>.</p>
<p>Please also check out my blog at <a href="http://daveyyzermans.nl/">http://daveyyzermans.nl/</a>, and if you want, shoot me an e-mail.</p>
</body>
</html>

View File

@@ -0,0 +1,539 @@
/**
* jQuery.popover plugin v1.1.2
* By Davey IJzermans
* See http://wp.me/p12l3P-gT for details
* http://daveyyzermans.nl/
*
* Released under MIT License.
*/
;(function($) {
//define some default plugin options
var defaults = {
verticalOffset: 10, //offset the popover by y px vertically (movement depends on position of popover. If position == 'bottom', positive numbers are down)
horizontalOffset: 10, //offset the popover by x px horizontally (movement depends on position of popover. If position == 'right', positive numbers are right)
title: false, //heading, false for none
content: false, //content of the popover
url: false, //set to an url to load content via ajax
classes: '', //classes to give the popover, i.e. normal, wider or large
position: 'auto', //where should the popover be placed? Auto, top, right, bottom, left or absolute (i.e. { top: 4 }, { left: 4 })
fadeSpeed: 160, //how fast to fade out popovers when destroying or hiding
trigger: 'click', //how to trigger the popover: click, hover or manual
preventDefault: true, //preventDefault actions on the element on which the popover is called
stopChildrenPropagation: true, //prevent propagation on popover children
hideOnHTMLClick: true, //hides the popover when clicked outside of it
animateChange: true, //animate a popover reposition
autoReposition: true, //automatically reposition popover on popover change and window resize
anchor: false //anchor the popover to a different element
}
var popovers = [];
var _ = {
calc_position: function(popover, position) {
var data = popover.popover("getData");
var options = data.options;
var $anchor = options.anchor ? $(options.anchor) : popover;
var el = data.popover;
var coordinates = $anchor.offset();
var y1, x1;
if (position == 'top') {
y1 = coordinates.top - el.outerHeight();
x1 = coordinates.left - el.outerWidth() / 2 + $anchor.outerWidth() / 2;
} else if (position == 'right') {
y1 = coordinates.top + $anchor.outerHeight() / 2 - el.outerHeight() / 2;
x1 = coordinates.left + $anchor.outerWidth();
} else if (position == 'left') {
y1 = coordinates.top + $anchor.outerHeight() / 2 - el.outerHeight() / 2;
x1 = coordinates.left - el.outerWidth();
} else {
//bottom
y1 = coordinates.top + $anchor.outerHeight();
x1 = coordinates.left - el.outerWidth() / 2 + $anchor.outerWidth() / 2;
}
x2 = x1 + el.outerWidth();
y2 = y1 + el.outerHeight();
ret = {
x1: x1,
x2: x2,
y1: y1,
y2: y2
};
return ret;
},
pop_position_class: function(popover, position) {
var remove = "popover-top popover-right popover-left";
var arrow = "top-arrow"
var arrow_remove = "right-arrow bottom-arrow left-arrow";
if (position == 'top') {
remove = "popover-right popover-bottom popover-left";
arrow = 'bottom-arrow';
arrow_remove = "top-arrow right-arrow left-arrow";
} else if (position == 'right') {
remove = "popover-yop popover-bottom popover-left";
arrow = 'left-arrow';
arrow_remove = "top-arrow right-arrow bottom-arrow";
} else if (position == 'left') {
remove = "popover-top popover-right popover-bottom";
arrow = 'right-arrow';
arrow_remove = "top-arrow bottom-arrow left-arrow";
}
popover
.removeClass(remove)
.addClass('popover-' + position)
.find('.arrow')
.removeClass(arrow_remove)
.addClass(arrow);
}
};
var methods = {
/**
* Initialization method
* Merges parameters with defaults, makes the popover and saves data
*
* @param object
* @return jQuery
*/
init : function(params) {
return this.each(function() {
var options = $.extend({}, defaults, params);
var $this = $(this);
var data = $this.popover('getData');
if ( ! data) {
var popover = $('<div class="popover" />')
.addClass(options.classes)
.append('<div class="arrow" />')
.append('<div class="wrap"></div>')
.appendTo('body')
.hide();
if (options.stopChildrenPropagation) {
popover.children().bind('click.popover', function(event) {
event.stopPropagation();
});
}
if (options.anchor) {
if ( ! options.anchor instanceof jQuery) {
options.anchor = $(options.anchor);
}
}
var data = {
target: $this,
popover: popover,
options: options
};
if (options.title) {
$('<div class="title" />')
.html(options.title instanceof jQuery ? options.title.html() : options.title)
.appendTo(popover.find('.wrap'));
}
if (options.content) {
$('<div class="content" />')
.html(options.content instanceof jQuery ? options.content.html() : options.content)
.appendTo(popover.find('.wrap'));
}
$this.data('popover', data);
popovers.push($this);
if (options.url) {
$this.popover('ajax', options.url);
}
$this.popover('reposition');
$this.popover('setTrigger', options.trigger);
if (options.hideOnHTMLClick) {
var hideEvent = "click.popover";
if ("ontouchstart" in document.documentElement)
hideEvent = 'touchstart.popover';
$('html').unbind(hideEvent).bind(hideEvent, function(event) {
$('html').popover('fadeOutAll');
});
}
if (options.autoReposition) {
var repos_function = function(event) {
$this.popover('reposition');
};
$(window)
.unbind('resize.popover').bind('resize.popover', repos_function)
.unbind('scroll.popover').bind('scroll.popover', repos_function);
}
}
});
},
/**
* Reposition the popover
*
* @return jQuery
*/
reposition: function() {
return this.each(function() {
var $this = $(this);
var data = $this.popover('getData');
if (data) {
var popover = data.popover;
var options = data.options;
var $anchor = options.anchor ? $(options.anchor) : $this;
var coordinates = $anchor.offset();
var position = options.position;
if ( ! (position == 'top' || position == 'right' || position == 'left' || position == 'auto')) {
position = 'bottom';
}
var calc;
if (position == 'auto') {
var positions = ["bottom", "left", "top", "right"];
var scrollTop = $(window).scrollTop();
var scrollLeft = $(window).scrollLeft();
var windowHeight = $(window).outerHeight();
var windowWidth = $(window).outerWidth();
$.each (positions, function(i, pos) {
calc = _.calc_position($this, pos);
var x1 = calc.x1 - scrollLeft;
var x2 = calc.x2 - scrollLeft + options.horizontalOffset;
var y1 = calc.y1 - scrollTop;
var y2 = calc.y2 - scrollTop + options.verticalOffset;
if (x1 < 0 || x2 < 0 || y1 < 0 || y2 < 0)
//popover is left off of the screen or above it
return true; //continue
if (y2 > windowHeight)
//popover is under the window viewport
return true; //continue
if (x2 > windowWidth)
//popover is right off of the screen
return true; //continue
position = pos;
return false;
});
if (position == 'auto') {
//position is still auto
return;
}
}
calc = _.calc_position($this, position);
var top = calc.top;
var left = calc.left;
_.pop_position_class(popover, position);
var marginTop = 0;
var marginLeft = 0;
if (position == 'bottom') {
marginTop = options.verticalOffset;
}
if (position == 'top') {
marginTop = -options.verticalOffset;
}
if (position == 'right') {
marginLeft = options.horizontalOffset;
}
if (position == 'left') {
marginLeft = -options.horizontalOffset;
}
var css = {
left: calc.x1,
top: calc.y1,
marginTop: marginTop,
marginLeft: marginLeft
};
if (data.initd && options.animateChange) {
popover.css(css);
} else {
data.initd = true;
popover.css(css);
}
$this.data('popover', data);
}
});
},
/**
* Remove a popover from the DOM and clean up data associated with it.
*
* @return jQuery
*/
destroy: function() {
return this.each(function() {
var $this = $(this);
var data = $this.popover('getData');
$this.unbind('.popover');
$(window).unbind('.popover');
data.popover.remove();
$this.removeData('popover');
});
},
/**
* Show the popover
*
* @return jQuery
*/
show: function() {
return this.each(function() {
var $this = $(this);
var data = $this.popover('getData');
if (data) {
var popover = data.popover;
$this.popover('reposition');
popover.clearQueue().css({ zIndex: 950 }).show();
}
});
},
/**
* Hide the popover
*
* @return jQuery
*/
hide: function() {
return this.each(function() {
var $this = $(this);
var data = $this.popover('getData');
if (data) {
data.popover.hide().css({ zIndex: 949 });
}
});
},
/**
* Fade out the popover
*
* @return jQuery
*/
fadeOut: function(ms) {
return this.each(function() {
var $this = $(this);
var data = $this.popover('getData');
if (data) {
var popover = data.popover;
var options = data.options;
popover.delay(100).css({ zIndex: 949 }).fadeOut(ms ? ms : options.fadeSpeed);
}
});
},
/**
* Hide all popovers
*
* @return jQuery
*/
hideAll: function() {
return $.each (popovers, function(i, pop) {
var $this = $(this);
var data = $this.popover('getData');
if (data) {
var popover = data.popover;
popover.hide();
}
});
},
/**
* Fade out all popovers
*
* @param int
* @return jQuery
*/
fadeOutAll: function(ms) {
return $.each (popovers, function(i, pop) {
var $this = $(this);
var data = $this.popover('getData');
if (data) {
var popover = data.popover;
var options = data.options;
popover.css({ zIndex: 949 }).fadeOut(ms ? ms : options.fadeSpeed);
}
});
},
/**
* Set the event trigger for the popover. Also cleans the previous binding.
*
* @param string
* @return jQuery
*/
setTrigger: function(trigger) {
return this.each(function() {
var $this = $(this);
var data = $this.popover('getData');
if (data) {
var popover = data.popover;
var options = data.options;
var $anchor = options.anchor ? $(options.anchor) : $this;
if (trigger === 'click') {
$anchor.unbind('click.popover').bind('click.popover', function(event) {
if (options.preventDefault) {
event.preventDefault();
}
event.stopPropagation();
$this.popover('show');
});
popover.unbind('click.popover').bind('click.popover', function(event) {
event.stopPropagation();
});
} else {
$anchor.unbind('click.popover');
popover.unbind('click.popover')
}
if (trigger === 'hover') {
$anchor.add(popover).bind('mousemove.popover', function(event) {
$this.popover('show');
});
$anchor.add(popover).bind('mouseleave.popover', function(event) {
$this.popover('fadeOut');
});
} else {
$anchor.add(popover).unbind('mousemove.popover').unbind('mouseleave.popover');
}
if (trigger === 'focus') {
$anchor.add(popover).bind('focus.popover', function(event) {
$this.popover('show');
});
$anchor.add(popover).bind('blur.popover', function(event) {
$this.popover('fadeOut');
});
$anchor.bind('click.popover', function(event) {
event.stopPropagation();
});
} else {
$anchor.add(popover).unbind('focus.popover').unbind('blur.popover').unbind('click.popover');
}
}
});
},
/**
* Rename the popover's title
*
* @param string
* @return jQuery
*/
title: function(text) {
return this.each(function() {
var $this = $(this);
var data = $this.popover('getData');
if (data) {
var title = data.popover.find('.title');
var wrap = data.popover.find('.wrap');
if (title.length === 0) {
title = $('<div class="title" />').appendTo(wrap);
}
title.html(text);
}
});
},
/**
* Set the popover's content
*
* @param html
* @return jQuery
*/
content: function(html) {
return this.each(function() {
var $this = $(this);
var data = $this.popover('getData');
if (data) {
var content = data.popover.find('.content');
var wrap = data.popover.find('.wrap');
if (content.length === 0) {
content = $('<div class="content" />').appendTo(wrap);
}
content.html(html);
}
});
},
/**
* Read content with AJAX and set popover's content.
*
* @param string
* @param object
* @return jQuery
*/
ajax: function(url, ajax_params) {
return this.each(function() {
var $this = $(this);
var data = $this.popover('getData');
if (data) {
var ajax_defaults = {
url: url,
success: function(ajax_data) {
var content = data.popover.find('.content');
var wrap = data.popover.find('.wrap');
if (content.length === 0) {
content = $('<div class="content" />').appendTo(wrap);
}
content.html(ajax_data);
}
}
var ajax_options = $.extend({}, ajax_defaults, ajax_params);
$.ajax(ajax_options);
}
});
},
setOption: function(option, value) {
return this.each(function() {
var $this = $(this);
var data = $this.popover('getData');
if (data) {
data.options[option] = value;
$this.data('popover', data);
}
});
},
getData: function() {
var ret = [];
this.each(function() {
var $this = $(this);
var data = $this.data('popover');
if (data) ret.push(data);
});
if (ret.length == 0) {
return;
}
if (ret.length == 1) {
ret = ret[0];
}
return ret;
}
};
$.fn.popover = function(method) {
if (methods[method]) {
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
} else if ( typeof method === 'object' || !method) {
return methods.init.apply(this, arguments);
} else {
$.error('Method ' + method + ' does not exist on jQuery.popover');
}
}
})(jQuery);

View File

@@ -0,0 +1,77 @@
/**
* jQuery.popover example stylesheet.
* By Davey IJzermans
* http://daveyyzermans.nl
*
* License: public domain
*/
.popover {
position: absolute;
top: 0; left: 0;
max-height: 240px;
width: 220px;
display: none;
-webkit-box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.1);
}
.popover.wider {
width: 340px;
}
.popover.large {
width: 470px;
max-height: 350px;
}
.popover .arrow, .popover .top-arrow {
position: absolute;
top: 0; left: 50%;
margin: -10px 0 0 -3px;
width: 0; height: 0;
border-top: 5px solid transparent;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid #121212;
}
.popover .bottom-arrow {
top: 100%; left: 50%;
margin: 0 0 0 -3px;
border-top: 5px solid #121212;
border-bottom: 5px solid transparent;
}
.popover .left-arrow {
top: 50%; left: -10px;
margin: -3px 0 0;
border-right: 5px solid #121212;
border-bottom: 5px solid transparent;
}
.popover .right-arrow {
top: 50%; left: 100%;
margin: -3px 0 0;
border-left: 5px solid #121212;
border-bottom: 5px solid transparent;
}
.popover .wrap {
background: white;
border: 3px solid #121212;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
}
.popover .title {
background: #121212 url(popover_gradient.png) repeat-x;
color: white;
font-size: 1.3em;
text-align: center;
padding: 8px 0 0 0;
height: 27px;
}
.popover .content {
padding: 15px;
max-height: 175px;
overflow: auto;
line-height: 1.3em;
font-size: 0.9em;
}
.popover.large .content {
max-height: 285px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,130 @@
# FlexSlider 2
http://www.woothemes.com/flexslider/ - Copyright (c) 2012 WooThemes
Documentation guides for properties and theming are coming soon. Shortly thereafter, the download builder will be released, where you can create minified FlexSlider scripts that contain only the properties you need. It's a brave new world.
## General Notes
FlexSlider is no longer licensed under the MIT license. FlexSlider now shares the common licensed used for all WooThemes themes, GPLv2.
In an effort to move the plugin forward, support for jQuery 1.3.2 has been dropped. The plugin now requires jQuery 1.4.2+. If you don't have access to the later versions of jQuery, [FlexSlider 1.8](https://github.com/woothemes/FlexSlider/tree/flexslider1) should be a perfectly suitable substitute for your needs!
Your old styles and properties *might not work out of the box*. Some property names have been changed, noted below, as well as namespacing prefixes being applied to all elements. This means that `.flex-direction-nav .next` is now `.flex-direction-nav .flex-next` by default. The namespacing property is exposed, free for you to change.
## Updates
No more overflow hidden woes! The plugin now generates a viewport element to handle the tedious task of working around overflow hidden. Yay!
The slider element is now accessible outside of the callback API via the jQuery .data() method. Example use: `$('#slider').data('flexslider')`
Helper strings have been added for performing actions quickly on FlexSlider elements. Example uses:
- `$('#slider').flexslider("play") //Play slideshow`
- `$('#slider').flexslider("pause") //Pause slideshow`
- `$('#slider').flexslider("next") //Go to next slide`
- `$('#slider').flexslider("prev") //Go to previous slide`
- `$('#slider').flexslider(3) //Go fourth slide`
Two new methods are available for adding/removing slides, `slider.addSlide()` and `slider.removeSlide()`. More details about this coming soon.
- `slider.addSlide(obj, pos)` accepts two parameters, a string/jQuery object and an index.
- `slider.removeSlide(obj)` accepts one parameter, either an object to be removed, or an index.
## Examples
- [Basic Slider](http://flexslider.woothemes.com/)
- [Slider w/thumbnail controlNav pattern](http://flexslider.woothemes.com/thumbnail-controlnav.html)
- [Slider w/thumbnail slider](http://flexslider.woothemes.com/thumbnail-slider.html)
- [Basic Carousel](http://flexslider.woothemes.com/basic-carousel.html)
- [Carousel with min and max ranges](http://flexslider.woothemes.com/carousel-min-max.html)
- [Video with Vimeo API](http://flexslider.woothemes.com/video.html)
## Properties
### namespace: *{new}*
`namespace` controls the prefixes attached to elements created by the plugin. In previous releases, only certain elements were tagged with a prefix class, which was causing class generalization issues for some users. FlexSlider now prefixes all generated elements with the appropriate namespace.
*Hint: `namespace` can be an empty string.*
### selector: *{new}*
The markup structure for FlexSlider has been limited to a "ul.slide li" pattern in previous versions of FlexSlider; no longer. You can now take full control of the markup structure used for your FlexSlider. The `selector` pattern "{container} > {slide}" is mandatory, allowing the plugin to predictably interpret the selector property. Omitting the ">" from the selector is not suggested, but is possible if your markup doesn't follow the immediate descendant pattern.
*Examples: "section > article", ".slides > .slide", "#hero .slide"*
### easing: *{new}*
`easing` allows support for jQuery easing! Default options provided by jQuery are "swing" and "linear," but more can be used by included the jQuery Easing plugin. *If you chose a non-existent easing method, the slider will break.*
*Note: You need to set `useCCS: false` to force transitions in browsers that support translate3d.*
*Optional: [jQuery Easing Plugin](http://gsgd.co.uk/sandbox/jquery/easing/)*
### direction: *{changed}*
Previously called "slideDirection" in v1.8 and below.
### reverse: *{new}*
`reverse` will reverse the animation direction of the slider. Meaning, horizontal sliders can move from right to left, and vertical sliders can move bottom to top.
### smoothHeight: *{new}*
`smoothHeight` allows for smooth height transitions between slides. This property currently works for the fade and horizontal slide animation. The property has no effect on horizontal sliding carousels, however.
### startAt: *{changed}*
Previously called "slideToStart" in v1.8 and below.
### animationSpeed: *{changed}*
Previously called "animationDuration" in v1.8 and below.
### initDelay: *{new}*
`initDelay` will delay the initial slideshow of a slider, given in milliseconds. The slider will still initialize, generating controls and displaying the first image, but the slideshow will wait until the `initDelay` time has completed before starting the slideshow.
### useCSS: *{new}*
`useCSS` allow users to override using CSS3 for animation. Translate3d still has numerous bugs that can crop up and wreak havoc, so this is a great property to play with if you are experiencing unexplainable issues in Webkit browsers.
*Hint: Use conditionals to enable/disable the use of CSS3 on desktops and mobile devices. Mobile devices, in my experience, do not share many of the translate3d bugs seen on desktop browsers.*
### touch: *{new}*
`touch` allows users to exclude touch swipe functionality from their sliders.
### keyboard: *{changed}*
Previously called "keyboardNav" in v1.8 and below.
### multipleKeyboard *{new}*
`multipleKeyboard` allows users to override the default plugin keyboard behavior, enabling keyboard control of more than one slider on the page. This means that all visible sliders will animate, at the same time, via keyboard input.
*Hint: You can use `multipleKeyboard` to allow keyboard navigation on pages where multiple sliders are present, but only one is visible.*
### mousewheel: *{updated}*
`mousewheel` now requires the jQuery Mousewheel plugin. There are a few reasons for this, but primarily because there is no need for FlexSlider itself to reinvent the awkward complexity of mousewheel interactivity that is handled perfectly by the Mousewheel plugin.
*Required: [jQuery Mousewheel Plugin](https://github.com/brandonaaron/jquery-mousewheel)*
### controlsContainer: *{updated}*
`controlsContainer` is one of the more painstaking, potentially confusing properties within FlexSlider. First, the property is no longer required to workaround `overflow: hidden` on slide animation. Second, the property now accepts a **jQuery object**, giving you precise control over the object you want. The plugin no longer attempts to guess what element you are selecting.
### sync: *{new}*
`sync` is a new property that will allow other slider(s) to hook into the current slider via a given selector. The selector should describe an object that has already been initialized as a FlexSlider. Right now, `sync` will synchronize animation, play, and pause behaviors. More behaviors can be added in the future as the property matures.
*[Example of sync being used](http://flex.madebymufffin.com/examples/basic-carousel.html)*
### asNavFor: *{new}*
Description to be added.
### itemWidth: *{new}*
`itemWidth` is the primary property for the new carousel options. Without this property, your slider is not considered a carousel. To use `itemWidth`, give an integer value of the width of your individual slides. This should include borders and paddings applied to your slides; a total width measurement.
### itemMargin: *{new}*
`itemMargin` describes the gutter between the slide elements. If each slide has a margin-left of 10px, your itemMargin value would be 10. If elements have margin: 0 10px, your itemMargin would be 20.
### minItems: *{new}*
`minItems` describes the minimum number of slide elements that should be visible in the carousel. When the slider reaches the minimum item count, the slides will resize fluidly with the slider.
### maxItems: *{new}*
`maxItems` describes the maximum number of slide elements that should be visible in the carousel. When the slider reaches the maximum item count, the slides will resize fluidly with the sider.
### move: *{new}*
`move` determines how many slides should be animated within the carousel. When left at 0, the slider will animate the number of visible slides. If any value greater than 0 is given, the slider will animate that number of slides in the carousel on each animation interval.
*Hint: The move property will be ignored if the value is higher than the number of visible slides, which can be utilized in responsive design.*
### added: *{new}*
`added()` is a new callback event fired in the new slider.addSlide() function.
### removed: *{new}*
`removed()` is a new callback event fired in the new slider.removeSlide() function.

View File

@@ -0,0 +1,91 @@
/*
* jQuery FlexSlider v2.0
* http://www.woothemes.com/flexslider/
*
* Copyright 2012 WooThemes
* Free to use under the GPLv2 license.
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Contributing author: Tyler Smith (@mbmufffin)
*/
/* Browser Resets */
.flex-container a:active,
.flexslider a:active,
.flex-container a:focus,
.flexslider a:focus {outline: none;}
.slides,
.flex-control-nav,
.flex-direction-nav {margin: 0; padding: 0; list-style: none;}
/* FlexSlider Necessary Styles
*********************************/
.flexslider {margin: 0; padding: 0;}
.flexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
.flexslider .slides img {width: 100%; display: block;}
.flex-pauseplay span {text-transform: capitalize;}
/* Clearfix for the .slides element */
.slides:after {content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
html[xmlns] .slides {display: block;}
* html .slides {height: 1%;}
/* No JavaScript Fallback */
/* If you are not using another script, such as Modernizr, make sure you
* include js that eliminates this class on page load */
.no-js .slides > li:first-child {display: block;}
/* FlexSlider Default Theme
*********************************/
/*.flexslider {margin: 0 0 60px; background: #fff; border: 4px solid #fff; position: relative; -webkit-border-radius: 4px; -moz-border-radius: 4px; -o-border-radius: 4px; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.2); -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.2); -moz-box-shadow: 0 1px 4px rgba(0,0,0,.2); -o-box-shadow: 0 1px 4px rgba(0,0,0,.2); zoom: 1;}*/
.flexslider {
margin: 0 0 60px;
background: #fff;
/*border: 4px solid #fff;*/
position: relative;
/*-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
box-shadow: 0 1px 4px rgba(0,0,0,.2);
-webkit-box-shadow: 0 1px 4px rgba(0,0,0,.2);
-moz-box-shadow: 0 1px 4px rgba(0,0,0,.2);
-o-box-shadow: 0 1px 4px rgba(0,0,0,.2);*/
zoom: 1;
}
.flex-viewport {max-height: 2000px; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; transition: all 1s ease;}
.loading .flex-viewport {max-height: 300px;}
.flexslider .slides {zoom: 1;}
.carousel li {margin-right: 5px}
/* Direction Nav */
.flex-direction-nav {*height: 0;}
.flex-direction-nav a {width: 30px; height: 30px; margin: -20px 0 0; display: block; background: url(images/bg_direction_nav.png) no-repeat 0 0; position: absolute; top: 50%; z-index: 10; cursor: pointer; text-indent: -9999px; opacity: 0; -webkit-transition: all .3s ease;}
.flex-direction-nav .flex-next {background-position: 100% 0; right: -36px; }
.flex-direction-nav .flex-prev {left: -36px;}
.flexslider:hover .flex-next {opacity: 0.8; right: 5px;}
.flexslider:hover .flex-prev {opacity: 0.8; left: 5px;}
.flexslider:hover .flex-next:hover, .flexslider:hover .flex-prev:hover {opacity: 1;}
.flex-direction-nav .flex-disabled {opacity: .3!important; filter:alpha(opacity=30); cursor: default;}
/* Control Nav */
.flex-control-nav {width: 100%; position: absolute; bottom: -40px; text-align: center;}
.flex-control-nav li {margin: 0 6px; display: inline-block; zoom: 1; *display: inline;}
.flex-control-paging li a {width: 11px; height: 11px; display: block; background: #666; background: rgba(0,0,0,0.5); cursor: pointer; text-indent: -9999px; -webkit-border-radius: 20px; -moz-border-radius: 20px; -o-border-radius: 20px; border-radius: 20px; box-shadow: inset 0 0 3px rgba(0,0,0,0.3);}
.flex-control-paging li a:hover { background: #333; background: rgba(0,0,0,0.7); }
.flex-control-paging li a.flex-active { background: #000; background: rgba(0,0,0,0.9); cursor: default; }
.flex-control-thumbs {margin: 5px 0 0; position: static; overflow: hidden;}
.flex-control-thumbs li {width: 25%; float: left; margin: 0;}
.flex-control-thumbs img {width: 100%; display: block; opacity: .7; cursor: pointer;}
.flex-control-thumbs img:hover {opacity: 1;}
.flex-control-thumbs .flex-active {opacity: 1; cursor: default;}
@media screen and (max-width: 860px) {
.flex-direction-nav .flex-prev {opacity: 1; left: 0;}
.flex-direction-nav .flex-next {opacity: 1; right: 0;}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,38 @@
/*
* jQuery FlexSlider v2.1
* Copyright 2012 WooThemes
* Contributing Author: Tyler Smith
*/
;(function(d){d.flexslider=function(i,k){var a=d(i),c=d.extend({},d.flexslider.defaults,k),e=c.namespace,p="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,t=p?"touchend":"click",l="vertical"===c.direction,m=c.reverse,h=0<c.itemWidth,r="fade"===c.animation,s=""!==c.asNavFor,f={};d.data(i,"flexslider",a);f={init:function(){a.animating=!1;a.currentSlide=c.startAt;a.animatingTo=a.currentSlide;a.atEnd=0===a.currentSlide||a.currentSlide===a.last;a.containerSelector=c.selector.substr(0,
c.selector.search(" "));a.slides=d(c.selector,a);a.container=d(a.containerSelector,a);a.count=a.slides.length;a.syncExists=0<d(c.sync).length;"slide"===c.animation&&(c.animation="swing");a.prop=l?"top":"marginLeft";a.args={};a.manualPause=!1;var b=a,g;if(g=!c.video)if(g=!r)if(g=c.useCSS)a:{g=document.createElement("div");var n=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"],e;for(e in n)if(void 0!==g.style[n[e]]){a.pfx=n[e].replace("Perspective","").toLowerCase();
a.prop="-"+a.pfx+"-transform";g=!0;break a}g=!1}b.transitions=g;""!==c.controlsContainer&&(a.controlsContainer=0<d(c.controlsContainer).length&&d(c.controlsContainer));""!==c.manualControls&&(a.manualControls=0<d(c.manualControls).length&&d(c.manualControls));c.randomize&&(a.slides.sort(function(){return Math.round(Math.random())-0.5}),a.container.empty().append(a.slides));a.doMath();s&&f.asNav.setup();a.setup("init");c.controlNav&&f.controlNav.setup();c.directionNav&&f.directionNav.setup();c.keyboard&&
(1===d(a.containerSelector).length||c.multipleKeyboard)&&d(document).bind("keyup",function(b){b=b.keyCode;if(!a.animating&&(39===b||37===b))b=39===b?a.getTarget("next"):37===b?a.getTarget("prev"):!1,a.flexAnimate(b,c.pauseOnAction)});c.mousewheel&&a.bind("mousewheel",function(b,g){b.preventDefault();var d=0>g?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(d,c.pauseOnAction)});c.pausePlay&&f.pausePlay.setup();c.slideshow&&(c.pauseOnHover&&a.hover(function(){!a.manualPlay&&!a.manualPause&&a.pause()},
function(){!a.manualPause&&!a.manualPlay&&a.play()}),0<c.initDelay?setTimeout(a.play,c.initDelay):a.play());p&&c.touch&&f.touch();(!r||r&&c.smoothHeight)&&d(window).bind("resize focus",f.resize);setTimeout(function(){c.start(a)},200)},asNav:{setup:function(){a.asNav=!0;a.animatingTo=Math.floor(a.currentSlide/a.move);a.currentItem=a.currentSlide;a.slides.removeClass(e+"active-slide").eq(a.currentItem).addClass(e+"active-slide");a.slides.click(function(b){b.preventDefault();var b=d(this),g=b.index();
!d(c.asNavFor).data("flexslider").animating&&!b.hasClass("active")&&(a.direction=a.currentItem<g?"next":"prev",a.flexAnimate(g,c.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){a.manualControls?f.controlNav.setupManual():f.controlNav.setupPaging()},setupPaging:function(){var b=1,g;a.controlNavScaffold=d('<ol class="'+e+"control-nav "+e+("thumbnails"===c.controlNav?"control-thumbs":"control-paging")+'"></ol>');if(1<a.pagingCount)for(var n=0;n<a.pagingCount;n++)g="thumbnails"===c.controlNav?
'<img src="'+a.slides.eq(n).attr("data-thumb")+'"/>':"<a>"+b+"</a>",a.controlNavScaffold.append("<li>"+g+"</li>"),b++;a.controlsContainer?d(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold);f.controlNav.set();f.controlNav.active();a.controlNavScaffold.delegate("a, img",t,function(b){b.preventDefault();var b=d(this),g=a.controlNav.index(b);b.hasClass(e+"active")||(a.direction=g>a.currentSlide?"next":"prev",a.flexAnimate(g,c.pauseOnAction))});p&&a.controlNavScaffold.delegate("a",
"click touchstart",function(a){a.preventDefault()})},setupManual:function(){a.controlNav=a.manualControls;f.controlNav.active();a.controlNav.live(t,function(b){b.preventDefault();var b=d(this),g=a.controlNav.index(b);b.hasClass(e+"active")||(g>a.currentSlide?a.direction="next":a.direction="prev",a.flexAnimate(g,c.pauseOnAction))});p&&a.controlNav.live("click touchstart",function(a){a.preventDefault()})},set:function(){a.controlNav=d("."+e+"control-nav li "+("thumbnails"===c.controlNav?"img":"a"),
a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(e+"active").eq(a.animatingTo).addClass(e+"active")},update:function(b,c){1<a.pagingCount&&"add"===b?a.controlNavScaffold.append(d("<li><a>"+a.count+"</a></li>")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(c).closest("li").remove();f.controlNav.set();1<a.pagingCount&&a.pagingCount!==a.controlNav.length?a.update(c,b):f.controlNav.active()}},directionNav:{setup:function(){var b=d('<ul class="'+
e+'direction-nav"><li><a class="'+e+'prev" href="#">'+c.prevText+'</a></li><li><a class="'+e+'next" href="#">'+c.nextText+"</a></li></ul>");a.controlsContainer?(d(a.controlsContainer).append(b),a.directionNav=d("."+e+"direction-nav li a",a.controlsContainer)):(a.append(b),a.directionNav=d("."+e+"direction-nav li a",a));f.directionNav.update();a.directionNav.bind(t,function(b){b.preventDefault();b=d(this).hasClass(e+"next")?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(b,c.pauseOnAction)});
p&&a.directionNav.bind("click touchstart",function(a){a.preventDefault()})},update:function(){var b=e+"disabled";1===a.pagingCount?a.directionNav.addClass(b):c.animationLoop?a.directionNav.removeClass(b):0===a.animatingTo?a.directionNav.removeClass(b).filter("."+e+"prev").addClass(b):a.animatingTo===a.last?a.directionNav.removeClass(b).filter("."+e+"next").addClass(b):a.directionNav.removeClass(b)}},pausePlay:{setup:function(){var b=d('<div class="'+e+'pauseplay"><a></a></div>');a.controlsContainer?
(a.controlsContainer.append(b),a.pausePlay=d("."+e+"pauseplay a",a.controlsContainer)):(a.append(b),a.pausePlay=d("."+e+"pauseplay a",a));f.pausePlay.update(c.slideshow?e+"pause":e+"play");a.pausePlay.bind(t,function(b){b.preventDefault();d(this).hasClass(e+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())});p&&a.pausePlay.bind("click touchstart",function(a){a.preventDefault()})},update:function(b){"play"===b?a.pausePlay.removeClass(e+"pause").addClass(e+
"play").text(c.playText):a.pausePlay.removeClass(e+"play").addClass(e+"pause").text(c.pauseText)}},touch:function(){function b(b){j=l?d-b.touches[0].pageY:d-b.touches[0].pageX;p=l?Math.abs(j)<Math.abs(b.touches[0].pageX-e):Math.abs(j)<Math.abs(b.touches[0].pageY-e);if(!p||500<Number(new Date)-k)b.preventDefault(),!r&&a.transitions&&(c.animationLoop||(j/=0===a.currentSlide&&0>j||a.currentSlide===a.last&&0<j?Math.abs(j)/q+2:1),a.setProps(f+j,"setTouch"))}function g(){i.removeEventListener("touchmove",
b,!1);if(a.animatingTo===a.currentSlide&&!p&&null!==j){var h=m?-j:j,l=0<h?a.getTarget("next"):a.getTarget("prev");a.canAdvance(l)&&(550>Number(new Date)-k&&50<Math.abs(h)||Math.abs(h)>q/2)?a.flexAnimate(l,c.pauseOnAction):r||a.flexAnimate(a.currentSlide,c.pauseOnAction,!0)}i.removeEventListener("touchend",g,!1);f=j=e=d=null}var d,e,f,q,j,k,p=!1;i.addEventListener("touchstart",function(j){a.animating?j.preventDefault():1===j.touches.length&&(a.pause(),q=l?a.h:a.w,k=Number(new Date),f=h&&m&&a.animatingTo===
a.last?0:h&&m?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:h&&a.currentSlide===a.last?a.limit:h?(a.itemW+c.itemMargin)*a.move*a.currentSlide:m?(a.last-a.currentSlide+a.cloneOffset)*q:(a.currentSlide+a.cloneOffset)*q,d=l?j.touches[0].pageY:j.touches[0].pageX,e=l?j.touches[0].pageX:j.touches[0].pageY,i.addEventListener("touchmove",b,!1),i.addEventListener("touchend",g,!1))},!1)},resize:function(){!a.animating&&a.is(":visible")&&(h||a.doMath(),r?f.smoothHeight():h?(a.slides.width(a.computedW),
a.update(a.pagingCount),a.setProps()):l?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(c.smoothHeight&&f.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(b){if(!l||r){var c=r?a:a.viewport;b?c.animate({height:a.slides.eq(a.animatingTo).height()},b):c.height(a.slides.eq(a.animatingTo).height())}},sync:function(b){var g=d(c.sync).data("flexslider"),e=a.animatingTo;switch(b){case "animate":g.flexAnimate(e,c.pauseOnAction,!1,!0);break;case "play":!g.playing&&
!g.asNav&&g.play();break;case "pause":g.pause()}}};a.flexAnimate=function(b,g,n,i,k){s&&1===a.pagingCount&&(a.direction=a.currentItem<b?"next":"prev");if(!a.animating&&(a.canAdvance(b,k)||n)&&a.is(":visible")){if(s&&i)if(n=d(c.asNavFor).data("flexslider"),a.atEnd=0===b||b===a.count-1,n.flexAnimate(b,!0,!1,!0,k),a.direction=a.currentItem<b?"next":"prev",n.direction=a.direction,Math.ceil((b+1)/a.visible)-1!==a.currentSlide&&0!==b)a.currentItem=b,a.slides.removeClass(e+"active-slide").eq(b).addClass(e+
"active-slide"),b=Math.floor(b/a.visible);else return a.currentItem=b,a.slides.removeClass(e+"active-slide").eq(b).addClass(e+"active-slide"),!1;a.animating=!0;a.animatingTo=b;c.before(a);g&&a.pause();a.syncExists&&!k&&f.sync("animate");c.controlNav&&f.controlNav.active();h||a.slides.removeClass(e+"active-slide").eq(b).addClass(e+"active-slide");a.atEnd=0===b||b===a.last;c.directionNav&&f.directionNav.update();b===a.last&&(c.end(a),c.animationLoop||a.pause());if(r)p?(a.slides.eq(a.currentSlide).css({opacity:0,
zIndex:1}),a.slides.eq(b).css({opacity:1,zIndex:2}),a.slides.unbind("webkitTransitionEnd transitionend"),a.slides.eq(a.currentSlide).bind("webkitTransitionEnd transitionend",function(){c.after(a)}),a.animating=!1,a.currentSlide=a.animatingTo):(a.slides.eq(a.currentSlide).fadeOut(c.animationSpeed,c.easing),a.slides.eq(b).fadeIn(c.animationSpeed,c.easing,a.wrapup));else{var q=l?a.slides.filter(":first").height():a.computedW;h?(b=c.itemWidth>a.w?2*c.itemMargin:c.itemMargin,b=(a.itemW+b)*a.move*a.animatingTo,
b=b>a.limit&&1!==a.visible?a.limit:b):b=0===a.currentSlide&&b===a.count-1&&c.animationLoop&&"next"!==a.direction?m?(a.count+a.cloneOffset)*q:0:a.currentSlide===a.last&&0===b&&c.animationLoop&&"prev"!==a.direction?m?0:(a.count+1)*q:m?(a.count-1-b+a.cloneOffset)*q:(b+a.cloneOffset)*q;a.setProps(b,"",c.animationSpeed);if(a.transitions){if(!c.animationLoop||!a.atEnd)a.animating=!1,a.currentSlide=a.animatingTo;a.container.unbind("webkitTransitionEnd transitionend");a.container.bind("webkitTransitionEnd transitionend",
function(){a.wrapup(q)})}else a.container.animate(a.args,c.animationSpeed,c.easing,function(){a.wrapup(q)})}c.smoothHeight&&f.smoothHeight(c.animationSpeed)}};a.wrapup=function(b){!r&&!h&&(0===a.currentSlide&&a.animatingTo===a.last&&c.animationLoop?a.setProps(b,"jumpEnd"):a.currentSlide===a.last&&(0===a.animatingTo&&c.animationLoop)&&a.setProps(b,"jumpStart"));a.animating=!1;a.currentSlide=a.animatingTo;c.after(a)};a.animateSlides=function(){a.animating||a.flexAnimate(a.getTarget("next"))};a.pause=
function(){clearInterval(a.animatedSlides);a.playing=!1;c.pausePlay&&f.pausePlay.update("play");a.syncExists&&f.sync("pause")};a.play=function(){a.animatedSlides=setInterval(a.animateSlides,c.slideshowSpeed);a.playing=!0;c.pausePlay&&f.pausePlay.update("pause");a.syncExists&&f.sync("play")};a.canAdvance=function(b,g){var d=s?a.pagingCount-1:a.last;return g?!0:s&&a.currentItem===a.count-1&&0===b&&"prev"===a.direction?!0:s&&0===a.currentItem&&b===a.pagingCount-1&&"next"!==a.direction?!1:b===a.currentSlide&&
!s?!1:c.animationLoop?!0:a.atEnd&&0===a.currentSlide&&b===d&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===d&&0===b&&"next"===a.direction?!1:!0};a.getTarget=function(b){a.direction=b;return"next"===b?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1};a.setProps=function(b,g,d){var e,f=b?b:(a.itemW+c.itemMargin)*a.move*a.animatingTo;e=-1*function(){if(h)return"setTouch"===g?b:m&&a.animatingTo===a.last?0:m?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:a.animatingTo===
a.last?a.limit:f;switch(g){case "setTotal":return m?(a.count-1-a.currentSlide+a.cloneOffset)*b:(a.currentSlide+a.cloneOffset)*b;case "setTouch":return b;case "jumpEnd":return m?b:a.count*b;case "jumpStart":return m?a.count*b:b;default:return b}}()+"px";a.transitions&&(e=l?"translate3d(0,"+e+",0)":"translate3d("+e+",0,0)",d=void 0!==d?d/1E3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",d));a.args[a.prop]=e;(a.transitions||void 0===d)&&a.container.css(a.args)};a.setup=function(b){if(r)a.slides.css({width:"100%",
"float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&(p?a.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+c.animationSpeed/1E3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):a.slides.eq(a.currentSlide).fadeIn(c.animationSpeed,c.easing)),c.smoothHeight&&f.smoothHeight();else{var g,n;"init"===b&&(a.viewport=d('<div class="'+e+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=
0,m&&(n=d.makeArray(a.slides).reverse(),a.slides=d(n),a.container.empty().append(a.slides)));c.animationLoop&&!h&&(a.cloneCount=2,a.cloneOffset=1,"init"!==b&&a.container.find(".clone").remove(),a.container.append(a.slides.first().clone().addClass("clone")).prepend(a.slides.last().clone().addClass("clone")));a.newSlides=d(c.selector,a);g=m?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset;l&&!h?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),
setTimeout(function(){a.newSlides.css({display:"block"});a.doMath();a.viewport.height(a.h);a.setProps(g*a.h,"init")},"init"===b?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(g*a.computedW,"init"),setTimeout(function(){a.doMath();a.newSlides.css({width:a.computedW,"float":"left",display:"block"});c.smoothHeight&&f.smoothHeight()},"init"===b?100:0))}h||a.slides.removeClass(e+"active-slide").eq(a.currentSlide).addClass(e+"active-slide")};a.doMath=function(){var b=a.slides.first(),
d=c.itemMargin,e=c.minItems,f=c.maxItems;a.w=a.width();a.h=b.height();a.boxPadding=b.outerWidth()-b.width();h?(a.itemT=c.itemWidth+d,a.minW=e?e*a.itemT:a.w,a.maxW=f?f*a.itemT:a.w,a.itemW=a.minW>a.w?(a.w-d*e)/e:a.maxW<a.w?(a.w-d*f)/f:c.itemWidth>a.w?a.w:c.itemWidth,a.visible=Math.floor(a.w/(a.itemW+d)),a.move=0<c.move&&c.move<a.visible?c.move:a.visible,a.pagingCount=Math.ceil((a.count-a.visible)/a.move+1),a.last=a.pagingCount-1,a.limit=1===a.pagingCount?0:c.itemWidth>a.w?(a.itemW+2*d)*a.count-a.w-
d:(a.itemW+d)*a.count-a.w-d):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1);a.computedW=a.itemW-a.boxPadding};a.update=function(b,d){a.doMath();h||(b<a.currentSlide?a.currentSlide+=1:b<=a.currentSlide&&0!==b&&(a.currentSlide-=1),a.animatingTo=a.currentSlide);if(c.controlNav&&!a.manualControls)if("add"===d&&!h||a.pagingCount>a.controlNav.length)f.controlNav.update("add");else if("remove"===d&&!h||a.pagingCount<a.controlNav.length)h&&a.currentSlide>a.last&&(a.currentSlide-=1,a.animatingTo-=1),
f.controlNav.update("remove",a.last);c.directionNav&&f.directionNav.update()};a.addSlide=function(b,e){var f=d(b);a.count+=1;a.last=a.count-1;l&&m?void 0!==e?a.slides.eq(a.count-e).after(f):a.container.prepend(f):void 0!==e?a.slides.eq(e).before(f):a.container.append(f);a.update(e,"add");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.added(a)};a.removeSlide=function(b){var e=isNaN(b)?a.slides.index(d(b)):b;a.count-=1;a.last=a.count-1;isNaN(b)?d(b,a.slides).remove():l&&m?a.slides.eq(a.last).remove():
a.slides.eq(b).remove();a.doMath();a.update(e,"remove");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.removed(a)};f.init()};d.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7E3,animationSpeed:600,initDelay:0,randomize:!1,pauseOnAction:!0,pauseOnHover:!1,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",
keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:0,maxItems:0,move:0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}};d.fn.flexslider=function(i){void 0===i&&(i={});if("object"===typeof i)return this.each(function(){var a=d(this),c=a.find(i.selector?i.selector:".slides > li");1===c.length?(c.fadeIn(400),
i.start&&i.start(a)):void 0==a.data("flexslider")&&new d.flexslider(this,i)});var k=d(this).data("flexslider");switch(i){case "play":k.play();break;case "pause":k.pause();break;case "next":k.flexAnimate(k.getTarget("next"),!0);break;case "prev":case "previous":k.flexAnimate(k.getTarget("prev"),!0);break;default:"number"===typeof i&&k.flexAnimate(i,!0)}}})(jQuery);

View File

@@ -0,0 +1,903 @@
/*
* jQuery FlexSlider v2.1
* http://www.woothemes.com/flexslider/
*
* Copyright 2012 WooThemes
* Free to use under the GPLv2 license.
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Contributing author: Tyler Smith (@mbmufffin)
*/
;(function ($) {
//FlexSlider: Object Instance
$.flexslider = function(el, options) {
var slider = $(el),
vars = $.extend({}, $.flexslider.defaults, options),
namespace = vars.namespace,
touch = ("ontouchstart" in window) || window.DocumentTouch && document instanceof DocumentTouch,
eventType = (touch) ? "touchend" : "click",
vertical = vars.direction === "vertical",
reverse = vars.reverse,
carousel = (vars.itemWidth > 0),
fade = vars.animation === "fade",
asNav = vars.asNavFor !== "",
methods = {};
// Store a reference to the slider object
$.data(el, "flexslider", slider);
// Privat slider methods
methods = {
init: function() {
slider.animating = false;
slider.currentSlide = vars.startAt;
slider.animatingTo = slider.currentSlide;
slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last);
slider.containerSelector = vars.selector.substr(0,vars.selector.search(' '));
slider.slides = $(vars.selector, slider);
slider.container = $(slider.containerSelector, slider);
slider.count = slider.slides.length;
// SYNC:
slider.syncExists = $(vars.sync).length > 0;
// SLIDE:
if (vars.animation === "slide") vars.animation = "swing";
slider.prop = (vertical) ? "top" : "marginLeft";
slider.args = {};
// SLIDESHOW:
slider.manualPause = false;
// TOUCH/USECSS:
slider.transitions = !vars.video && !fade && vars.useCSS && (function() {
var obj = document.createElement('div'),
props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
for (var i in props) {
if ( obj.style[ props[i] ] !== undefined ) {
slider.pfx = props[i].replace('Perspective','').toLowerCase();
slider.prop = "-" + slider.pfx + "-transform";
return true;
}
}
return false;
}());
// CONTROLSCONTAINER:
if (vars.controlsContainer !== "") slider.controlsContainer = $(vars.controlsContainer).length > 0 && $(vars.controlsContainer);
// MANUAL:
if (vars.manualControls !== "") slider.manualControls = $(vars.manualControls).length > 0 && $(vars.manualControls);
// RANDOMIZE:
if (vars.randomize) {
slider.slides.sort(function() { return (Math.round(Math.random())-0.5); });
slider.container.empty().append(slider.slides);
}
slider.doMath();
// ASNAV:
if (asNav) methods.asNav.setup();
// INIT
slider.setup("init");
// CONTROLNAV:
if (vars.controlNav) methods.controlNav.setup();
// DIRECTIONNAV:
if (vars.directionNav) methods.directionNav.setup();
// KEYBOARD:
if (vars.keyboard && ($(slider.containerSelector).length === 1 || vars.multipleKeyboard)) {
$(document).bind('keyup', function(event) {
var keycode = event.keyCode;
if (!slider.animating && (keycode === 39 || keycode === 37)) {
var target = (keycode === 39) ? slider.getTarget('next') :
(keycode === 37) ? slider.getTarget('prev') : false;
slider.flexAnimate(target, vars.pauseOnAction);
}
});
}
// MOUSEWHEEL:
if (vars.mousewheel) {
slider.bind('mousewheel', function(event, delta, deltaX, deltaY) {
event.preventDefault();
var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev');
slider.flexAnimate(target, vars.pauseOnAction);
});
}
// PAUSEPLAY
if (vars.pausePlay) methods.pausePlay.setup();
// SLIDSESHOW
if (vars.slideshow) {
if (vars.pauseOnHover) {
slider.hover(function() {
if (!slider.manualPlay && !slider.manualPause) slider.pause();
}, function() {
if (!slider.manualPause && !slider.manualPlay) slider.play();
});
}
// initialize animation
(vars.initDelay > 0) ? setTimeout(slider.play, vars.initDelay) : slider.play();
}
// TOUCH
if (touch && vars.touch) methods.touch();
// FADE&&SMOOTHHEIGHT || SLIDE:
if (!fade || (fade && vars.smoothHeight)) $(window).bind("resize focus", methods.resize);
// API: start() Callback
setTimeout(function(){
vars.start(slider);
}, 200);
},
asNav: {
setup: function() {
slider.asNav = true;
slider.animatingTo = Math.floor(slider.currentSlide/slider.move);
slider.currentItem = slider.currentSlide;
slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
slider.slides.click(function(e){
e.preventDefault();
var $slide = $(this),
target = $slide.index();
if (!$(vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) {
slider.direction = (slider.currentItem < target) ? "next" : "prev";
slider.flexAnimate(target, vars.pauseOnAction, false, true, true);
}
});
}
},
controlNav: {
setup: function() {
if (!slider.manualControls) {
methods.controlNav.setupPaging();
} else { // MANUALCONTROLS:
methods.controlNav.setupManual();
}
},
setupPaging: function() {
var type = (vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging',
j = 1,
item;
slider.controlNavScaffold = $('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>');
if (slider.pagingCount > 1) {
for (var i = 0; i < slider.pagingCount; i++) {
item = (vars.controlNav === "thumbnails") ? '<img src="' + slider.slides.eq(i).attr("data-thumb") + '"/>' : '<a>' + j + '</a>';
slider.controlNavScaffold.append('<li>' + item + '</li>');
j++;
}
}
// CONTROLSCONTAINER:
(slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold);
methods.controlNav.set();
methods.controlNav.active();
slider.controlNavScaffold.delegate('a, img', eventType, function(event) {
event.preventDefault();
var $this = $(this),
target = slider.controlNav.index($this);
if (!$this.hasClass(namespace + 'active')) {
slider.direction = (target > slider.currentSlide) ? "next" : "prev";
slider.flexAnimate(target, vars.pauseOnAction);
}
});
// Prevent iOS click event bug
if (touch) {
slider.controlNavScaffold.delegate('a', "click touchstart", function(event) {
event.preventDefault();
});
}
},
setupManual: function() {
slider.controlNav = slider.manualControls;
methods.controlNav.active();
slider.controlNav.live(eventType, function(event) {
event.preventDefault();
var $this = $(this),
target = slider.controlNav.index($this);
if (!$this.hasClass(namespace + 'active')) {
(target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
slider.flexAnimate(target, vars.pauseOnAction);
}
});
// Prevent iOS click event bug
if (touch) {
slider.controlNav.live("click touchstart", function(event) {
event.preventDefault();
});
}
},
set: function() {
var selector = (vars.controlNav === "thumbnails") ? 'img' : 'a';
slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider);
},
active: function() {
slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
},
update: function(action, pos) {
if (slider.pagingCount > 1 && action === "add") {
slider.controlNavScaffold.append($('<li><a>' + slider.count + '</a></li>'));
} else if (slider.pagingCount === 1) {
slider.controlNavScaffold.find('li').remove();
} else {
slider.controlNav.eq(pos).closest('li').remove();
}
methods.controlNav.set();
(slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
}
},
directionNav: {
setup: function() {
var directionNavScaffold = $('<ul class="' + namespace + 'direction-nav"><li><a class="' + namespace + 'prev" href="#">' + vars.prevText + '</a></li><li><a class="' + namespace + 'next" href="#">' + vars.nextText + '</a></li></ul>');
// CONTROLSCONTAINER:
if (slider.controlsContainer) {
$(slider.controlsContainer).append(directionNavScaffold);
slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer);
} else {
slider.append(directionNavScaffold);
slider.directionNav = $('.' + namespace + 'direction-nav li a', slider);
}
methods.directionNav.update();
slider.directionNav.bind(eventType, function(event) {
event.preventDefault();
var target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev');
slider.flexAnimate(target, vars.pauseOnAction);
});
// Prevent iOS click event bug
if (touch) {
slider.directionNav.bind("click touchstart", function(event) {
event.preventDefault();
});
}
},
update: function() {
var disabledClass = namespace + 'disabled';
if (slider.pagingCount === 1) {
slider.directionNav.addClass(disabledClass);
} else if (!vars.animationLoop) {
if (slider.animatingTo === 0) {
slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass);
} else if (slider.animatingTo === slider.last) {
slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass);
} else {
slider.directionNav.removeClass(disabledClass);
}
} else {
slider.directionNav.removeClass(disabledClass);
}
}
},
pausePlay: {
setup: function() {
var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a></a></div>');
// CONTROLSCONTAINER:
if (slider.controlsContainer) {
slider.controlsContainer.append(pausePlayScaffold);
slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer);
} else {
slider.append(pausePlayScaffold);
slider.pausePlay = $('.' + namespace + 'pauseplay a', slider);
}
methods.pausePlay.update((vars.slideshow) ? namespace + 'pause' : namespace + 'play');
slider.pausePlay.bind(eventType, function(event) {
event.preventDefault();
if ($(this).hasClass(namespace + 'pause')) {
slider.manualPause = true;
slider.manualPlay = false;
slider.pause();
} else {
slider.manualPause = false;
slider.manualPlay = true;
slider.play();
}
});
// Prevent iOS click event bug
if (touch) {
slider.pausePlay.bind("click touchstart", function(event) {
event.preventDefault();
});
}
},
update: function(state) {
(state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').text(vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').text(vars.pauseText);
}
},
touch: function() {
var startX,
startY,
offset,
cwidth,
dx,
startT,
scrolling = false;
el.addEventListener('touchstart', onTouchStart, false);
function onTouchStart(e) {
if (slider.animating) {
e.preventDefault();
} else if (e.touches.length === 1) {
slider.pause();
// CAROUSEL:
cwidth = (vertical) ? slider.h : slider. w;
startT = Number(new Date());
// CAROUSEL:
offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
(carousel && reverse) ? slider.limit - (((slider.itemW + vars.itemMargin) * slider.move) * slider.animatingTo) :
(carousel && slider.currentSlide === slider.last) ? slider.limit :
(carousel) ? ((slider.itemW + vars.itemMargin) * slider.move) * slider.currentSlide :
(reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
startX = (vertical) ? e.touches[0].pageY : e.touches[0].pageX;
startY = (vertical) ? e.touches[0].pageX : e.touches[0].pageY;
el.addEventListener('touchmove', onTouchMove, false);
el.addEventListener('touchend', onTouchEnd, false);
}
}
function onTouchMove(e) {
dx = (vertical) ? startX - e.touches[0].pageY : startX - e.touches[0].pageX;
scrolling = (vertical) ? (Math.abs(dx) < Math.abs(e.touches[0].pageX - startY)) : (Math.abs(dx) < Math.abs(e.touches[0].pageY - startY));
if (!scrolling || Number(new Date()) - startT > 500) {
e.preventDefault();
if (!fade && slider.transitions) {
if (!vars.animationLoop) {
dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
}
slider.setProps(offset + dx, "setTouch");
}
}
}
function onTouchEnd(e) {
// finish the touch by undoing the touch session
el.removeEventListener('touchmove', onTouchMove, false);
if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
var updateDx = (reverse) ? -dx : dx,
target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
slider.flexAnimate(target, vars.pauseOnAction);
} else {
if (!fade) slider.flexAnimate(slider.currentSlide, vars.pauseOnAction, true);
}
}
el.removeEventListener('touchend', onTouchEnd, false);
startX = null;
startY = null;
dx = null;
offset = null;
}
},
resize: function() {
if (!slider.animating && slider.is(':visible')) {
if (!carousel) slider.doMath();
if (fade) {
// SMOOTH HEIGHT:
methods.smoothHeight();
} else if (carousel) { //CAROUSEL:
slider.slides.width(slider.computedW);
slider.update(slider.pagingCount);
slider.setProps();
}
else if (vertical) { //VERTICAL:
slider.viewport.height(slider.h);
slider.setProps(slider.h, "setTotal");
} else {
// SMOOTH HEIGHT:
if (vars.smoothHeight) methods.smoothHeight();
slider.newSlides.width(slider.computedW);
slider.setProps(slider.computedW, "setTotal");
}
}
},
smoothHeight: function(dur) {
if (!vertical || fade) {
var $obj = (fade) ? slider : slider.viewport;
(dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height());
}
},
sync: function(action) {
var $obj = $(vars.sync).data("flexslider"),
target = slider.animatingTo;
switch (action) {
case "animate": $obj.flexAnimate(target, vars.pauseOnAction, false, true); break;
case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break;
case "pause": $obj.pause(); break;
}
}
}
// public methods
slider.flexAnimate = function(target, pause, override, withSync, fromNav) {
if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev";
if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) {
if (asNav && withSync) {
var master = $(vars.asNavFor).data('flexslider');
slider.atEnd = target === 0 || target === slider.count - 1;
master.flexAnimate(target, true, false, true, fromNav);
slider.direction = (slider.currentItem < target) ? "next" : "prev";
master.direction = slider.direction;
if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) {
slider.currentItem = target;
slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
target = Math.floor(target/slider.visible);
} else {
slider.currentItem = target;
slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
return false;
}
}
slider.animating = true;
slider.animatingTo = target;
// API: before() animation Callback
vars.before(slider);
// SLIDESHOW:
if (pause) slider.pause();
// SYNC:
if (slider.syncExists && !fromNav) methods.sync("animate");
// CONTROLNAV
if (vars.controlNav) methods.controlNav.active();
// !CAROUSEL:
// CANDIDATE: slide active class (for add/remove slide)
if (!carousel) slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide');
// INFINITE LOOP:
// CANDIDATE: atEnd
slider.atEnd = target === 0 || target === slider.last;
// DIRECTIONNAV:
if (vars.directionNav) methods.directionNav.update();
if (target === slider.last) {
// API: end() of cycle Callback
vars.end(slider);
// SLIDESHOW && !INFINITE LOOP:
if (!vars.animationLoop) slider.pause();
}
// SLIDE:
if (!fade) {
var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW,
margin, slideString, calcNext;
// INFINITE LOOP / REVERSE:
if (carousel) {
margin = (vars.itemWidth > slider.w) ? vars.itemMargin * 2 : vars.itemMargin;
calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo;
slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext;
} else if (slider.currentSlide === 0 && target === slider.count - 1 && vars.animationLoop && slider.direction !== "next") {
slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0;
} else if (slider.currentSlide === slider.last && target === 0 && vars.animationLoop && slider.direction !== "prev") {
slideString = (reverse) ? 0 : (slider.count + 1) * dimension;
} else {
slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
}
slider.setProps(slideString, "", vars.animationSpeed);
if (slider.transitions) {
if (!vars.animationLoop || !slider.atEnd) {
slider.animating = false;
slider.currentSlide = slider.animatingTo;
}
slider.container.unbind("webkitTransitionEnd transitionend");
slider.container.bind("webkitTransitionEnd transitionend", function() {
slider.wrapup(dimension);
});
} else {
slider.container.animate(slider.args, vars.animationSpeed, vars.easing, function(){
slider.wrapup(dimension);
});
}
} else { // FADE:
if (!touch) {
slider.slides.eq(slider.currentSlide).fadeOut(vars.animationSpeed, vars.easing);
slider.slides.eq(target).fadeIn(vars.animationSpeed, vars.easing, slider.wrapup);
} else {
slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
slider.slides.unbind("webkitTransitionEnd transitionend");
slider.slides.eq(slider.currentSlide).bind("webkitTransitionEnd transitionend", function() {
// API: after() animation Callback
vars.after(slider);
});
slider.animating = false;
slider.currentSlide = slider.animatingTo;
}
}
// SMOOTH HEIGHT:
if (vars.smoothHeight) methods.smoothHeight(vars.animationSpeed);
}
}
slider.wrapup = function(dimension) {
// SLIDE:
if (!fade && !carousel) {
if (slider.currentSlide === 0 && slider.animatingTo === slider.last && vars.animationLoop) {
slider.setProps(dimension, "jumpEnd");
} else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && vars.animationLoop) {
slider.setProps(dimension, "jumpStart");
}
}
slider.animating = false;
slider.currentSlide = slider.animatingTo;
// API: after() animation Callback
vars.after(slider);
}
// SLIDESHOW:
slider.animateSlides = function() {
if (!slider.animating) slider.flexAnimate(slider.getTarget("next"));
}
// SLIDESHOW:
slider.pause = function() {
clearInterval(slider.animatedSlides);
slider.playing = false;
// PAUSEPLAY:
if (vars.pausePlay) methods.pausePlay.update("play");
// SYNC:
if (slider.syncExists) methods.sync("pause");
}
// SLIDESHOW:
slider.play = function() {
slider.animatedSlides = setInterval(slider.animateSlides, vars.slideshowSpeed);
slider.playing = true;
// PAUSEPLAY:
if (vars.pausePlay) methods.pausePlay.update("pause");
// SYNC:
if (slider.syncExists) methods.sync("play");
}
slider.canAdvance = function(target, fromNav) {
// ASNAV:
var last = (asNav) ? slider.pagingCount - 1 : slider.last;
return (fromNav) ? true :
(asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true :
(asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false :
(target === slider.currentSlide && !asNav) ? false :
(vars.animationLoop) ? true :
(slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false :
(slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false :
true;
}
slider.getTarget = function(dir) {
slider.direction = dir;
if (dir === "next") {
return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1;
} else {
return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1;
}
}
// SLIDE:
slider.setProps = function(pos, special, dur) {
var target = (function() {
var posCheck = (pos) ? pos : ((slider.itemW + vars.itemMargin) * slider.move) * slider.animatingTo,
posCalc = (function() {
if (carousel) {
return (special === "setTouch") ? pos :
(reverse && slider.animatingTo === slider.last) ? 0 :
(reverse) ? slider.limit - (((slider.itemW + vars.itemMargin) * slider.move) * slider.animatingTo) :
(slider.animatingTo === slider.last) ? slider.limit : posCheck;
} else {
switch (special) {
case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos;
case "setTouch": return (reverse) ? pos : pos;
case "jumpEnd": return (reverse) ? pos : slider.count * pos;
case "jumpStart": return (reverse) ? slider.count * pos : pos;
default: return pos;
}
}
}());
return (posCalc * -1) + "px";
}());
if (slider.transitions) {
target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)";
dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
slider.container.css("-" + slider.pfx + "-transition-duration", dur);
}
slider.args[slider.prop] = target;
if (slider.transitions || dur === undefined) slider.container.css(slider.args);
}
slider.setup = function(type) {
// SLIDE:
if (!fade) {
var sliderOffset, arr;
if (type === "init") {
slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
// INFINITE LOOP:
slider.cloneCount = 0;
slider.cloneOffset = 0;
// REVERSE:
if (reverse) {
arr = $.makeArray(slider.slides).reverse();
slider.slides = $(arr);
slider.container.empty().append(slider.slides);
}
}
// INFINITE LOOP && !CAROUSEL:
if (vars.animationLoop && !carousel) {
slider.cloneCount = 2;
slider.cloneOffset = 1;
// clear out old clones
if (type !== "init") slider.container.find('.clone').remove();
slider.container.append(slider.slides.first().clone().addClass('clone')).prepend(slider.slides.last().clone().addClass('clone'));
}
slider.newSlides = $(vars.selector, slider);
sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset;
// VERTICAL:
if (vertical && !carousel) {
slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
setTimeout(function(){
slider.newSlides.css({"display": "block"});
slider.doMath();
slider.viewport.height(slider.h);
slider.setProps(sliderOffset * slider.h, "init");
}, (type === "init") ? 100 : 0);
} else {
slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
slider.setProps(sliderOffset * slider.computedW, "init");
setTimeout(function(){
slider.doMath();
slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"});
// SMOOTH HEIGHT:
if (vars.smoothHeight) methods.smoothHeight();
}, (type === "init") ? 100 : 0);
}
} else { // FADE:
slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"});
if (type === "init") {
if (!touch) {
slider.slides.eq(slider.currentSlide).fadeIn(vars.animationSpeed, vars.easing);
} else {
slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2});
}
}
// SMOOTH HEIGHT:
if (vars.smoothHeight) methods.smoothHeight();
}
// !CAROUSEL:
// CANDIDATE: active slide
if (!carousel) slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide");
}
slider.doMath = function() {
var slide = slider.slides.first(),
slideMargin = vars.itemMargin,
minItems = vars.minItems,
maxItems = vars.maxItems;
slider.w = slider.width();
slider.h = slide.height();
slider.boxPadding = slide.outerWidth() - slide.width();
// CAROUSEL:
if (carousel) {
slider.itemT = vars.itemWidth + slideMargin;
slider.minW = (minItems) ? minItems * slider.itemT : slider.w;
slider.maxW = (maxItems) ? maxItems * slider.itemT : slider.w;
slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * minItems))/minItems :
(slider.maxW < slider.w) ? (slider.w - (slideMargin * maxItems))/maxItems :
(vars.itemWidth > slider.w) ? slider.w : vars.itemWidth;
slider.visible = Math.floor(slider.w/(slider.itemW + slideMargin));
slider.move = (vars.move > 0 && vars.move < slider.visible ) ? vars.move : slider.visible;
slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
slider.last = slider.pagingCount - 1;
slider.limit = (slider.pagingCount === 1) ? 0 :
(vars.itemWidth > slider.w) ? ((slider.itemW + (slideMargin * 2)) * slider.count) - slider.w - slideMargin : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
} else {
slider.itemW = slider.w;
slider.pagingCount = slider.count;
slider.last = slider.count - 1;
}
slider.computedW = slider.itemW - slider.boxPadding;
}
slider.update = function(pos, action) {
slider.doMath();
// update currentSlide and slider.animatingTo if necessary
if (!carousel) {
if (pos < slider.currentSlide) {
slider.currentSlide += 1;
} else if (pos <= slider.currentSlide && pos !== 0) {
slider.currentSlide -= 1;
}
slider.animatingTo = slider.currentSlide;
}
// update controlNav
if (vars.controlNav && !slider.manualControls) {
if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) {
methods.controlNav.update("add");
} else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) {
if (carousel && slider.currentSlide > slider.last) {
slider.currentSlide -= 1;
slider.animatingTo -= 1;
}
methods.controlNav.update("remove", slider.last);
}
}
// update directionNav
if (vars.directionNav) methods.directionNav.update();
}
slider.addSlide = function(obj, pos) {
var $obj = $(obj);
slider.count += 1;
slider.last = slider.count - 1;
// append new slide
if (vertical && reverse) {
(pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj);
} else {
(pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj);
}
// update currentSlide, animatingTo, controlNav, and directionNav
slider.update(pos, "add");
// update slider.slides
slider.slides = $(vars.selector + ':not(.clone)', slider);
// re-setup the slider to accomdate new slide
slider.setup();
//FlexSlider: added() Callback
vars.added(slider);
}
slider.removeSlide = function(obj) {
var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;
// update count
slider.count -= 1;
slider.last = slider.count - 1;
// remove slide
if (isNaN(obj)) {
$(obj, slider.slides).remove();
} else {
(vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove();
}
// update currentSlide, animatingTo, controlNav, and directionNav
slider.doMath();
slider.update(pos, "remove");
// update slider.slides
slider.slides = $(vars.selector + ':not(.clone)', slider);
// re-setup the slider to accomdate new slide
slider.setup();
// FlexSlider: removed() Callback
vars.removed(slider);
}
//FlexSlider: Initialize
methods.init();
}
//FlexSlider: Default Settings
$.flexslider.defaults = {
namespace: "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin
selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
animation: "fade", //String: Select your animation type, "fade" or "slide"
easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
reverse: false, //{NEW} Boolean: Reverse the animation direction
animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
startAt: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide)
slideshow: true, //Boolean: Animate slider automatically
slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds
animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds
initDelay: 0, //{NEW} Integer: Set an initialization delay, in milliseconds
randomize: false, //Boolean: Randomize slide order
// Usability features
pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
pauseOnHover: false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
useCSS: true, //{NEW} Boolean: Slider will use CSS3 transitions if available
touch: true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
video: false, //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches
// Primary Controls
controlNav: true, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false)
prevText: "Previous", //String: Set the text for the "previous" directionNav item
nextText: "Next", //String: Set the text for the "next" directionNav item
// Secondary Navigation
keyboard: true, //Boolean: Allow slider navigating via keyboard left/right keys
multipleKeyboard: false, //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
mousewheel: false, //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
pausePlay: false, //Boolean: Create pause/play dynamic element
pauseText: "Pause", //String: Set the text for the "pause" pausePlay item
playText: "Play", //String: Set the text for the "play" pausePlay item
// Special properties
controlsContainer: "", //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found.
manualControls: "", //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
sync: "", //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
asNavFor: "", //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider
// Carousel Options
itemWidth: 0, //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
itemMargin: 0, //{NEW} Integer: Margin between carousel items.
minItems: 0, //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
maxItems: 0, //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
move: 0, //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
// Callback API
start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide
before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation
after: function(){}, //Callback: function(slider) - Fires after each slider animation completes
end: function(){}, //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
added: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is added
removed: function(){} //{NEW} Callback: function(slider) - Fires after a slide is removed
}
//FlexSlider: Plugin Function
$.fn.flexslider = function(options) {
if (options === undefined) options = {};
if (typeof options === "object") {
return this.each(function() {
var $this = $(this),
selector = (options.selector) ? options.selector : ".slides > li",
$slides = $this.find(selector);
if ($slides.length === 1) {
$slides.fadeIn(400);
if (options.start) options.start($this);
} else if ($this.data('flexslider') == undefined) {
new $.flexslider(this, options);
}
});
} else {
// Helper strings to quickly perform functions on the slider
var $slider = $(this).data('flexslider');
switch (options) {
case "play": $slider.play(); break;
case "pause": $slider.pause(); break;
case "next": $slider.flexAnimate($slider.getTarget("next"), true); break;
case "prev":
case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break;
default: if (typeof options === "number") $slider.flexAnimate(options, true);
}
}
}
})(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.style.background="none";d.appendChild(g);return function(h){g.innerHTML='&shy;<style media="'+h+'"> #mq-test-1 { width: 42px; }</style>';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document);
/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B<y;B++){A=D[B],z=A.href,C=A.media,x=A.rel&&A.rel.toLowerCase()==="stylesheet";if(!!z&&x&&!o[z]){if(A.styleSheet&&A.styleSheet.rawCssText){m(A.styleSheet.rawCssText,z,C);o[z]=true}else{if((!/^([a-zA-Z:]*\/\/)/.test(z)&&!g)||z.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:z,media:C})}}}}u()},u=function(){if(d.length){var x=d.shift();n(x.href,function(y){m(y,x.href,x.media);o[x.href]=true;u()})}},m=function(I,x,z){var G=I.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),J=G&&G.length||0,x=x.substring(0,x.lastIndexOf("/")),y=function(K){return K.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+x+"$2$3")},A=!J&&z,D=0,C,E,F,B,H;if(x.length){x+="/"}if(A){J=1}for(;D<J;D++){C=0;if(A){E=z;k.push(y(I))}else{E=G[D].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&y(RegExp.$2))}B=E.split(",");H=B.length;for(;C<H;C++){F=B[C];i.push({media:F.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:k.length-1,hasquery:F.indexOf("(")>-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l<h){clearTimeout(r);r=setTimeout(j,h);return}else{l=z}for(var E in i){var K=i[E],C=K.minw,J=K.maxw,A=C===null,L=J===null,y="em";if(!!C){C=parseFloat(C)*(C.indexOf(y)>-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this);

View File

@@ -0,0 +1,15 @@
// Avoid `console` errors in browsers that lack a console.
if (!(window.console && console.log)) {
(function() {
var noop = function() {};
var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn'];
var length = methods.length;
var console = window.console = {};
while (length--) {
console[methods[length]] = noop;
}
}());
}
// Place any jQuery/helper plugins in here.
;

View File

@@ -0,0 +1,352 @@
(function($) { $(document).ready(function() {
//console.log($('div#menu-trigger-level1'));
/* accordéon pour des views pane */
$('div.accordion-h2.accordion-h2-views div.view-header').click(function() {
$(this).siblings('div.view-content').toggle('fast', function() {
$(this).parent().parent().parent().toggleClass('accordion-h2-opened');
});
});
/* accordéon pour des panels pane */
$('div.accordion-h2.accordion-h2-panel > h2.pane-title').click(function() {
$(this).siblings('div.pane-content').toggle('fast', function() {
$(this).parent().toggleClass('accordion-h2-opened');
});
});
/* accordéon auto-exclusifs pour des panels pane */
$('div.accordion-h2-ex.accordion-h2-panel > h2.pane-title').click(function() {
$(this).parent().siblings('div.accordion-h2-ex').children('div.pane-content').hide();
$(this).parent().siblings('div.accordion-h2-ex').removeClass('accordion-h2-opened');
$(this).siblings('div.pane-content').toggle('fast', function() {
$(this).parent().toggleClass('accordion-h2-opened');
});
});
/* accordéon pour des panels pane */
$('div.accordion-trigger').click(function() {
$(this).toggleClass('accordion-h2-opened');
$(this).parent().parent().siblings('div.accordion-content').toggle('fast', function() {
});
$(this).siblings('div.accordion-content').toggle('fast', function() {
});
});
$('div#menu-trigger-level1').click(function() {
$('#block-menu_block-3').slideDown('slow', function() {
// Animation complete.
});
$('div#menu-trigger-level1').hide();
$('div#menu-trigger-level1-off').show();
});
$('div#menu-trigger-level1-off').click(function() {
$('#block-menu_block-3').slideUp('slow', function() {
// Animation complete.
});
$('div#menu-trigger-level1-off').hide();
$('div#menu-trigger-level1').show();
});
$('.flexslider').flexslider({
/*selector: 'ul > li',*/
animation: "fade",
animationLoop: true,
itemWidth: "100%",
/*itemMargin: 0,
minItems: 1,*/
controlNav: false, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
directionNav: false, //Boolean: Create navigation for previous/next navigation? (true/false)
prevText: "Précédent", //String: Set the text for the "previous" directionNav item
nextText: "Suivant",
/*maxItems: 10,*/
/*start: function(slider){
$('body').removeClass('loading');
}*/
});
/* AMSTERDAM */
$("#point-nid-870").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* BARCELONE */
$("#point-nid-871").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* BERLIN */
$("#point-nid-872").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* BIRMINGHAM */
$("#point-nid-873").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* BORDEAUX */
$("#point-nid-869").popover({
title: false,
trigger: "hover",
content: "<ul><li class='popsu1'><a href='/popsu1/bordeaux/presentation'>POPSU France 1</a></li>" +
"<li class='popsu2'><a href='/popsu2/accueil'>POPSU France 2</a></li>" +
"</ul>"
});
/* BRUXELLES */
$("#point-nid-874").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* Copenhague */
$("#point-nid-875").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* GRENOBLE */
$("#point-nid-876").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsu2'><a href='/popsu2/accueil'>POPSU France 2</a></li>" +
"</ul>"
});
/* LAUSANNE */
$("#point-nid-877").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* LILLE */
$("#point-nid-878").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsu1'><a href='/popsu1/lille/presentation'>POPSU France 1</a></li>" +
"<li class='popsu2'><a href='/popsu2/accueil'>POPSU France 2</a></li>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* LONDRES */
$("#point-nid-879").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* LYON */
$("#point-nid-880").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsu1'><a href='/popsu1/lyon/presentation'>POPSU France 1</a></li>" +
"<li class='popsu2'><a href='/popsu2/accueil'>POPSU France 2</a></li>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* MALAGA */
$("#point-nid-881").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* MARSEILLE */
$("#point-nid-882").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsu1'><a href='/popsu1/marseille/presentation'>POPSU France 1</a></li>" +
"<li class='popsu2'><a href='/popsu2/accueil'>POPSU France 2</a></li>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* Montpellier */
$("#point-nid-883").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsu1'><a href='/popsu1/montpellier/presentation'>POPSU France 1</a></li>" +
"</ul>"
});
/* Montréal */
$("#point-nid-884").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* Nantes */
$("#point-nid-868").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsu1'><a href='/popsu1/nantes/presentation'>POPSU France 1</a></li>" +
"<li class='popsu2'><a href='/popsu2/accueil'>POPSU France 2</a></li>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* Paris */
$("#point-nid-885").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* Rennes */
$("#point-nid-886").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsu2'><a href='/popsu2/accueil'>POPSU France 2</a></li>" +
"</ul>"
});
/* Rotterdam */
$("#point-nid-887").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* Strasbourg */
$("#point-nid-888").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsu2'><a href='/popsu2/accueil'>POPSU France 2</a></li>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* Toulon */
$("#point-nid-889").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsu2'><a href='/popsu2/accueil'>POPSU France 2</a></li>" +
"</ul>"
});
/* Toulouse */
$("#point-nid-890").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsu1'><a href='/popsu1/toulouse/presentation'>POPSU France 1</a></li>" +
"<li class='popsu2'><a href='/popsu2/accueil'>POPSU France 2</a></li>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* Turin */
$("#point-nid-891").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
/* Vienne */
$("#point-nid-892").popover({
title: false,
trigger: "hover",
content: "<ul>" +
"<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
"</ul>"
});
$.each($(".captioned img"), function(legend, item) {
title = $(item).attr('title')
if (title && title != "") {
$(item).after('<p class="flex-caption"><span class="ville-title">' + title + '</span></p>');
}
});
}); })(jQuery);