MetaSlider - Version 1.0

Version Description

  • Initial version

=

Download this release

Release Info

Developer matchalabs
Plugin Icon 128x128 MetaSlider
Version 1.0
Comparing to
See all releases

Version 1.0

assets/coinslider/coin-slider-styles.css ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Coin Slider jQuery plugin CSS styles
3
+ http://workshop.rs/projects/coin-slider
4
+ */
5
+
6
+
7
+ .coin-slider { overflow: hidden; zoom: 1; position: relative; }
8
+ .coin-slider a{ text-decoration: none; outline: none; border: none; }
9
+
10
+ .cs-buttons { font-size: 0px; padding: 10px; float: left; }
11
+ .cs-buttons a { margin-left: 5px; height: 10px; width: 10px; float: left; border: 1px solid #B8C4CF; color: #B8C4CF; text-indent: -1000px; }
12
+ .cs-active { background-color: #B8C4CF; color: #FFFFFF; }
13
+
14
+ .cs-title { width: 545px; padding: 10px; background-color: #000000; color: #FFFFFF; }
15
+
16
+ .cs-prev,
17
+ .cs-next { background-color: #000000; color: #FFFFFF; padding: 0px 10px; }
assets/coinslider/coin-slider.min.js ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Coin Slider - Unique jQuery Image Slider
3
+ * @version: 1.0 - (2010/04/04)
4
+ * @requires jQuery v1.2.2 or later
5
+ * @author Ivan Lazarevic
6
+ * Examples and documentation at: http://workshop.rs/projects/coin-slider/
7
+
8
+ * Licensed under MIT licence:
9
+ * http://www.opensource.org/licenses/mit-license.php
10
+ **/
11
+
12
+ (function($){var params=new Array;var order=new Array;var images=new Array;var links=new Array;var linksTarget=new Array;var titles=new Array;var interval=new Array;var imagePos=new Array;var appInterval=new Array;var squarePos=new Array;var reverse=new Array;$.fn.coinslider=$.fn.CoinSlider=function(options){init=function(el){order[el.id]=new Array();images[el.id]=new Array();links[el.id]=new Array();linksTarget[el.id]=new Array();titles[el.id]=new Array();imagePos[el.id]=0;squarePos[el.id]=0;reverse[el.id]=1;params[el.id]=$.extend({},$.fn.coinslider.defaults,options);$.each($('#'+el.id+' img'),function(i,item){images[el.id][i]=$(item).attr('src');links[el.id][i]=$(item).parent().is('a')?$(item).parent().attr('href'):'';linksTarget[el.id][i]=$(item).parent().is('a')?$(item).parent().attr('target'):'';titles[el.id][i]=$(item).next().is('span')?$(item).next().html():'';$(item).hide();$(item).next().hide();});$(el).css({'background-image':'url('+images[el.id][0]+')','width':params[el.id].width,'height':params[el.id].height,'position':'relative','background-position':'top left'}).wrap("<div class='coin-slider' id='coin-slider-"+el.id+"' />");$('#'+el.id).append("<div class='cs-title' id='cs-title-"+el.id+"' style='position: absolute; bottom:0; left: 0; z-index: 1000;'></div>");$.setFields(el);if(params[el.id].navigation)
13
+ $.setNavigation(el);$.transition(el,0);$.transitionCall(el);}
14
+ $.setFields=function(el){tWidth=sWidth=parseInt(params[el.id].width/params[el.id].spw);tHeight=sHeight=parseInt(params[el.id].height/params[el.id].sph);counter=sLeft=sTop=0;tgapx=gapx=params[el.id].width-params[el.id].spw*sWidth;tgapy=gapy=params[el.id].height-params[el.id].sph*sHeight;for(i=1;i<=params[el.id].sph;i++){gapx=tgapx;if(gapy>0){gapy--;sHeight=tHeight+1;}else{sHeight=tHeight;}
15
+ for(j=1;j<=params[el.id].spw;j++){if(gapx>0){gapx--;sWidth=tWidth+1;}else{sWidth=tWidth;}
16
+ order[el.id][counter]=i+''+j;counter++;if(params[el.id].links)
17
+ $('#'+el.id).append("<a href='"+links[el.id][0]+"' class='cs-"+el.id+"' id='cs-"+el.id+i+j+"' style='width:"+sWidth+"px; height:"+sHeight+"px; float: left; position: absolute;'></a>");else
18
+ $('#'+el.id).append("<div class='cs-"+el.id+"' id='cs-"+el.id+i+j+"' style='width:"+sWidth+"px; height:"+sHeight+"px; float: left; position: absolute;'></div>");$("#cs-"+el.id+i+j).css({'background-position':-sLeft+'px '+(-sTop+'px'),'left':sLeft,'top':sTop});sLeft+=sWidth;}
19
+ sTop+=sHeight;sLeft=0;}
20
+ $('.cs-'+el.id).mouseover(function(){$('#cs-navigation-'+el.id).show();});$('.cs-'+el.id).mouseout(function(){$('#cs-navigation-'+el.id).hide();});$('#cs-title-'+el.id).mouseover(function(){$('#cs-navigation-'+el.id).show();});$('#cs-title-'+el.id).mouseout(function(){$('#cs-navigation-'+el.id).hide();});if(params[el.id].hoverPause){$('.cs-'+el.id).mouseover(function(){params[el.id].pause=true;});$('.cs-'+el.id).mouseout(function(){params[el.id].pause=false;});$('#cs-title-'+el.id).mouseover(function(){params[el.id].pause=true;});$('#cs-title-'+el.id).mouseout(function(){params[el.id].pause=false;});}};$.transitionCall=function(el){clearInterval(interval[el.id]);delay=params[el.id].delay+params[el.id].spw*params[el.id].sph*params[el.id].sDelay;interval[el.id]=setInterval(function(){$.transition(el)},delay);}
21
+ $.transition=function(el,direction){if(params[el.id].pause==true)return;$.effect(el);squarePos[el.id]=0;appInterval[el.id]=setInterval(function(){$.appereance(el,order[el.id][squarePos[el.id]])},params[el.id].sDelay);$(el).css({'background-image':'url('+images[el.id][imagePos[el.id]]+')'});if(typeof(direction)=="undefined")
22
+ imagePos[el.id]++;else
23
+ if(direction=='prev')
24
+ imagePos[el.id]--;else
25
+ imagePos[el.id]=direction;if(imagePos[el.id]==images[el.id].length){imagePos[el.id]=0;}
26
+ if(imagePos[el.id]==-1){imagePos[el.id]=images[el.id].length-1;}
27
+ $('.cs-button-'+el.id).removeClass('cs-active');$('#cs-button-'+el.id+"-"+(imagePos[el.id]+1)).addClass('cs-active');if(titles[el.id][imagePos[el.id]]){$('#cs-title-'+el.id).css({'opacity':0}).animate({'opacity':params[el.id].opacity},params[el.id].titleSpeed);$('#cs-title-'+el.id).html(titles[el.id][imagePos[el.id]]);}else{$('#cs-title-'+el.id).css('opacity',0);}};$.appereance=function(el,sid){$('.cs-'+el.id).attr('href',links[el.id][imagePos[el.id]]).attr('target',linksTarget[el.id][imagePos[el.id]]);if(squarePos[el.id]==params[el.id].spw*params[el.id].sph){clearInterval(appInterval[el.id]);return;}
28
+ $('#cs-'+el.id+sid).css({opacity:0,'background-image':'url('+images[el.id][imagePos[el.id]]+')'});$('#cs-'+el.id+sid).animate({opacity:1},300);squarePos[el.id]++;};$.setNavigation=function(el){$(el).append("<div id='cs-navigation-"+el.id+"'></div>");$('#cs-navigation-'+el.id).hide();$('#cs-navigation-'+el.id).append("<a href='#' id='cs-prev-"+el.id+"' class='cs-prev'>prev</a>");$('#cs-navigation-'+el.id).append("<a href='#' id='cs-next-"+el.id+"' class='cs-next'>next</a>");$('#cs-prev-'+el.id).css({'position':'absolute','top':params[el.id].height/2-15,'left':0,'z-index':1001,'line-height':'30px','opacity':params[el.id].opacity}).click(function(e){e.preventDefault();$.transition(el,'prev');$.transitionCall(el);}).mouseover(function(){$('#cs-navigation-'+el.id).show()});$('#cs-next-'+el.id).css({'position':'absolute','top':params[el.id].height/2-15,'right':0,'z-index':1001,'line-height':'30px','opacity':params[el.id].opacity}).click(function(e){e.preventDefault();$.transition(el);$.transitionCall(el);}).mouseover(function(){$('#cs-navigation-'+el.id).show()});$("<div id='cs-buttons-"+el.id+"' class='cs-buttons'></div>").appendTo($('#coin-slider-'+el.id));for(k=1;k<images[el.id].length+1;k++){$('#cs-buttons-'+el.id).append("<a href='#' class='cs-button-"+el.id+"' id='cs-button-"+el.id+"-"+k+"'>"+k+"</a>");}
29
+ $.each($('.cs-button-'+el.id),function(i,item){$(item).click(function(e){$('.cs-button-'+el.id).removeClass('cs-active');$(this).addClass('cs-active');e.preventDefault();$.transition(el,i);$.transitionCall(el);})});$('#cs-navigation-'+el.id+' a').mouseout(function(){$('#cs-navigation-'+el.id).hide();params[el.id].pause=false;});$("#cs-buttons-"+el.id).css({'left':'50%','margin-left':-images[el.id].length*15/2-5,'position':'relative'});}
30
+ $.effect=function(el){effA=['random','swirl','rain','straight'];if(params[el.id].effect=='')
31
+ eff=effA[Math.floor(Math.random()*(effA.length))];else
32
+ eff=params[el.id].effect;order[el.id]=new Array();if(eff=='random'){counter=0;for(i=1;i<=params[el.id].sph;i++){for(j=1;j<=params[el.id].spw;j++){order[el.id][counter]=i+''+j;counter++;}}
33
+ $.random(order[el.id]);}
34
+ if(eff=='rain'){$.rain(el);}
35
+ if(eff=='swirl')
36
+ $.swirl(el);if(eff=='straight')
37
+ $.straight(el);reverse[el.id]*=-1;if(reverse[el.id]>0){order[el.id].reverse();}}
38
+ $.random=function(arr){var i=arr.length;if(i==0)return false;while(--i){var j=Math.floor(Math.random()*(i+1));var tempi=arr[i];var tempj=arr[j];arr[i]=tempj;arr[j]=tempi;}}
39
+ $.swirl=function(el){var n=params[el.id].sph;var m=params[el.id].spw;var x=1;var y=1;var going=0;var num=0;var c=0;var dowhile=true;while(dowhile){num=(going==0||going==2)?m:n;for(i=1;i<=num;i++){order[el.id][c]=x+''+y;c++;if(i!=num){switch(going){case 0:y++;break;case 1:x++;break;case 2:y--;break;case 3:x--;break;}}}
40
+ going=(going+1)%4;switch(going){case 0:m--;y++;break;case 1:n--;x++;break;case 2:m--;y--;break;case 3:n--;x--;break;}
41
+ check=$.max(n,m)-$.min(n,m);if(m<=check&&n<=check)
42
+ dowhile=false;}}
43
+ $.rain=function(el){var n=params[el.id].sph;var m=params[el.id].spw;var c=0;var to=to2=from=1;var dowhile=true;while(dowhile){for(i=from;i<=to;i++){order[el.id][c]=i+''+parseInt(to2-i+1);c++;}
44
+ to2++;if(to<n&&to2<m&&n<m){to++;}
45
+ if(to<n&&n>=m){to++;}
46
+ if(to2>m){from++;}
47
+ if(from>to)dowhile=false;}}
48
+ $.straight=function(el){counter=0;for(i=1;i<=params[el.id].sph;i++){for(j=1;j<=params[el.id].spw;j++){order[el.id][counter]=i+''+j;counter++;}}}
49
+ $.min=function(n,m){if(n>m)return m;else return n;}
50
+ $.max=function(n,m){if(n<m)return m;else return n;}
51
+ this.each(function(){init(this);});};$.fn.coinslider.defaults={width:565,height:290,spw:7,sph:5,delay:3000,sDelay:30,opacity:0.7,titleSpeed:500,effect:'',navigation:true,links:true,hoverPause:true};})(jQuery);
assets/flexslider/bg_direction_nav.png ADDED
Binary file
assets/flexslider/flexslider.css ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery FlexSlider v2.0
3
+ * http://www.woothemes.com/flexslider/
4
+ *
5
+ * Copyright 2012 WooThemes
6
+ * Free to use under the GPLv2 license.
7
+ * http://www.gnu.org/licenses/gpl-2.0.html
8
+ *
9
+ * Contributing author: Tyler Smith (@mbmufffin)
10
+ */
11
+
12
+
13
+ /* Browser Resets */
14
+ .flex-container a:active,
15
+ .flexslider a:active,
16
+ .flex-container a:focus,
17
+ .flexslider a:focus {outline: none;}
18
+ .slides,
19
+ .flex-control-nav,
20
+ .flex-direction-nav {margin: 0; padding: 0; list-style: none;}
21
+
22
+ /* FlexSlider Necessary Styles
23
+ *********************************/
24
+ .flexslider {margin: 0; padding: 0;}
25
+ .flexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
26
+ .flexslider .slides img {width: 100%; display: block;}
27
+ .flex-pauseplay span {text-transform: capitalize;}
28
+
29
+ /* Clearfix for the .slides element */
30
+ .slides:after {content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
31
+ html[xmlns] .slides {display: block;}
32
+ * html .slides {height: 1%;}
33
+
34
+ /* No JavaScript Fallback */
35
+ /* If you are not using another script, such as Modernizr, make sure you
36
+ * include js that eliminates this class on page load */
37
+ .no-js .slides > li:first-child {display: block;}
38
+
39
+
40
+ /* FlexSlider Default Theme
41
+ *********************************/
42
+ .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;}
43
+ .flex-viewport {max-height: 2000px; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; transition: all 1s ease;}
44
+ .loading .flex-viewport {max-height: 300px;}
45
+ .flexslider .slides {zoom: 1;}
46
+
47
+ .carousel li {margin-right: 5px}
48
+
49
+
50
+ /* Direction Nav */
51
+ .flex-direction-nav {*height: 0;}
52
+ .flex-direction-nav a {width: 30px; height: 30px; margin: -20px 0 0; display: block; background: url(../flexslider/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;}
53
+ .flex-direction-nav .flex-next {background-position: 100% 0; right: -36px; }
54
+ .flex-direction-nav .flex-prev {left: -36px;}
55
+ .flexslider:hover .flex-next {opacity: 0.8; right: 5px;}
56
+ .flexslider:hover .flex-prev {opacity: 0.8; left: 5px;}
57
+ .flexslider:hover .flex-next:hover, .flexslider:hover .flex-prev:hover {opacity: 1;}
58
+ .flex-direction-nav .flex-disabled {opacity: .3!important; filter:alpha(opacity=30); cursor: default;}
59
+
60
+ /* Control Nav */
61
+ .flex-control-nav {width: 100%; position: absolute; bottom: -40px; text-align: center;}
62
+ .flex-control-nav li {margin: 0 6px; display: inline-block; zoom: 1; *display: inline;}
63
+ .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);}
64
+ .flex-control-paging li a:hover { background: #333; background: rgba(0,0,0,0.7); }
65
+ .flex-control-paging li a.flex-active { background: #000; background: rgba(0,0,0,0.9); cursor: default; }
66
+
67
+ .flex-control-thumbs {margin: 5px 0 0; position: static; overflow: hidden;}
68
+ .flex-control-thumbs li {width: 25%; float: left; margin: 0;}
69
+ .flex-control-thumbs img {width: 100%; display: block; opacity: .7; cursor: pointer;}
70
+ .flex-control-thumbs img:hover {opacity: 1;}
71
+ .flex-control-thumbs .flex-active {opacity: 1; cursor: default;}
72
+
73
+ @media screen and (max-width: 860px) {
74
+ .flex-direction-nav .flex-prev {opacity: 1; left: 0;}
75
+ .flex-direction-nav .flex-next {opacity: 1; right: 0;}
76
+ }
assets/flexslider/jquery.flexslider-min.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery FlexSlider v2.1
3
+ * Copyright 2012 WooThemes
4
+ * Contributing Author: Tyler Smith
5
+ */
6
+ ;(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,
7
+ 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();
8
+ 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&&
9
+ (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()},
10
+ 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();
11
+ !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?
12
+ '<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",
13
+ "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"),
14
+ 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="'+
15
+ 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)});
16
+ 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?
17
+ (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+
18
+ "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",
19
+ 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===
20
+ 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),
21
+ 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&&
22
+ !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+
23
+ "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,
24
+ 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,
25
+ 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",
26
+ 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=
27
+ 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&&
28
+ !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===
29
+ 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%",
30
+ "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=
31
+ 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%"),
32
+ 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(),
33
+ 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-
34
+ 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),
35
+ 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():
36
+ 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",
37
+ 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),
38
+ 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);
assets/jquery.tablednd.js ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * TableDnD plug-in for JQuery, allows you to drag and drop table rows
3
+ * You can set up various options to control how the system will work
4
+ * Copyright © Denis Howlett <denish@isocra.com>
5
+ * Licensed like jQuery, see http://docs.jquery.com/License.
6
+ *
7
+ * Configuration options:
8
+ *
9
+ * onDragStyle
10
+ * This is the style that is assigned to the row during drag. There are limitations to the styles that can be
11
+ * associated with a row (such as you can't assign a border—well you can, but it won't be
12
+ * displayed). (So instead consider using onDragClass.) The CSS style to apply is specified as
13
+ * a map (as used in the jQuery css(...) function).
14
+ * onDropStyle
15
+ * This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations
16
+ * to what you can do. Also this replaces the original style, so again consider using onDragClass which
17
+ * is simply added and then removed on drop.
18
+ * onDragClass
19
+ * This class is added for the duration of the drag and then removed when the row is dropped. It is more
20
+ * flexible than using onDragStyle since it can be inherited by the row cells and other content. The default
21
+ * is class is tDnD_whileDrag. So to use the default, simply customise this CSS class in your
22
+ * stylesheet.
23
+ * onDrop
24
+ * Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table
25
+ * and the row that was dropped. You can work out the new order of the rows by using
26
+ * table.rows.
27
+ * onDragStart
28
+ * Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the
29
+ * table and the row which the user has started to drag.
30
+ * onAllowDrop
31
+ * Pass a function that will be called as a row is over another row. If the function returns true, allow
32
+ * dropping on that row, otherwise not. The function takes 2 parameters: the dragged row and the row under
33
+ * the cursor. It returns a boolean: true allows the drop, false doesn't allow it.
34
+ * scrollAmount
35
+ * This is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the
36
+ * window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2,
37
+ * FF3 beta)
38
+ *
39
+ * Other ways to control behaviour:
40
+ *
41
+ * Add class="nodrop" to any rows for which you don't want to allow dropping, and class="nodrag" to any rows
42
+ * that you don't want to be draggable.
43
+ *
44
+ * Inside the onDrop method you can also call $.tableDnD.serialize() this returns a string of the form
45
+ * <tableID>[]=<rowID1>&<tableID>[]=<rowID2> so that you can send this back to the server. The table must have
46
+ * an ID as must all the rows.
47
+ *
48
+ * Known problems:
49
+ * - Auto-scoll has some problems with IE7 (it scrolls even when it shouldn't), work-around: set scrollAmount to 0
50
+ *
51
+ * Version 0.2: 2008-02-20 First public version
52
+ * Version 0.3: 2008-02-07 Added onDragStart option
53
+ * Made the scroll amount configurable (default is 5 as before)
54
+ * Version 0.4: 2008-03-15 Changed the noDrag/noDrop attributes to nodrag/nodrop classes
55
+ * Added onAllowDrop to control dropping
56
+ * Fixed a bug which meant that you couldn't set the scroll amount in both directions
57
+ * Added serialise method
58
+ */
59
+ jQuery.tableDnD = {
60
+ /** Keep hold of the current table being dragged */
61
+ currentTable : null,
62
+ /** Keep hold of the current drag object if any */
63
+ dragObject: null,
64
+ /** The current mouse offset */
65
+ mouseOffset: null,
66
+ /** Remember the old value of Y so that we don't do too much processing */
67
+ oldY: 0,
68
+
69
+ /** Actually build the structure */
70
+ build: function(options) {
71
+ // Make sure options exists
72
+ options = options || {};
73
+ // Set up the defaults if any
74
+
75
+ this.each(function() {
76
+ // Remember the options
77
+ this.tableDnDConfig = {
78
+ onDragStyle: options.onDragStyle,
79
+ onDropStyle: options.onDropStyle,
80
+ // Add in the default class for whileDragging
81
+ onDragClass: options.onDragClass ? options.onDragClass : "tDnD_whileDrag",
82
+ onDrop: options.onDrop,
83
+ onDragStart: options.onDragStart,
84
+ scrollAmount: options.scrollAmount ? options.scrollAmount : 5
85
+ };
86
+ // Now make the rows draggable
87
+ jQuery.tableDnD.makeDraggable(this);
88
+ });
89
+
90
+ // Now we need to capture the mouse up and mouse move event
91
+ // We can use bind so that we don't interfere with other event handlers
92
+ jQuery(document)
93
+ .bind('mousemove', jQuery.tableDnD.mousemove)
94
+ .bind('mouseup', jQuery.tableDnD.mouseup);
95
+
96
+ // Don't break the chain
97
+ return this;
98
+ },
99
+
100
+ /** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */
101
+ makeDraggable: function(table) {
102
+ // Now initialise the rows
103
+ var rows = table.rows; //getElementsByTagName("tr")
104
+ var config = table.tableDnDConfig;
105
+ for (var i=0; i<rows.length; i++) {
106
+ // To make non-draggable rows, add the nodrag class (eg for Category and Header rows)
107
+ // inspired by John Tarr and Famic
108
+ var nodrag = jQuery(rows[i]).hasClass("nodrag");
109
+ if (! nodrag) { //There is no NoDnD attribute on rows I want to drag
110
+ jQuery(rows[i]).mousedown(function(ev) {
111
+ if (ev.target.tagName == "TD") {
112
+ jQuery.tableDnD.dragObject = this;
113
+ jQuery.tableDnD.currentTable = table;
114
+ jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
115
+ if (config.onDragStart) {
116
+ // Call the onDrop method if there is one
117
+ config.onDragStart(table, this);
118
+ }
119
+ return false;
120
+ }
121
+ }).css("cursor", "move"); // Store the tableDnD object
122
+ }
123
+ }
124
+ },
125
+
126
+ /** Get the mouse coordinates from the event (allowing for browser differences) */
127
+ mouseCoords: function(ev){
128
+ if(ev.pageX || ev.pageY){
129
+ return {x:ev.pageX, y:ev.pageY};
130
+ }
131
+ return {
132
+ x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
133
+ y:ev.clientY + document.body.scrollTop - document.body.clientTop
134
+ };
135
+ },
136
+
137
+ /** Given a target element and a mouse event, get the mouse offset from that element.
138
+ To do this we need the element's position and the mouse position */
139
+ getMouseOffset: function(target, ev) {
140
+ ev = ev || window.event;
141
+
142
+ var docPos = this.getPosition(target);
143
+ var mousePos = this.mouseCoords(ev);
144
+ return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
145
+ },
146
+
147
+ /** Get the position of an element by going up the DOM tree and adding up all the offsets */
148
+ getPosition: function(e){
149
+ var left = 0;
150
+ var top = 0;
151
+ /** Safari fix -- thanks to Luis Chato for this! */
152
+ if (e.offsetHeight == 0) {
153
+ /** Safari 2 doesn't correctly grab the offsetTop of a table row
154
+ this is detailed here:
155
+ http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/
156
+ the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild.
157
+ note that firefox will return a text node as a first child, so designing a more thorough
158
+ solution may need to take that into account, for now this seems to work in firefox, safari, ie */
159
+ e = e.firstChild; // a table cell
160
+ }
161
+
162
+ while (e.offsetParent){
163
+ left += e.offsetLeft;
164
+ top += e.offsetTop;
165
+ e = e.offsetParent;
166
+ }
167
+
168
+ left += e.offsetLeft;
169
+ top += e.offsetTop;
170
+
171
+ return {x:left, y:top};
172
+ },
173
+
174
+ mousemove: function(ev) {
175
+ if (jQuery.tableDnD.dragObject == null) {
176
+ return;
177
+ }
178
+
179
+ var dragObj = jQuery(jQuery.tableDnD.dragObject);
180
+ var config = jQuery.tableDnD.currentTable.tableDnDConfig;
181
+ var mousePos = jQuery.tableDnD.mouseCoords(ev);
182
+ var y = mousePos.y - jQuery.tableDnD.mouseOffset.y;
183
+ //auto scroll the window
184
+ var yOffset = window.pageYOffset;
185
+ if (document.all) {
186
+ // Windows version
187
+ //yOffset=document.body.scrollTop;
188
+ if (typeof document.compatMode != 'undefined' &&
189
+ document.compatMode != 'BackCompat') {
190
+ yOffset = document.documentElement.scrollTop;
191
+ }
192
+ else if (typeof document.body != 'undefined') {
193
+ yOffset=document.body.scrollTop;
194
+ }
195
+
196
+ }
197
+
198
+ if (mousePos.y-yOffset < config.scrollAmount) {
199
+ window.scrollBy(0, -config.scrollAmount);
200
+ } else {
201
+ var windowHeight = window.innerHeight ? window.innerHeight
202
+ : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
203
+ if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) {
204
+ window.scrollBy(0, config.scrollAmount);
205
+ }
206
+ }
207
+
208
+
209
+ if (y != jQuery.tableDnD.oldY) {
210
+ // work out if we're going up or down...
211
+ var movingDown = y > jQuery.tableDnD.oldY;
212
+ // update the old value
213
+ jQuery.tableDnD.oldY = y;
214
+ // update the style to show we're dragging
215
+ if (config.onDragClass) {
216
+ dragObj.addClass(config.onDragClass);
217
+ } else {
218
+ dragObj.css(config.onDragStyle);
219
+ }
220
+ // If we're over a row then move the dragged row to there so that the user sees the
221
+ // effect dynamically
222
+ var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y);
223
+ if (currentRow) {
224
+ // TODO worry about what happens when there are multiple TBODIES
225
+ if (movingDown && jQuery.tableDnD.dragObject != currentRow) {
226
+ jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling);
227
+ } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) {
228
+ jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow);
229
+ }
230
+ }
231
+ }
232
+
233
+ return false;
234
+ },
235
+
236
+ /** We're only worried about the y position really, because we can only move rows up and down */
237
+ findDropTargetRow: function(draggedRow, y) {
238
+ var rows = jQuery.tableDnD.currentTable.rows;
239
+ for (var i=0; i<rows.length; i++) {
240
+ var row = rows[i];
241
+ var rowY = this.getPosition(row).y;
242
+ var rowHeight = parseInt(row.offsetHeight)/2;
243
+ if (row.offsetHeight == 0) {
244
+ rowY = this.getPosition(row.firstChild).y;
245
+ rowHeight = parseInt(row.firstChild.offsetHeight)/2;
246
+ }
247
+ // Because we always have to insert before, we need to offset the height a bit
248
+ if ((y > rowY - rowHeight) && (y < (rowY + rowHeight))) {
249
+ // that's the row we're over
250
+ // If it's the same as the current row, ignore it
251
+ if (row == draggedRow) {return null;}
252
+ var config = jQuery.tableDnD.currentTable.tableDnDConfig;
253
+ if (config.onAllowDrop) {
254
+ if (config.onAllowDrop(draggedRow, row)) {
255
+ return row;
256
+ } else {
257
+ return null;
258
+ }
259
+ } else {
260
+ // If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic)
261
+ var nodrop = jQuery(row).hasClass("nodrop");
262
+ if (! nodrop) {
263
+ return row;
264
+ } else {
265
+ return null;
266
+ }
267
+ }
268
+ return row;
269
+ }
270
+ }
271
+ return null;
272
+ },
273
+
274
+ mouseup: function(e) {
275
+ if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) {
276
+ var droppedRow = jQuery.tableDnD.dragObject;
277
+ var config = jQuery.tableDnD.currentTable.tableDnDConfig;
278
+ // If we have a dragObject, then we need to release it,
279
+ // The row will already have been moved to the right place so we just reset stuff
280
+ if (config.onDragClass) {
281
+ jQuery(droppedRow).removeClass(config.onDragClass);
282
+ } else {
283
+ jQuery(droppedRow).css(config.onDropStyle);
284
+ }
285
+ jQuery.tableDnD.dragObject = null;
286
+ if (config.onDrop) {
287
+ // Call the onDrop method if there is one
288
+ config.onDrop(jQuery.tableDnD.currentTable, droppedRow);
289
+ }
290
+ jQuery.tableDnD.currentTable = null; // let go of the table too
291
+ }
292
+ },
293
+
294
+ serialize: function() {
295
+ if (jQuery.tableDnD.currentTable) {
296
+ var result = "";
297
+ var tableId = jQuery.tableDnD.currentTable.id;
298
+ var rows = jQuery.tableDnD.currentTable.rows;
299
+ for (var i=0; i<rows.length; i++) {
300
+ if (result.length > 0) result += "&";
301
+ result += tableId + '[]=' + rows[i].id;
302
+ }
303
+ return result;
304
+ } else {
305
+ return "Error: No Table id set, you need to set an id on your table and every row";
306
+ }
307
+ }
308
+ }
309
+
310
+ jQuery.fn.extend(
311
+ {
312
+ tableDnD : jQuery.tableDnD.build
313
+ }
314
+ );
assets/matchalabs.png ADDED
Binary file
assets/ml-slider-admin.css ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ml-slider tr.slide textarea {
2
+ width: 100%;
3
+ height: 75px;
4
+ }
5
+
6
+ .ml-slider tr.slide input {
7
+ width: 100%;
8
+ }
9
+ .ml-slider .delete-slide {
10
+ position: relative;
11
+ top: 0px;
12
+ left: 0px;
13
+ background: #EE2C2C;
14
+ color: white;
15
+ width: 16px;
16
+ height: 16px;
17
+ float: left;
18
+ text-align: center;
19
+ }
20
+
21
+ .ml-slider .slider-wrap {
22
+ border-left: 1px solid #ccc;
23
+ border-right: 1px solid #ccc;
24
+ border-bottom: 1px solid #ccc;
25
+ width: 100%;
26
+ float: left;
27
+ }
28
+
29
+ .ml-slider .slider-lib {
30
+ float: left;
31
+ width: 23%;
32
+ margin: 1%;
33
+ list-style-type: none;
34
+ text-align: center;
35
+ }
36
+
37
+ .ml-slider .tooltip {
38
+ font-size: 0.8em;
39
+ }
40
+
41
+ .ml-slider .settings td {
42
+ font-size: 0.9em;
43
+ }
44
+
45
+ .ml-slider .slider-lib label {
46
+ color: white;
47
+ border-radius: 10%;
48
+ font-size: 0.8em;
49
+ float: left;
50
+ width: 100%;
51
+ padding: 10px 0px;
52
+ vertical-align: bottom;
53
+ }
54
+
55
+ .ml-slider .slider-lib.nivo label {
56
+ background: #b6e026; /* Old browsers */
57
+ background: -moz-linear-gradient(top, #b6e026 0%, #abdc28 100%); /* FF3.6+ */
58
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b6e026), color-stop(100%,#abdc28)); /* Chrome,Safari4+ */
59
+ background: -webkit-linear-gradient(top, #b6e026 0%,#abdc28 100%); /* Chrome10+,Safari5.1+ */
60
+ background: -o-linear-gradient(top, #b6e026 0%,#abdc28 100%); /* Opera 11.10+ */
61
+ background: -ms-linear-gradient(top, #b6e026 0%,#abdc28 100%); /* IE10+ */
62
+ background: linear-gradient(to bottom, #b6e026 0%,#abdc28 100%); /* W3C */
63
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b6e026', endColorstr='#abdc28',GradientType=0 ); /* IE6-9 */
64
+ }
65
+ .ml-slider .slider-lib.flex label {
66
+ background: #00b7ea; /* Old browsers */
67
+ background: -moz-linear-gradient(top, #00b7ea 0%, #009ec3 100%); /* FF3.6+ */
68
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#00b7ea), color-stop(100%,#009ec3)); /* Chrome,Safari4+ */
69
+ background: -webkit-linear-gradient(top, #00b7ea 0%,#009ec3 100%); /* Chrome10+,Safari5.1+ */
70
+ background: -o-linear-gradient(top, #00b7ea 0%,#009ec3 100%); /* Opera 11.10+ */
71
+ background: -ms-linear-gradient(top, #00b7ea 0%,#009ec3 100%); /* IE10+ */
72
+ background: linear-gradient(to bottom, #00b7ea 0%,#009ec3 100%); /* W3C */
73
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00b7ea', endColorstr='#009ec3',GradientType=0 ); /* IE6-9 */
74
+ }
75
+
76
+ .ml-slider .slider-lib.coin label {
77
+ background: #ffd65e; /* Old browsers */
78
+ background: -moz-linear-gradient(top, #ffd65e 0%, #febf04 100%); /* FF3.6+ */
79
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffd65e), color-stop(100%,#febf04)); /* Chrome,Safari4+ */
80
+ background: -webkit-linear-gradient(top, #ffd65e 0%,#febf04 100%); /* Chrome10+,Safari5.1+ */
81
+ background: -o-linear-gradient(top, #ffd65e 0%,#febf04 100%); /* Opera 11.10+ */
82
+ background: -ms-linear-gradient(top, #ffd65e 0%,#febf04 100%); /* IE10+ */
83
+ background: linear-gradient(to bottom, #ffd65e 0%,#febf04 100%); /* W3C */
84
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffd65e', endColorstr='#febf04',GradientType=0 ); /* IE6-9 */
85
+ }
86
+
87
+ .ml-slider .slider-lib.responsive label {
88
+ background: #959595; /* Old browsers */
89
+ background: -moz-linear-gradient(top, #959595 0%, #0d0d0d 46%, #010101 50%, #0a0a0a 53%, #4e4e4e 76%, #383838 87%, #1b1b1b 100%); /* FF3.6+ */
90
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#959595), color-stop(46%,#0d0d0d), color-stop(50%,#010101), color-stop(53%,#0a0a0a), color-stop(76%,#4e4e4e), color-stop(87%,#383838), color-stop(100%,#1b1b1b)); /* Chrome,Safari4+ */
91
+ background: -webkit-linear-gradient(top, #959595 0%,#0d0d0d 46%,#010101 50%,#0a0a0a 53%,#4e4e4e 76%,#383838 87%,#1b1b1b 100%); /* Chrome10+,Safari5.1+ */
92
+ background: -o-linear-gradient(top, #959595 0%,#0d0d0d 46%,#010101 50%,#0a0a0a 53%,#4e4e4e 76%,#383838 87%,#1b1b1b 100%); /* Opera 11.10+ */
93
+ background: -ms-linear-gradient(top, #959595 0%,#0d0d0d 46%,#010101 50%,#0a0a0a 53%,#4e4e4e 76%,#383838 87%,#1b1b1b 100%); /* IE10+ */
94
+ background: linear-gradient(to bottom, #959595 0%,#0d0d0d 46%,#010101 50%,#0a0a0a 53%,#4e4e4e 76%,#383838 87%,#1b1b1b 100%); /* W3C */
95
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#959595', endColorstr='#1b1b1b',GradientType=0 ); /* IE6-9 */
96
+ }
97
+
assets/ml-slider-display.css ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ml-slider .flexslider,
2
+ .ml-slider .flexslider ul,
3
+ .ml-slider .flexslider .slides li,
4
+ .ml-slider .flexslider .slides ul,
5
+ .ml-slider .flexslider .slides ol,
6
+ .ml-slider .flexslider .flex-direction-nav,
7
+ .ml-slider .rslides li,
8
+ .ml-slider .rslides .rslides_tabs {
9
+ border: 0;
10
+ margin: 0;
11
+ list-style-type: none;
12
+ }
13
+ .ml-slider .flexslider .slides p {
14
+ margin: 0;
15
+ }
16
+ .ml-slider .flexslider .flex-control-nav {
17
+ position: inherit;
18
+ bottom: auto;
19
+ }
20
+ .ml-slider .rslides_tabs {
21
+ margin: 0;
22
+ padding: 7px 0 !important;
23
+ background: #333;
24
+ box-shadow: 0 0 1px rgba(255,255,255,.3), inset 0 0 5px rgba(0,0,0,1.0);
25
+ -moz-box-shadow: 0 0 1px rgba(255,255,255,.3), inset 0 0 5px rgba(0,0,0,1.0);
26
+ -webkit-box-shadow: 0 0 1px rgba(255,255,255,.3), inset 0 0 5px rgba(0,0,0,1.0);
27
+ font-size: 18px;
28
+ list-style: none;
29
+ margin: 0 auto 50px;
30
+ padding: 10px 0;
31
+ text-align: center;
32
+ width: 100%;
33
+ }
34
+ .ml-slider .rslides_tabs li {
35
+ margin: 0;
36
+ padding: 0;
37
+ display: inline;
38
+ float: none;
39
+ margin-right: 1px;
40
+ list-style-type: none;
41
+ }
42
+ .ml-slider .rslides_tabs a {
43
+ text-decoration: none;
44
+ width: auto;
45
+ line-height: 20px;
46
+ padding: 9px 20px;
47
+ height: auto;
48
+ background: transparent;
49
+ display: inline;
50
+ }
51
+ .ml-slider .rslides_tabs a:hover {
52
+ border: 0;
53
+ color: white;
54
+ }
55
+
56
+ .ml-slider .rslides_tabs li:first-child {
57
+ margin-left: 0;
58
+ }
59
+ .ml-slider .rslides_tabs .rslides_here a {
60
+ background: rgba(255,255,255,.1);
61
+ color: #fff;
62
+ font-weight: bold;
63
+ }
64
+ .ml-slider-responsive {
65
+ position: relative;
66
+ }
67
+ .ml-slider .rslides_nav {
68
+ background-color: #000000;
69
+ color: #FFFFFF;
70
+ padding: 0px 10px;
71
+ position:absolute;
72
+ top:45%;
73
+ z-index:9;
74
+ cursor:pointer;
75
+ }
76
+ .ml-slider .rslides_nav.prev {
77
+ left:0px;
78
+ }
79
+ .ml-slider .rslides_nav.next {
80
+ right:0px;
81
+ }
assets/ml-slider.js ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Ml SLider
3
+ */
4
+ (function ($) {
5
+ $(function () {
6
+ /**
7
+ * Reindex the slides after they have been dragged/dropped
8
+ */
9
+ var updateSlideOrder = function() {
10
+ $('.ml-slider table.sortable tr').each(function() {
11
+ $('input.menu_order', $(this)).val($(this).index());
12
+ });
13
+ }
14
+
15
+ /**
16
+ * Enable the correct options for this slider type
17
+ */
18
+ var enableOptions = function(slider) {
19
+ $('.ml-slider .option:not(.' + slider + ')').attr('disabled', 'disabled').css('color','#ccc').parents('tr').hide();
20
+ $('.ml-slider .option.' + slider).removeAttr('disabled').css('color','').parents('tr').show();
21
+
22
+ if ($('.effect option:selected').attr('disabled') == 'disabled') {
23
+ $('.effect option:enabled:first').attr('selected', 'selected');
24
+ }
25
+ }
26
+
27
+ /**
28
+ * Enable the correct options on page load
29
+ */
30
+ enableOptions($('.ml-slider .select-slider:checked').attr('rel'));
31
+
32
+ /**
33
+ * Handle slide libary switching
34
+ */
35
+ $('.ml-slider .select-slider').click(function() {
36
+ enableOptions($(this).attr('rel'));
37
+ });
38
+
39
+ /**
40
+ * Enable drag and drop table rows for slides
41
+ */
42
+ $(".ml-slider table.sortable").tableDnD({
43
+ onDrop: function() {
44
+ updateSlideOrder()
45
+ }
46
+ });
47
+
48
+ $(".confirm").click(function() {
49
+ return confirm("Are you sure?");
50
+ });
51
+
52
+ /**
53
+ * Helptext tooltips
54
+ */
55
+ $(".ml-slider .tooltip").tipsy({html: true, fade: true, gravity: 'e'});
56
+ $(".ml-slider .tooltiptop").tipsy({html: true, fade: true, gravity: 'se'});
57
+
58
+ /**
59
+ * Image uploader
60
+ */
61
+ var file_frame;
62
+
63
+ jQuery('.upload_image_button').live('click', function( event ){
64
+ event.preventDefault();
65
+
66
+ // If the media frame already exists, reopen it.
67
+ if ( file_frame ) {
68
+ file_frame.open();
69
+ return;
70
+ }
71
+
72
+ // Create the media frame.
73
+
74
+ file_frame = wp.media.frames.file_frame = wp.media({
75
+ title: jQuery( this ).data( 'uploader_title' ),
76
+ button: {
77
+ text: jQuery( this ).data( 'uploader_button_text' ),
78
+ },
79
+ multiple: false
80
+ });
81
+
82
+ // When an image is selected, run a callback.
83
+ file_frame.on( 'select', function() {
84
+ attachment = file_frame.state().get('selection').first().toJSON();
85
+
86
+ var tableRow = "<tr class='slide'><td>" +
87
+ "<div style='position: absolute'>" +
88
+ "<a class='delete-slide confirm' href='?page=ml-slider&id=438'>x</a> " +
89
+ "</div>" +
90
+ "<img src='" + attachment.sizes.thumbnail.url + "' width='150px'></td><td> " +
91
+ "<textarea name='attachment[" + attachment.id + "][post_excerpt]' placeholder='Caption'>" + attachment.caption + "</textarea>" +
92
+ "<input type='text' name='attachment[" + attachment.id + "][url]' placeholder='URL'>" +
93
+ "<input type='hidden' class='menu_order' name='attachment[" + attachment.id + "][menu_order]' value='100'>" +
94
+ "</td></tr>";
95
+
96
+ jQuery(".ml-slider .slides tbody").append(tableRow);
97
+
98
+ // reindex the slides
99
+ updateSlideOrder();
100
+
101
+ $(".ml-slider table.sortable").tableDnD({
102
+ onDrop: function() {
103
+ updateSlideOrder()
104
+ }
105
+ });
106
+ });
107
+
108
+ file_frame.open();
109
+ });
110
+ });
111
+ }(jQuery));
assets/nivoslider/jquery.nivo.slider.pack.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery Nivo Slider v3.2
3
+ * http://nivo.dev7studios.com
4
+ *
5
+ * Copyright 2012, Dev7studios
6
+ * Free to use and abuse under the MIT license.
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ */
9
+
10
+ (function(e){var t=function(t,n){var r=e.extend({},e.fn.nivoSlider.defaults,n);var i={currentSlide:0,currentImage:"",totalSlides:0,running:false,paused:false,stop:false,controlNavEl:false};var s=e(t);s.data("nivo:vars",i).addClass("nivoSlider");var o=s.children();o.each(function(){var t=e(this);var n="";if(!t.is("img")){if(t.is("a")){t.addClass("nivo-imageLink");n=t}t=t.find("img:first")}var r=r===0?t.attr("width"):t.width(),s=s===0?t.attr("height"):t.height();if(n!==""){n.css("display","none")}t.css("display","none");i.totalSlides++});if(r.randomStart){r.startSlide=Math.floor(Math.random()*i.totalSlides)}if(r.startSlide>0){if(r.startSlide>=i.totalSlides){r.startSlide=i.totalSlides-1}i.currentSlide=r.startSlide}if(e(o[i.currentSlide]).is("img")){i.currentImage=e(o[i.currentSlide])}else{i.currentImage=e(o[i.currentSlide]).find("img:first")}if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}var u=e("<img/>").addClass("nivo-main-image");u.attr("src",i.currentImage.attr("src")).show();s.append(u);e(window).resize(function(){s.children("img").width(s.width());u.attr("src",i.currentImage.attr("src"));u.stop().height("auto");e(".nivo-slice").remove();e(".nivo-box").remove()});s.append(e('<div class="nivo-caption"></div>'));var a=function(t){var n=e(".nivo-caption",s);if(i.currentImage.attr("title")!=""&&i.currentImage.attr("title")!=undefined){var r=i.currentImage.attr("title");if(r.substr(0,1)=="#")r=e(r).html();if(n.css("display")=="block"){setTimeout(function(){n.html(r)},t.animSpeed)}else{n.html(r);n.stop().fadeIn(t.animSpeed)}}else{n.stop().fadeOut(t.animSpeed)}};a(r);var f=0;if(!r.manualAdvance&&o.length>1){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}if(r.directionNav){s.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+r.prevText+'</a><a class="nivo-nextNav">'+r.nextText+"</a></div>");e(s).on("click","a.nivo-prevNav",function(){if(i.running){return false}clearInterval(f);f="";i.currentSlide-=2;d(s,o,r,"prev")});e(s).on("click","a.nivo-nextNav",function(){if(i.running){return false}clearInterval(f);f="";d(s,o,r,"next")})}if(r.controlNav){i.controlNavEl=e('<div class="nivo-controlNav"></div>');s.after(i.controlNavEl);for(var l=0;l<o.length;l++){if(r.controlNavThumbs){i.controlNavEl.addClass("nivo-thumbs-enabled");var c=o.eq(l);if(!c.is("img")){c=c.find("img:first")}if(c.attr("data-thumb"))i.controlNavEl.append('<a class="nivo-control" rel="'+l+'"><img src="'+c.attr("data-thumb")+'" alt="" /></a>')}else{i.controlNavEl.append('<a class="nivo-control" rel="'+l+'">'+(l+1)+"</a>")}}e("a:eq("+i.currentSlide+")",i.controlNavEl).addClass("active");e("a",i.controlNavEl).bind("click",function(){if(i.running)return false;if(e(this).hasClass("active"))return false;clearInterval(f);f="";u.attr("src",i.currentImage.attr("src"));i.currentSlide=e(this).attr("rel")-1;d(s,o,r,"control")})}if(r.pauseOnHover){s.hover(function(){i.paused=true;clearInterval(f);f=""},function(){i.paused=false;if(f===""&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}})}s.bind("nivo:animFinished",function(){u.attr("src",i.currentImage.attr("src"));i.running=false;e(o).each(function(){if(e(this).is("a")){e(this).css("display","none")}});if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}if(f===""&&!i.paused&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}r.afterChange.call(this)});var h=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().is("a")?e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().height():e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height();for(var s=0;s<n.slices;s++){var o=Math.round(t.width()/n.slices);if(s===n.slices-1){t.append(e('<div class="nivo-slice" name="'+s+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block !important; top:0; left:-"+(o+s*o-o)+'px;" /></div>').css({left:o*s+"px",width:t.width()-o*s+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}else{t.append(e('<div class="nivo-slice" name="'+s+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block !important; top:0; left:-"+(o+s*o-o)+'px;" /></div>').css({left:o*s+"px",width:o+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}}e(".nivo-slice",t).height(i);u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var p=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=Math.round(t.width()/n.boxCols),s=Math.round(e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height()/n.boxRows);for(var o=0;o<n.boxRows;o++){for(var a=0;a<n.boxCols;a++){if(a===n.boxCols-1){t.append(e('<div class="nivo-box" name="'+a+'" rel="'+o+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block; top:-"+s*o+"px; left:-"+i*a+'px;" /></div>').css({opacity:0,left:i*a+"px",top:s*o+"px",width:t.width()-i*a+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}else{t.append(e('<div class="nivo-box" name="'+a+'" rel="'+o+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block; top:-"+s*o+"px; left:-"+i*a+'px;" /></div>').css({opacity:0,left:i*a+"px",top:s*o+"px",width:i+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}}}u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var d=function(t,n,r,i){var s=t.data("nivo:vars");if(s&&s.currentSlide===s.totalSlides-1){r.lastSlide.call(this)}if((!s||s.stop)&&!i){return false}r.beforeChange.call(this);if(!i){u.attr("src",s.currentImage.attr("src"))}else{if(i==="prev"){u.attr("src",s.currentImage.attr("src"))}if(i==="next"){u.attr("src",s.currentImage.attr("src"))}}s.currentSlide++;if(s.currentSlide===s.totalSlides){s.currentSlide=0;r.slideshowEnd.call(this)}if(s.currentSlide<0){s.currentSlide=s.totalSlides-1}if(e(n[s.currentSlide]).is("img")){s.currentImage=e(n[s.currentSlide])}else{s.currentImage=e(n[s.currentSlide]).find("img:first")}if(r.controlNav){e("a",s.controlNavEl).removeClass("active");e("a:eq("+s.currentSlide+")",s.controlNavEl).addClass("active")}a(r);e(".nivo-slice",t).remove();e(".nivo-box",t).remove();var o=r.effect,f="";if(r.effect==="random"){f=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade","boxRandom","boxRain","boxRainReverse","boxRainGrow","boxRainGrowReverse");o=f[Math.floor(Math.random()*(f.length+1))];if(o===undefined){o="fade"}}if(r.effect.indexOf(",")!==-1){f=r.effect.split(",");o=f[Math.floor(Math.random()*f.length)];if(o===undefined){o="fade"}}if(s.currentImage.attr("data-transition")){o=s.currentImage.attr("data-transition")}s.running=true;var l=0,c=0,d="",m="",g="",y="";if(o==="sliceDown"||o==="sliceDownRight"||o==="sliceDownLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({top:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUp"||o==="sliceUpRight"||o==="sliceUpLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceUpLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({bottom:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUpDown"||o==="sliceUpDownRight"||o==="sliceUpDownLeft"){h(t,r,s);l=0;c=0;var b=0;d=e(".nivo-slice",t);if(o==="sliceUpDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);if(c===0){n.css("top","0px");c++}else{n.css("bottom","0px");c=0}if(b===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;b++})}else if(o==="fold"){h(t,r,s);l=0;c=0;e(".nivo-slice",t).each(function(){var n=e(this);var i=n.width();n.css({top:"0px",width:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="fade"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:t.width()+"px"});m.animate({opacity:"1.0"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInRight"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInLeft"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1",left:"",right:"0px"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){m.css({left:"0px",right:""});t.trigger("nivo:animFinished")})}else if(o==="boxRandom"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;y=v(e(".nivo-box",t));y.each(function(){var n=e(this);if(c===g-1){setTimeout(function(){n.animate({opacity:"1"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1"},r.animSpeed)},100+l)}l+=20;c++})}else if(o==="boxRain"||o==="boxRainReverse"||o==="boxRainGrow"||o==="boxRainGrowReverse"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;var w=0;var E=0;var S=[];S[w]=[];y=e(".nivo-box",t);if(o==="boxRainReverse"||o==="boxRainGrowReverse"){y=e(".nivo-box",t)._reverse()}y.each(function(){S[w][E]=e(this);E++;if(E===r.boxCols){w++;E=0;S[w]=[]}});for(var x=0;x<r.boxCols*2;x++){var T=x;for(var N=0;N<r.boxRows;N++){if(T>=0&&T<r.boxCols){(function(n,i,s,u,a){var f=e(S[n][i]);var l=f.width();var c=f.height();if(o==="boxRainGrow"||o==="boxRainGrowReverse"){f.width(0).height(0)}if(u===a-1){setTimeout(function(){f.animate({opacity:"1",width:l,height:c},r.animSpeed/1.3,"",function(){t.trigger("nivo:animFinished")})},100+s)}else{setTimeout(function(){f.animate({opacity:"1",width:l,height:c},r.animSpeed/1.3)},100+s)}})(N,T,l,c,g);c++}T--}l+=100}}};var v=function(e){for(var t,n,r=e.length;r;t=parseInt(Math.random()*r,10),n=e[--r],e[r]=e[t],e[t]=n);return e};var m=function(e){if(this.console&&typeof console.log!=="undefined"){console.log(e)}};this.stop=function(){if(!e(t).data("nivo:vars").stop){e(t).data("nivo:vars").stop=true;m("Stop Slider")}};this.start=function(){if(e(t).data("nivo:vars").stop){e(t).data("nivo:vars").stop=false;m("Start Slider")}};r.afterLoad.call(this);return this};e.fn.nivoSlider=function(n){return this.each(function(r,i){var s=e(this);if(s.data("nivoslider")){return s.data("nivoslider")}var o=new t(this,n);s.data("nivoslider",o)})};e.fn.nivoSlider.defaults={effect:"random",slices:15,boxCols:8,boxRows:4,animSpeed:500,pauseTime:3e3,startSlide:0,directionNav:true,controlNav:true,controlNavThumbs:false,pauseOnHover:true,manualAdvance:false,prevText:"Prev",nextText:"Next",randomStart:false,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};e.fn._reverse=[].reverse})(jQuery)
assets/nivoslider/nivo-slider.css ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery Nivo Slider v3.2
3
+ * http://nivo.dev7studios.com
4
+ *
5
+ * Copyright 2012, Dev7studios
6
+ * Free to use and abuse under the MIT license.
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ */
9
+
10
+ /* The Nivo Slider styles */
11
+ .nivoSlider {
12
+ position:relative;
13
+ width:100%;
14
+ height:auto;
15
+ overflow: hidden;
16
+ }
17
+ .nivoSlider img {
18
+ position:absolute;
19
+ top:0px;
20
+ left:0px;
21
+ max-width: none;
22
+ }
23
+ .nivo-main-image {
24
+ display: block !important;
25
+ position: relative !important;
26
+ width: 100% !important;
27
+ }
28
+
29
+ /* If an image is wrapped in a link */
30
+ .nivoSlider a.nivo-imageLink {
31
+ position:absolute;
32
+ top:0px;
33
+ left:0px;
34
+ width:100%;
35
+ height:100%;
36
+ border:0;
37
+ padding:0;
38
+ margin:0;
39
+ z-index:6;
40
+ display:none;
41
+ background:white;
42
+ filter:alpha(opacity=0);
43
+ opacity:0;
44
+ }
45
+ /* The slices and boxes in the Slider */
46
+ .nivo-slice {
47
+ display:block;
48
+ position:absolute;
49
+ z-index:5;
50
+ height:100%;
51
+ top:0;
52
+ }
53
+ .nivo-box {
54
+ display:block;
55
+ position:absolute;
56
+ z-index:5;
57
+ overflow:hidden;
58
+ }
59
+ .nivo-box img { display:block; }
60
+
61
+ /* Caption styles */
62
+ .nivo-caption {
63
+ position:absolute;
64
+ left:0px;
65
+ bottom:0px;
66
+ background:#000;
67
+ color:#fff;
68
+ width:100%;
69
+ z-index:8;
70
+ padding: 5px 10px;
71
+ opacity: 0.8;
72
+ overflow: hidden;
73
+ display: none;
74
+ -moz-opacity: 0.8;
75
+ filter:alpha(opacity=8);
76
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
77
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
78
+ box-sizing: border-box; /* Opera/IE 8+ */
79
+ }
80
+ .nivo-caption p {
81
+ padding:5px;
82
+ margin:0;
83
+ }
84
+ .nivo-caption a {
85
+ display:inline !important;
86
+ }
87
+ .nivo-html-caption {
88
+ display:none;
89
+ }
90
+ /* Direction nav styles (e.g. Next & Prev) */
91
+ .nivo-directionNav a {
92
+ position:absolute;
93
+ top:45%;
94
+ z-index:9;
95
+ cursor:pointer;
96
+ }
97
+ .nivo-prevNav {
98
+ left:0px;
99
+ }
100
+ .nivo-nextNav {
101
+ right:0px;
102
+ }
103
+ /* Control nav styles (e.g. 1,2,3...) */
104
+ .nivo-controlNav {
105
+ text-align:center;
106
+ padding: 15px 0;
107
+ }
108
+ .nivo-controlNav a {
109
+ cursor:pointer;
110
+ }
111
+ .nivo-controlNav a.active {
112
+ font-weight:bold;
113
+ }
assets/nivoslider/themes/bar/arrows.png ADDED
Binary file
assets/nivoslider/themes/bar/bar.css ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Skin Name: Nivo Slider Bar Theme
3
+ Skin URI: http://nivo.dev7studios.com
4
+ Description: The bottom bar skin for the Nivo Slider.
5
+ Version: 1.0
6
+ Author: Gilbert Pellegrom
7
+ Author URI: http://dev7studios.com
8
+ Supports Thumbs: false
9
+ */
10
+
11
+ .theme-bar.slider-wrapper {
12
+ position: relative;
13
+ border: 1px solid #333;
14
+ overflow: hidden;
15
+ }
16
+ .theme-bar .nivoSlider {
17
+ position:relative;
18
+ background:#fff url(loading.gif) no-repeat 50% 50%;
19
+ }
20
+ .theme-bar .nivoSlider img {
21
+ position:absolute;
22
+ top:0px;
23
+ left:0px;
24
+ display:none;
25
+ }
26
+ .theme-bar .nivoSlider a {
27
+ border:0;
28
+ display:block;
29
+ }
30
+
31
+ .theme-bar .nivo-controlNav {
32
+ position: absolute;
33
+ left: 0;
34
+ bottom: -41px;
35
+ z-index: 10;
36
+ width: 100%;
37
+ height: 30px;
38
+ text-align: center;
39
+ padding: 5px 0;
40
+ border-top: 1px solid #333;
41
+ background: #333;
42
+ background: -moz-linear-gradient(top, #565656 0%, #333333 100%); /* FF3.6+ */
43
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#565656), color-stop(100%,#333333)); /* Chrome,Safari4+ */
44
+ background: -webkit-linear-gradient(top, #565656 0%,#333333 100%); /* Chrome10+,Safari5.1+ */
45
+ background: -o-linear-gradient(top, #565656 0%,#333333 100%); /* Opera 11.10+ */
46
+ background: -ms-linear-gradient(top, #565656 0%,#333333 100%); /* IE10+ */
47
+ background: linear-gradient(to bottom, #565656 0%,#333333 100%); /* W3C */
48
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#565656', endColorstr='#333333',GradientType=0 ); /* IE6-9 */
49
+ opacity: 0.5;
50
+ -webkit-transition: all 200ms ease-in-out;
51
+ -moz-transition: all 200ms ease-in-out;
52
+ -o-transition: all 200ms ease-in-out;
53
+ transition: all 200ms ease-in-out;
54
+ }
55
+ .theme-bar:hover .nivo-controlNav {
56
+ bottom: 0;
57
+ opacity: 1;
58
+ }
59
+ .theme-bar .nivo-controlNav a {
60
+ display:inline-block;
61
+ width:22px;
62
+ height:22px;
63
+ background:url(bullets.png) no-repeat;
64
+ text-indent:-9999px;
65
+ border:0;
66
+ margin: 5px 2px 0 2px;
67
+ }
68
+ .theme-bar .nivo-controlNav a.active {
69
+ background-position:0 -22px;
70
+ }
71
+
72
+ .theme-bar .nivo-directionNav a {
73
+ display:block;
74
+ border:0;
75
+ color: #fff;
76
+ text-transform: uppercase;
77
+ top: auto;
78
+ bottom: 10px;
79
+ z-index: 11;
80
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
81
+ font-size: 13px;
82
+ line-height: 20px;
83
+ opacity: 0.5;
84
+ -webkit-transition: all 200ms ease-in-out;
85
+ -moz-transition: all 200ms ease-in-out;
86
+ -o-transition: all 200ms ease-in-out;
87
+ transition: all 200ms ease-in-out;
88
+ }
89
+ .theme-bar a.nivo-nextNav { right: -50px; }
90
+ .theme-bar a.nivo-prevNav { left: -50px; }
91
+ .theme-bar:hover a.nivo-nextNav {
92
+ right: 15px;
93
+ opacity: 1;
94
+ }
95
+ .theme-bar:hover a.nivo-prevNav {
96
+ left: 15px;
97
+ opacity: 1;
98
+ }
99
+ .theme-bar .nivo-directionNav a:hover { color: #ddd; }
100
+
101
+ .theme-bar .nivo-caption {
102
+ font-family: Helvetica, Arial, sans-serif;
103
+ -webkit-transition: all 200ms ease-in-out;
104
+ -moz-transition: all 200ms ease-in-out;
105
+ -o-transition: all 200ms ease-in-out;
106
+ transition: all 200ms ease-in-out;
107
+ }
108
+ .theme-bar:hover .nivo-caption {
109
+ bottom: 41px;
110
+ }
111
+ .theme-bar .nivo-caption a {
112
+ color:#fff;
113
+ border-bottom:1px dotted #fff;
114
+ }
115
+ .theme-bar .nivo-caption a:hover {
116
+ color:#fff;
117
+ }
118
+
119
+ .theme-bar .nivo-controlNav.nivo-thumbs-enabled {
120
+ width: 100%;
121
+ }
122
+ .theme-bar .nivo-controlNav.nivo-thumbs-enabled a {
123
+ width: auto;
124
+ height: auto;
125
+ background: none;
126
+ margin-bottom: 5px;
127
+ }
128
+ .theme-bar .nivo-controlNav.nivo-thumbs-enabled img {
129
+ display: block;
130
+ width: 120px;
131
+ height: auto;
132
+ }
assets/nivoslider/themes/bar/bullets.png ADDED
Binary file
assets/nivoslider/themes/bar/loading.gif ADDED
Binary file
assets/nivoslider/themes/dark/arrows.png ADDED
Binary file
assets/nivoslider/themes/dark/bullets.png ADDED
Binary file
assets/nivoslider/themes/dark/dark.css ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Skin Name: Nivo Slider Dark Theme
3
+ Skin URI: http://nivo.dev7studios.com
4
+ Description: A dark skin for the Nivo Slider.
5
+ Version: 1.0
6
+ Author: Gilbert Pellegrom
7
+ Author URI: http://dev7studios.com
8
+ Supports Thumbs: true
9
+ */
10
+
11
+ .theme-dark.slider-wrapper {
12
+ background: #222;
13
+ padding: 10px;
14
+ }
15
+ .theme-dark .nivoSlider {
16
+ position:relative;
17
+ background:#fff url(loading.gif) no-repeat 50% 50%;
18
+ margin-bottom:10px;
19
+ overflow: visible;
20
+ }
21
+ .theme-dark .nivoSlider img {
22
+ position:absolute;
23
+ top:0px;
24
+ left:0px;
25
+ display:none;
26
+ }
27
+ .theme-dark .nivoSlider a {
28
+ border:0;
29
+ display:block;
30
+ }
31
+
32
+ .theme-dark .nivo-controlNav {
33
+ text-align: left;
34
+ padding: 0;
35
+ position: relative;
36
+ z-index: 10;
37
+ }
38
+ .theme-dark .nivo-controlNav a {
39
+ display:inline-block;
40
+ width:10px;
41
+ height:10px;
42
+ background:url(bullets.png) no-repeat 0 2px;
43
+ text-indent:-9999px;
44
+ border:0;
45
+ margin: 0 2px;
46
+ }
47
+ .theme-dark .nivo-controlNav a.active {
48
+ background-position:0 100%;
49
+ }
50
+
51
+ .theme-dark .nivo-directionNav a {
52
+ display:block;
53
+ width:30px;
54
+ height:30px;
55
+ background: url(arrows.png) no-repeat;
56
+ text-indent:-9999px;
57
+ border:0;
58
+ top: auto;
59
+ bottom: -36px;
60
+ z-index: 11;
61
+ }
62
+ .theme-dark .nivo-directionNav a:hover {
63
+ background-color: #333;
64
+ -webkit-border-radius: 2px;
65
+ -moz-border-radius: 2px;
66
+ border-radius: 2px;
67
+ }
68
+ .theme-dark a.nivo-nextNav {
69
+ background-position:-16px 50%;
70
+ right:0px;
71
+ }
72
+ .theme-dark a.nivo-prevNav {
73
+ background-position:11px 50%;
74
+ left: auto;
75
+ right: 35px;
76
+ }
77
+
78
+ .theme-dark .nivo-caption {
79
+ font-family: Helvetica, Arial, sans-serif;
80
+ }
81
+ .theme-dark .nivo-caption a {
82
+ color:#fff;
83
+ border-bottom:1px dotted #fff;
84
+ }
85
+ .theme-dark .nivo-caption a:hover {
86
+ color:#fff;
87
+ }
88
+
89
+ .theme-dark .nivo-controlNav.nivo-thumbs-enabled {
90
+ width: 80%;
91
+ }
92
+ .theme-dark .nivo-controlNav.nivo-thumbs-enabled a {
93
+ width: auto;
94
+ height: auto;
95
+ background: none;
96
+ margin-bottom: 5px;
97
+ }
98
+ .theme-dark .nivo-controlNav.nivo-thumbs-enabled img {
99
+ display: block;
100
+ width: 120px;
101
+ height: auto;
102
+ }
assets/nivoslider/themes/dark/loading.gif ADDED
Binary file
assets/nivoslider/themes/default/arrows.png ADDED
Binary file
assets/nivoslider/themes/default/bullets.png ADDED
Binary file
assets/nivoslider/themes/default/default.css ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Skin Name: Nivo Slider Default Theme
3
+ Skin URI: http://nivo.dev7studios.com
4
+ Description: The default skin for the Nivo Slider.
5
+ Version: 1.3
6
+ Author: Gilbert Pellegrom
7
+ Author URI: http://dev7studios.com
8
+ Supports Thumbs: true
9
+ */
10
+
11
+ .theme-default .nivoSlider {
12
+ position:relative;
13
+ background:#fff url(loading.gif) no-repeat 50% 50%;
14
+ margin-bottom:10px;
15
+ -webkit-box-shadow: 0px 1px 5px 0px #4a4a4a;
16
+ -moz-box-shadow: 0px 1px 5px 0px #4a4a4a;
17
+ box-shadow: 0px 1px 5px 0px #4a4a4a;
18
+ }
19
+ .theme-default .nivoSlider img {
20
+ position:absolute;
21
+ top:0px;
22
+ left:0px;
23
+ display:none;
24
+ }
25
+ .theme-default .nivoSlider a {
26
+ border:0;
27
+ display:block;
28
+ }
29
+
30
+ .theme-default .nivo-controlNav {
31
+ text-align: center;
32
+ padding: 20px 0;
33
+ }
34
+ .theme-default .nivo-controlNav a {
35
+ display:inline-block;
36
+ width:22px;
37
+ height:22px;
38
+ background:url(bullets.png) no-repeat;
39
+ text-indent:-9999px;
40
+ border:0;
41
+ margin: 0 2px;
42
+ }
43
+ .theme-default .nivo-controlNav a.active {
44
+ background-position:0 -22px;
45
+ }
46
+
47
+ .theme-default .nivo-directionNav a {
48
+ display:block;
49
+ width:30px;
50
+ height:30px;
51
+ background:url(arrows.png) no-repeat;
52
+ text-indent:-9999px;
53
+ border:0;
54
+ opacity: 0;
55
+ -webkit-transition: all 200ms ease-in-out;
56
+ -moz-transition: all 200ms ease-in-out;
57
+ -o-transition: all 200ms ease-in-out;
58
+ transition: all 200ms ease-in-out;
59
+ }
60
+ .theme-default:hover .nivo-directionNav a { opacity: 1; }
61
+ .theme-default a.nivo-nextNav {
62
+ background-position:-30px 0;
63
+ right:15px;
64
+ }
65
+ .theme-default a.nivo-prevNav {
66
+ left:15px;
67
+ }
68
+
69
+ .theme-default .nivo-caption {
70
+ font-family: Helvetica, Arial, sans-serif;
71
+ }
72
+ .theme-default .nivo-caption a {
73
+ color:#fff;
74
+ border-bottom:1px dotted #fff;
75
+ }
76
+ .theme-default .nivo-caption a:hover {
77
+ color:#fff;
78
+ }
79
+
80
+ .theme-default .nivo-controlNav.nivo-thumbs-enabled {
81
+ width: 100%;
82
+ }
83
+ .theme-default .nivo-controlNav.nivo-thumbs-enabled a {
84
+ width: auto;
85
+ height: auto;
86
+ background: none;
87
+ margin-bottom: 5px;
88
+ }
89
+ .theme-default .nivo-controlNav.nivo-thumbs-enabled img {
90
+ display: block;
91
+ width: 120px;
92
+ height: auto;
93
+ }
assets/nivoslider/themes/default/loading.gif ADDED
Binary file
assets/nivoslider/themes/light/arrows.png ADDED
Binary file
assets/nivoslider/themes/light/bullets.png ADDED
Binary file
assets/nivoslider/themes/light/light.css ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Skin Name: Nivo Slider Light Theme
3
+ Skin URI: http://nivo.dev7studios.com
4
+ Description: A light skin for the Nivo Slider.
5
+ Version: 1.0
6
+ Author: Gilbert Pellegrom
7
+ Author URI: http://dev7studios.com
8
+ Supports Thumbs: true
9
+ */
10
+
11
+ .theme-light.slider-wrapper {
12
+ background: #fff;
13
+ padding: 10px;
14
+ }
15
+ .theme-light .nivoSlider {
16
+ position:relative;
17
+ background:#fff url(loading.gif) no-repeat 50% 50%;
18
+ margin-bottom:10px;
19
+ overflow: visible;
20
+ }
21
+ .theme-light .nivoSlider img {
22
+ position:absolute;
23
+ top:0px;
24
+ left:0px;
25
+ display:none;
26
+ }
27
+ .theme-light .nivoSlider a {
28
+ border:0;
29
+ display:block;
30
+ }
31
+
32
+ .theme-light .nivo-controlNav {
33
+ text-align: left;
34
+ padding: 0;
35
+ position: relative;
36
+ z-index: 10;
37
+ }
38
+ .theme-light .nivo-controlNav a {
39
+ display:inline-block;
40
+ width:10px;
41
+ height:10px;
42
+ background:url(bullets.png) no-repeat;
43
+ text-indent:-9999px;
44
+ border:0;
45
+ margin: 0 2px;
46
+ }
47
+ .theme-light .nivo-controlNav a.active {
48
+ background-position:0 100%;
49
+ }
50
+
51
+ .theme-light .nivo-directionNav a {
52
+ display:block;
53
+ width:30px;
54
+ height:30px;
55
+ background: url(arrows.png) no-repeat;
56
+ text-indent:-9999px;
57
+ border:0;
58
+ top: auto;
59
+ bottom: -36px;
60
+ z-index: 11;
61
+ }
62
+ .theme-light .nivo-directionNav a:hover {
63
+ background-color: #eee;
64
+ -webkit-border-radius: 2px;
65
+ -moz-border-radius: 2px;
66
+ border-radius: 2px;
67
+ }
68
+ .theme-light a.nivo-nextNav {
69
+ background-position:160% 50%;
70
+ right:0px;
71
+ }
72
+ .theme-light a.nivo-prevNav {
73
+ background-position:-60% 50%;
74
+ left: auto;
75
+ right: 35px;
76
+ }
77
+
78
+ .theme-light .nivo-caption {
79
+ font-family: Helvetica, Arial, sans-serif;
80
+ }
81
+ .theme-light .nivo-caption a {
82
+ color:#fff;
83
+ border-bottom:1px dotted #fff;
84
+ }
85
+ .theme-light .nivo-caption a:hover {
86
+ color:#fff;
87
+ }
88
+
89
+ .theme-light .nivo-controlNav.nivo-thumbs-enabled {
90
+ width: 80%;
91
+ }
92
+ .theme-light .nivo-controlNav.nivo-thumbs-enabled a {
93
+ width: auto;
94
+ height: auto;
95
+ background: none;
96
+ margin-bottom: 5px;
97
+ }
98
+ .theme-light .nivo-controlNav.nivo-thumbs-enabled img {
99
+ display: block;
100
+ width: 120px;
101
+ height: auto;
102
+ }
assets/nivoslider/themes/light/loading.gif ADDED
Binary file
assets/responsiveslides/responsiveslides.css ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! http://responsiveslides.com v1.53 by @viljamis */
2
+
3
+ .rslides {
4
+ position: relative;
5
+ list-style: none;
6
+ overflow: hidden;
7
+ width: 100%;
8
+ padding: 0;
9
+ margin: 0 !important;
10
+ }
11
+
12
+ .rslides li {
13
+ -webkit-backface-visibility: hidden;
14
+ position: absolute;
15
+ display: none;
16
+ width: 100%;
17
+ left: 0;
18
+ top: 0;
19
+ }
20
+
21
+ .rslides li:first-child {
22
+ position: relative;
23
+ display: block;
24
+ float: left;
25
+ }
26
+
27
+ .rslides img {
28
+ display: block;
29
+ height: auto;
30
+ float: left;
31
+ width: 100%;
32
+ border: 0;
33
+ }
assets/responsiveslides/responsiveslides.min.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /*! http://responsiveslides.com v1.53 by @viljamis */
2
+ (function(c,I,B){c.fn.responsiveSlides=function(l){var a=c.extend({auto:!0,speed:500,timeout:4E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!0,prevText:"Previous",nextText:"Next",maxwidth:"",navContainer:"",manualControls:"",namespace:"rslides",before:function(){},after:function(){}},l);return this.each(function(){B++;var f=c(this),s,r,t,m,p,q,n=0,e=f.children(),C=e.size(),h=parseFloat(a.speed),D=parseFloat(a.timeout),u=parseFloat(a.maxwidth),g=a.namespace,d=g+B,E=g+"_nav "+d+"_nav",v=g+"_here",
3
+ j=d+"_on",w=d+"_s",k=c("<ul class='"+g+"_tabs "+d+"_tabs' />"),x={"float":"left",position:"relative",opacity:1,zIndex:2},y={"float":"none",position:"absolute",opacity:0,zIndex:1},F=function(){var b=(document.body||document.documentElement).style,a="transition";if("string"===typeof b[a])return!0;s=["Moz","Webkit","Khtml","O","ms"];var a=a.charAt(0).toUpperCase()+a.substr(1),c;for(c=0;c<s.length;c++)if("string"===typeof b[s[c]+a])return!0;return!1}(),z=function(b){a.before();F?(e.removeClass(j).css(y).eq(b).addClass(j).css(x),
4
+ n=b,setTimeout(function(){a.after()},h)):e.stop().fadeOut(h,function(){c(this).removeClass(j).css(y).css("opacity",1)}).eq(b).fadeIn(h,function(){c(this).addClass(j).css(x);a.after();n=b})};a.random&&(e.sort(function(){return Math.round(Math.random())-0.5}),f.empty().append(e));e.each(function(a){this.id=w+a});f.addClass(g+" "+d);l&&l.maxwidth&&f.css("max-width",u);e.hide().css(y).eq(0).addClass(j).css(x).show();F&&e.show().css({"-webkit-transition":"opacity "+h+"ms ease-in-out","-moz-transition":"opacity "+
5
+ h+"ms ease-in-out","-o-transition":"opacity "+h+"ms ease-in-out",transition:"opacity "+h+"ms ease-in-out"});if(1<e.size()){if(D<h+100)return;if(a.pager&&!a.manualControls){var A=[];e.each(function(a){a+=1;A+="<li><a href='#' class='"+w+a+"'>"+a+"</a></li>"});k.append(A);l.navContainer?c(a.navContainer).append(k):f.after(k)}a.manualControls&&(k=c(a.manualControls),k.addClass(g+"_tabs "+d+"_tabs"));(a.pager||a.manualControls)&&k.find("li").each(function(a){c(this).addClass(w+(a+1))});if(a.pager||a.manualControls)q=
6
+ k.find("a"),r=function(a){q.closest("li").removeClass(v).eq(a).addClass(v)};a.auto&&(t=function(){p=setInterval(function(){e.stop(!0,!0);var b=n+1<C?n+1:0;(a.pager||a.manualControls)&&r(b);z(b)},D)},t());m=function(){a.auto&&(clearInterval(p),t())};a.pause&&f.hover(function(){clearInterval(p)},function(){m()});if(a.pager||a.manualControls)q.bind("click",function(b){b.preventDefault();a.pauseControls||m();b=q.index(this);n===b||c("."+j).queue("fx").length||(r(b),z(b))}).eq(0).closest("li").addClass(v),
7
+ a.pauseControls&&q.hover(function(){clearInterval(p)},function(){m()});if(a.nav){g="<a href='#' class='"+E+" prev'>"+a.prevText+"</a><a href='#' class='"+E+" next'>"+a.nextText+"</a>";l.navContainer?c(a.navContainer).append(g):f.after(g);var d=c("."+d+"_nav"),G=d.filter(".prev");d.bind("click",function(b){b.preventDefault();b=c("."+j);if(!b.queue("fx").length){var d=e.index(b);b=d-1;d=d+1<C?n+1:0;z(c(this)[0]===G[0]?b:d);if(a.pager||a.manualControls)r(c(this)[0]===G[0]?b:d);a.pauseControls||m()}});
8
+ a.pauseControls&&d.hover(function(){clearInterval(p)},function(){m()})}}if("undefined"===typeof document.body.style.maxWidth&&l.maxwidth){var H=function(){f.css("width","100%");f.width()>u&&f.css("width",u)};H();c(I).bind("resize",function(){H()})}})}})(jQuery,this,0);
assets/tipsy/jquery.tipsy.js ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // tipsy, facebook style tooltips for jquery
2
+ // version 1.0.0a
3
+ // (c) 2008-2010 jason frame [jason@onehackoranother.com]
4
+ // released under the MIT license
5
+
6
+ (function($) {
7
+
8
+ function maybeCall(thing, ctx) {
9
+ return (typeof thing == 'function') ? (thing.call(ctx)) : thing;
10
+ };
11
+
12
+ function isElementInDOM(ele) {
13
+ while (ele = ele.parentNode) {
14
+ if (ele == document) return true;
15
+ }
16
+ return false;
17
+ };
18
+
19
+ function Tipsy(element, options) {
20
+ this.$element = $(element);
21
+ this.options = options;
22
+ this.enabled = true;
23
+ this.fixTitle();
24
+ };
25
+
26
+ Tipsy.prototype = {
27
+ show: function() {
28
+ var title = this.getTitle();
29
+ if (title && this.enabled) {
30
+ var $tip = this.tip();
31
+
32
+ $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title);
33
+ $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity
34
+ $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body);
35
+
36
+ var pos = $.extend({}, this.$element.offset(), {
37
+ width: this.$element[0].offsetWidth,
38
+ height: this.$element[0].offsetHeight
39
+ });
40
+
41
+ var actualWidth = $tip[0].offsetWidth,
42
+ actualHeight = $tip[0].offsetHeight,
43
+ gravity = maybeCall(this.options.gravity, this.$element[0]);
44
+
45
+ var tp;
46
+ switch (gravity.charAt(0)) {
47
+ case 'n':
48
+ tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
49
+ break;
50
+ case 's':
51
+ tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
52
+ break;
53
+ case 'e':
54
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset};
55
+ break;
56
+ case 'w':
57
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset};
58
+ break;
59
+ }
60
+
61
+ if (gravity.length == 2) {
62
+ if (gravity.charAt(1) == 'w') {
63
+ tp.left = pos.left + pos.width / 2 - 15;
64
+ } else {
65
+ tp.left = pos.left + pos.width / 2 - actualWidth + 15;
66
+ }
67
+ }
68
+
69
+ $tip.css(tp).addClass('tipsy-' + gravity);
70
+ $tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0);
71
+ if (this.options.className) {
72
+ $tip.addClass(maybeCall(this.options.className, this.$element[0]));
73
+ }
74
+
75
+ if (this.options.fade) {
76
+ $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity});
77
+ } else {
78
+ $tip.css({visibility: 'visible', opacity: this.options.opacity});
79
+ }
80
+ }
81
+ },
82
+
83
+ hide: function() {
84
+ if (this.options.fade) {
85
+ this.tip().stop().fadeOut(function() { $(this).remove(); });
86
+ } else {
87
+ this.tip().remove();
88
+ }
89
+ },
90
+
91
+ fixTitle: function() {
92
+ var $e = this.$element;
93
+ if ($e.attr('title') || typeof($e.attr('original-title')) != 'string') {
94
+ $e.attr('original-title', $e.attr('title') || '').removeAttr('title');
95
+ }
96
+ },
97
+
98
+ getTitle: function() {
99
+ var title, $e = this.$element, o = this.options;
100
+ this.fixTitle();
101
+ var title, o = this.options;
102
+ if (typeof o.title == 'string') {
103
+ title = $e.attr(o.title == 'title' ? 'original-title' : o.title);
104
+ } else if (typeof o.title == 'function') {
105
+ title = o.title.call($e[0]);
106
+ }
107
+ title = ('' + title).replace(/(^\s*|\s*$)/, "");
108
+ return title || o.fallback;
109
+ },
110
+
111
+ tip: function() {
112
+ if (!this.$tip) {
113
+ this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>');
114
+ this.$tip.data('tipsy-pointee', this.$element[0]);
115
+ }
116
+ return this.$tip;
117
+ },
118
+
119
+ validate: function() {
120
+ if (!this.$element[0].parentNode) {
121
+ this.hide();
122
+ this.$element = null;
123
+ this.options = null;
124
+ }
125
+ },
126
+
127
+ enable: function() { this.enabled = true; },
128
+ disable: function() { this.enabled = false; },
129
+ toggleEnabled: function() { this.enabled = !this.enabled; }
130
+ };
131
+
132
+ $.fn.tipsy = function(options) {
133
+
134
+ if (options === true) {
135
+ return this.data('tipsy');
136
+ } else if (typeof options == 'string') {
137
+ var tipsy = this.data('tipsy');
138
+ if (tipsy) tipsy[options]();
139
+ return this;
140
+ }
141
+
142
+ options = $.extend({}, $.fn.tipsy.defaults, options);
143
+
144
+ function get(ele) {
145
+ var tipsy = $.data(ele, 'tipsy');
146
+ if (!tipsy) {
147
+ tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options));
148
+ $.data(ele, 'tipsy', tipsy);
149
+ }
150
+ return tipsy;
151
+ }
152
+
153
+ function enter() {
154
+ var tipsy = get(this);
155
+ tipsy.hoverState = 'in';
156
+ if (options.delayIn == 0) {
157
+ tipsy.show();
158
+ } else {
159
+ tipsy.fixTitle();
160
+ setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn);
161
+ }
162
+ };
163
+
164
+ function leave() {
165
+ var tipsy = get(this);
166
+ tipsy.hoverState = 'out';
167
+ if (options.delayOut == 0) {
168
+ tipsy.hide();
169
+ } else {
170
+ setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut);
171
+ }
172
+ };
173
+
174
+ if (!options.live) this.each(function() { get(this); });
175
+
176
+ if (options.trigger != 'manual') {
177
+ var binder = options.live ? 'live' : 'bind',
178
+ eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus',
179
+ eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';
180
+ this[binder](eventIn, enter)[binder](eventOut, leave);
181
+ }
182
+
183
+ return this;
184
+
185
+ };
186
+
187
+ $.fn.tipsy.defaults = {
188
+ className: null,
189
+ delayIn: 0,
190
+ delayOut: 0,
191
+ fade: false,
192
+ fallback: '',
193
+ gravity: 'n',
194
+ html: false,
195
+ live: false,
196
+ offset: 0,
197
+ opacity: 0.8,
198
+ title: 'title',
199
+ trigger: 'hover'
200
+ };
201
+
202
+ $.fn.tipsy.revalidate = function() {
203
+ $('.tipsy').each(function() {
204
+ var pointee = $.data(this, 'tipsy-pointee');
205
+ if (!pointee || !isElementInDOM(pointee)) {
206
+ $(this).remove();
207
+ }
208
+ });
209
+ };
210
+
211
+ // Overwrite this method to provide options on a per-element basis.
212
+ // For example, you could store the gravity in a 'tipsy-gravity' attribute:
213
+ // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });
214
+ // (remember - do not modify 'options' in place!)
215
+ $.fn.tipsy.elementOptions = function(ele, options) {
216
+ return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
217
+ };
218
+
219
+ $.fn.tipsy.autoNS = function() {
220
+ return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';
221
+ };
222
+
223
+ $.fn.tipsy.autoWE = function() {
224
+ return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';
225
+ };
226
+
227
+ /**
228
+ * yields a closure of the supplied parameters, producing a function that takes
229
+ * no arguments and is suitable for use as an autogravity function like so:
230
+ *
231
+ * @param margin (int) - distance from the viewable region edge that an
232
+ * element should be before setting its tooltip's gravity to be away
233
+ * from that edge.
234
+ * @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer
235
+ * if there are no viewable region edges effecting the tooltip's
236
+ * gravity. It will try to vary from this minimally, for example,
237
+ * if 'sw' is preferred and an element is near the right viewable
238
+ * region edge, but not the top edge, it will set the gravity for
239
+ * that element's tooltip to be 'se', preserving the southern
240
+ * component.
241
+ */
242
+ $.fn.tipsy.autoBounds = function(margin, prefer) {
243
+ return function() {
244
+ var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)},
245
+ boundTop = $(document).scrollTop() + margin,
246
+ boundLeft = $(document).scrollLeft() + margin,
247
+ $this = $(this);
248
+
249
+ if ($this.offset().top < boundTop) dir.ns = 'n';
250
+ if ($this.offset().left < boundLeft) dir.ew = 'w';
251
+ if ($(window).width() + $(document).scrollLeft() - $this.offset().left < margin) dir.ew = 'e';
252
+ if ($(window).height() + $(document).scrollTop() - $this.offset().top < margin) dir.ns = 's';
253
+
254
+ return dir.ns + (dir.ew ? dir.ew : '');
255
+ }
256
+ };
257
+
258
+ })(jQuery);
assets/tipsy/tipsy.css ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .tipsy { font-size: 10px; position: absolute; padding: 5px; z-index: 100000; }
2
+ .tipsy-inner { background-color: #000; color: #FFF; max-width: 200px; padding: 5px 8px 4px 8px; text-align: center; }
3
+
4
+ /* Rounded corners */
5
+ .tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
6
+
7
+ /* Uncomment for shadow */
8
+ /*.tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; -moz-box-shadow: 0 0 5px #000000; }*/
9
+
10
+ .tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed #000; }
11
+
12
+ /* Rules to colour arrows */
13
+ .tipsy-arrow-n { border-bottom-color: #000; }
14
+ .tipsy-arrow-s { border-top-color: #000; }
15
+ .tipsy-arrow-e { border-left-color: #000; }
16
+ .tipsy-arrow-w { border-right-color: #000; }
17
+
18
+ .tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
19
+ .tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
20
+ .tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
21
+ .tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
22
+ .tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
23
+ .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
24
+ .tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; }
25
+ .tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; }
ml-slider.php ADDED
@@ -0,0 +1,886 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Plugin Name: ML Slider
4
+ * Plugin URI: http://www.ml-slider.com
5
+ * Description: Responsive Slider
6
+ * Version: 1.0
7
+ * Author: Matcha Labs
8
+ * Author URI: http://www.matchalabs.com
9
+ * License: GPL
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ */
16
+
17
+ define( 'MLSLIDER_VERSION', '1.0' );
18
+ define( 'MLSLIDER_BASE_URL', plugin_dir_url( __FILE__ ) );
19
+ define( 'MLSLIDER_ASSETS_URL', MLSLIDER_BASE_URL . 'assets/' );
20
+
21
+ class MLSlider {
22
+
23
+ var $current_slide = 0;
24
+
25
+ /**
26
+ * Constructor
27
+ */
28
+ public function __construct() {
29
+ add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
30
+ add_action('admin_menu', array($this, 'register_admin_menu'), 10001);
31
+ add_action('admin_menu', array($this, 'process'), 10002);
32
+ add_action('init', array($this, 'register_post_type' ));
33
+ add_action('init', array($this, 'register_taxonomy' ));
34
+ add_action('admin_print_styles', array( $this, 'register_admin_styles'));
35
+ add_shortcode('ml-slider', array($this, 'register_shortcode'));
36
+ }
37
+
38
+ /**
39
+ * Current slide ID
40
+ */
41
+ private function set_current_slide($id) {
42
+ $this->current_slide = $id;
43
+ }
44
+
45
+ /**
46
+ * Return the current slide ID
47
+ */
48
+ private function get_current_slide() {
49
+ return $this->current_slide;
50
+ }
51
+
52
+ /**
53
+ * Handle slide uploads/changes
54
+ */
55
+ public function process() {
56
+ $current_slide = isset($_REQUEST['id']) ? $_REQUEST['id'] : 0;
57
+ $this->set_current_slide($current_slide);
58
+
59
+ $settings = get_post_meta($this->get_current_slide(), 'ml-slider_settings', true);
60
+
61
+ // handle slide description, url and ordering
62
+ if (isset($_POST['attachment'])) {
63
+ foreach ($_POST['attachment'] as $id => $fields) {
64
+ $term = get_term_by('name', $current_slide, 'ml-slider');
65
+ wp_set_post_terms($id, $term->term_id, 'ml-slider', false);
66
+
67
+ $slide = array(
68
+ 'ID' => $id,
69
+ 'post_excerpt' => $fields['post_excerpt'],
70
+ 'menu_order' => $fields['menu_order']
71
+ );
72
+
73
+ wp_update_post($slide);
74
+
75
+ // store the URL as a meta field against the attachment
76
+ if (get_post_meta($id, 'ml-slider_url')) {
77
+ if ($fields['url'] == '') {
78
+ delete_post_meta($id, 'ml-slider_url');
79
+ } else {
80
+ update_post_meta($id, 'ml-slider_url', $fields['url']);
81
+ }
82
+ } else {
83
+ add_post_meta($id, 'ml-slider_url', $fields['url'], true);
84
+ }
85
+
86
+ // resize slide
87
+ add_image_size('ml-slider-slide', $settings['width'], $settings['height'], true);
88
+ $file = get_attached_file($id);
89
+ wp_update_attachment_metadata($id, wp_generate_attachment_metadata($id, $file));
90
+ }
91
+ }
92
+
93
+ // delete slider
94
+ if (isset($_GET['delete'])) {
95
+ $slide = array(
96
+ 'ID' => intVal($_GET['delete']),
97
+ 'post_status' => 'trash'
98
+ );
99
+
100
+ wp_update_post($slide);
101
+
102
+ $this->set_current_slide(0);
103
+ }
104
+
105
+ // delete slide
106
+ if (isset($_GET['deleteSlide'])) {
107
+ $slideToUntagFromCurrentSlider = $_GET['deleteSlide'];
108
+
109
+ // Get the existing terms and only keep the ones we don't want removed
110
+ $new_terms = array();
111
+ $current_terms = wp_get_object_terms($slideToUntagFromCurrentSlider, 'ml-slider', array('fields' => 'ids'));
112
+ $term = get_term_by('name', $this->get_current_slide(), 'ml-slider');
113
+
114
+ foreach ($current_terms as $current_term) {
115
+ if ($current_term != $term->term_id) {
116
+ $new_terms[] = intval($current_term);
117
+ }
118
+ }
119
+
120
+ return wp_set_object_terms($slideToUntagFromCurrentSlider, $new_terms, 'ml-slider');
121
+ }
122
+
123
+ // update title
124
+ if (isset($_POST['title'])) {
125
+ $slide = array(
126
+ 'ID' => $this->get_current_slide(),
127
+ 'post_title' => $_POST['title']
128
+ );
129
+
130
+ wp_update_post($slide);
131
+ }
132
+
133
+ // update options
134
+ if (isset($_POST['settings'])) {
135
+ $old_settings = get_post_meta($this->get_current_slide(), 'ml-slider_settings', true);
136
+ $new_settings = $_POST['settings'];
137
+
138
+ // convert checkbox values
139
+ $new_settings['hoverPause'] = (isset($new_settings['hoverPause']) && $new_settings['hoverPause'] == 'on') ? 'true' : 'false';
140
+ $new_settings['links'] = (isset($new_settings['links']) && $new_settings['links'] == 'on') ? 'true' : 'false';
141
+ $new_settings['navigation'] = (isset($new_settings['navigation']) && $new_settings['navigation'] == 'on') == 'on' ? 'true' : 'false';
142
+ $new_settings['reverse'] = (isset($new_settings['reverse']) && $new_settings['reverse'] == 'on') == 'on' ? 'true' : 'false';
143
+ $new_settings['random'] = (isset($new_settings['random']) && $new_settings['random'] == 'on') == 'on' ? 'true' : 'false';
144
+ $new_settings['printCss'] = (isset($new_settings['printCss']) && $new_settings['printCss'] == 'on') == 'on' ? 'true' : 'false';
145
+ $new_settings['printJs'] = (isset($new_settings['printJs']) && $new_settings['printJs'] == 'on') == 'on' ? 'true' : 'false';
146
+
147
+
148
+ update_post_meta($this->get_current_slide(), 'ml-slider_settings', array_merge($old_settings, $new_settings));
149
+ $settings = get_post_meta($this->get_current_slide(), 'ml-slider_settings', true);
150
+
151
+ // has the slideshow been resized?
152
+ if ($old_settings['width'] != $settings['width'] || $old_settings['height'] != $settings['height']) {
153
+ // resize all slides - register a new image size
154
+ add_image_size('ml-slider-slide', $settings['width'], $settings['height'], true);
155
+
156
+ $args = array(
157
+ 'post_type' => 'attachment',
158
+ 'numberposts' => -1,
159
+ 'post_status' => null,
160
+ 'post_parent' => $this->get_current_slide(),
161
+ 'post_mime_type' => 'image'
162
+ );
163
+
164
+ $attachments = get_posts($args);
165
+
166
+ if ($attachments) {
167
+ foreach ($attachments as $post) {
168
+ $file = get_attached_file($post->ID);
169
+ wp_update_attachment_metadata($post->ID, wp_generate_attachment_metadata($post->ID, $file));
170
+ }
171
+ }
172
+ }
173
+ }
174
+
175
+ // create a new slider
176
+ if (isset($_GET['add'])) {
177
+ $slide = array(
178
+ 'post_title' => 'New Slider',
179
+ 'post_status' => 'publish',
180
+ 'post_type' => 'ml-slider'
181
+ );
182
+
183
+ // insert the post
184
+ $id = wp_insert_post($slide);
185
+ $this->set_current_slide($id);
186
+
187
+ // default settings
188
+ $defaults = array(
189
+ 'type' => 'nivo',
190
+ 'height' => 290,
191
+ 'width' => 565,
192
+ 'spw' => 7, // squares per width
193
+ 'sph' => 5, // squares per height
194
+ 'delay' => 3000,
195
+ 'sDelay' => 30, // delay between squares
196
+ 'opacity' => 0.7, // opacity of title and navigation
197
+ 'titleSpeed' => 500, // speed of title appereance in ms
198
+ 'effect' => 'random', // random, swirl, rain, straight
199
+ 'navigation' => 'true', // prev next and buttons
200
+ 'links' => 'true', // show images as links
201
+ 'hoverPause' => 'true', // pause on hover
202
+ 'theme' => 'dark',
203
+ 'direction' => 'horizontal',
204
+ 'reverse' => 'false',
205
+ 'animationSpeed' => 600,
206
+ 'prevText' => 'Previous',
207
+ 'nextText' => 'Next',
208
+ 'slices' => 15,
209
+ 'random' => 'false',
210
+ 'cssClass' => '',
211
+ 'printCss' => 'true',
212
+ 'printJs' => 'true'
213
+ );
214
+
215
+ // insert the post meta
216
+ add_post_meta($this->get_current_slide(), 'ml-slider_settings', $defaults, true);
217
+ $settings = get_post_meta($this->get_current_slide(), 'ml-slider_settings', true);
218
+
219
+ // create the taxonomy term, the term is the ID of the slider itself
220
+ wp_insert_term($this->get_current_slide(), 'ml-slider');
221
+ }
222
+ }
223
+
224
+
225
+ /**
226
+ * Registers and enqueues admin-specific styles.
227
+ */
228
+ public function register_admin_styles() {
229
+ wp_enqueue_style('ml-slider-tipsy-styles', plugins_url('ml-slider/assets/tipsy/tipsy.css'));
230
+ wp_enqueue_style('ml-slider-admin-styles', plugins_url('ml-slider/assets/ml-slider-admin.css'));
231
+ }
232
+
233
+ /**
234
+ * Registers and enqueues admin-specific JavaScript.
235
+ */
236
+ public function register_admin_scripts() {
237
+ wp_enqueue_media();
238
+ wp_enqueue_script('ml-slider-tipsy', plugins_url('ml-slider/assets/tipsy/jquery.tipsy.js'), array('jquery'));
239
+ wp_enqueue_script('jquery-tablednd', plugins_url('ml-slider/assets/jquery.tablednd.js'), array('jquery'));
240
+ wp_enqueue_script('ml-slider-admin-script', plugins_url('ml-slider/assets/ml-slider.js'), array('jquery', 'ml-slider-tipsy', 'jquery-tablednd', 'media-upload'));
241
+ }
242
+
243
+ /**
244
+ * Include the default CSS
245
+ */
246
+ public function enqueue_scripts() {
247
+ wp_enqueue_style('ml-slider_display_css', plugins_url('ml-slider/assets/ml-slider-display.css'));
248
+ }
249
+
250
+ /**
251
+ * Add the menu page
252
+ */
253
+ public function register_admin_menu() {
254
+ $page = add_menu_page('ML Slider', 'ML Slider', 'add_users', 'ml-slider', array(
255
+ $this,
256
+ 'render_admin_page'
257
+ ), MLSLIDER_ASSETS_URL . 'matchalabs.png', 99999);
258
+
259
+ add_action('admin_print_scripts-' . $page, array( $this, 'register_admin_scripts' ) );
260
+
261
+
262
+ }
263
+
264
+ /**
265
+ * Create ML Slider post type
266
+ */
267
+ public function register_post_type() {
268
+ $post_type_args = array(
269
+ 'singular_label' => __('Slider'),
270
+ 'public' => false,
271
+ 'show_ui' => false,
272
+ 'publicly_queryable' => false,
273
+ 'query_var' => true,
274
+ 'capability_type' => 'post',
275
+ 'has_archive' => false,
276
+ 'hierarchical' => false,
277
+ 'rewrite' => false
278
+ );
279
+ register_post_type('ml-slider', $post_type_args);
280
+ }
281
+
282
+ /**
283
+ * Create taxonomy to store slider => slides relationship
284
+ */
285
+ public function register_taxonomy() {
286
+ $labels = array(
287
+ 'name' => _x( 'Slider', 'taxonomy general name' ),
288
+ 'singular_name' => _x( 'Slider', 'taxonomy singular name' ),
289
+ 'menu_name' => __( 'Slider' )
290
+ );
291
+
292
+ $args = array(
293
+ 'hierarchical' => true,
294
+ 'labels' => $labels,
295
+ 'show_ui' => false,
296
+ 'show_admin_column' => true,
297
+ 'query_var' => false,
298
+ 'rewrite' => array( 'slug' => 'ml-slider' )
299
+ );
300
+
301
+ register_taxonomy( 'ml-slider', 'attachment', $args );
302
+ }
303
+
304
+ /**
305
+ * Return slides for the current slider
306
+ */
307
+ public function getSlides($random = false) {
308
+ $retVal = array();
309
+
310
+ $args = array(
311
+ 'orderby' => $random == 'true' ? 'rand' : 'menu_order',
312
+ 'order' => 'ASC',
313
+ 'post_type' => 'attachment',
314
+ 'post_status' => 'inherit',
315
+ 'tax_query' => array(
316
+ array(
317
+ 'taxonomy' => 'ml-slider',
318
+ 'field' => 'slug',
319
+ 'terms' => $this->get_current_slide()
320
+ )
321
+ )
322
+ );
323
+
324
+
325
+ $query = new WP_Query($args);
326
+
327
+ while($query->have_posts()) {
328
+ $query->next_post();
329
+
330
+ $image_attributes = wp_get_attachment_image_src($query->post->ID, 'ml-slider-slide'); // returns an array
331
+
332
+ $retVal[] = array(
333
+ 'id' => $query->post->ID,
334
+ 'type' => 'image',
335
+ 'url' => get_post_meta($query->post->ID, 'ml-slider_url', true),
336
+ 'caption' => $query->post->post_excerpt,
337
+ 'src' => $image_attributes[0],
338
+ 'alt' => get_post_meta($query->post->ID, '_wp_attachment_image_alt', true),
339
+ 'menu_order' => $query->post->menu_order
340
+ );
341
+ }
342
+
343
+ return $retVal;
344
+ }
345
+
346
+ /**
347
+ * Return coinslider markup
348
+ */
349
+ public function getCoinSlider($slides, $identifier, $settings) {
350
+ $retVal = "<div id='" . $identifier . "' class='coin-slider'>";
351
+
352
+ foreach ($slides as $slide) {
353
+ $url = strlen($slide['url']) ? $slide['url'] : "javascript:void(0)"; // coinslider always wants a URL
354
+ $retVal .= "<a href='{$url}'>";
355
+ $retVal .= "<img src='{$slide['src']}' alt='{$slide['alt']}'>";
356
+ $retVal .= "<span>{$slide['caption']}</span>";
357
+ $retVal .= "</a>";
358
+ }
359
+
360
+ $retVal .= "</div>";
361
+
362
+ $retVal .= "<script type='text/javascript'>";
363
+ $retVal .= "\njQuery(document).ready(function($) {";
364
+ $retVal .= "\n $('#" . $identifier . "').coinslider({";
365
+ $retVal .= "\n effect: '{$settings['effect']}',";
366
+ $retVal .= "\n width: '{$settings['width']}',";
367
+ $retVal .= "\n height: '{$settings['height']}',";
368
+ $retVal .= "\n spw: '{$settings['spw']}',";
369
+ $retVal .= "\n sph: '{$settings['sph']}',";
370
+ $retVal .= "\n delay: '{$settings['delay']}',";
371
+ $retVal .= "\n sDelay: '{$settings['sDelay']}',";
372
+ $retVal .= "\n opacity: '{$settings['opacity']}',";
373
+ $retVal .= "\n titleSpeed: '{$settings['titleSpeed']}',";
374
+ $retVal .= "\n navigation: {$settings['navigation']},";
375
+ $retVal .= "\n hoverPause: {$settings['hoverPause']}";
376
+ $retVal .= "\n });";
377
+ $retVal .= "\n});";
378
+ $retVal .= "</script>";
379
+
380
+ return $retVal;
381
+ }
382
+
383
+ /**
384
+ * Return flexslider markup
385
+ */
386
+ public function getFlexSlider($slides, $identifier, $settings) {
387
+ $retVal = "<div id='" . $identifier . "' class='flexslider'><ul class='slides'>";
388
+
389
+ foreach ($slides as $slide) {
390
+ $retVal .= "<li>";
391
+ if (strlen($slide['url'])) $retVal .= "<a href='{$slide['url']}'>";
392
+ $retVal .= "<img src='{$slide['src']}' alt='{$slide['alt']}'>";
393
+ if (strlen($slide['caption'])) $retVal .= "<p class='flex-caption'>{$slide['caption']}</p>";
394
+ if (strlen($slide['url'])) $retVal .= "</a>";
395
+ $retVal .= "</li>";
396
+ }
397
+
398
+ $retVal .= "</ul></div>";
399
+
400
+ $retVal .= "<script type='text/javascript'>";
401
+ $retVal .= "\njQuery(document).ready(function($) {";
402
+ $retVal .= "\n $('#" . $identifier . "').flexslider({";
403
+ $retVal .= "\n animation: '{$settings['effect']}',";
404
+ $retVal .= "\n direction: '{$settings['direction']}',";
405
+ $retVal .= "\n reverse: {$settings['reverse']},";
406
+ $retVal .= "\n slideshowSpeed: {$settings['delay']},";
407
+ $retVal .= "\n pauseOnHover: {$settings['hoverPause']},";
408
+ $retVal .= "\n animationSpeed: {$settings['animationSpeed']},";
409
+ $retVal .= "\n controlNav: {$settings['navigation']},";
410
+ $retVal .= "\n directionNav: {$settings['links']},";
411
+ $retVal .= "\n prevText: '{$settings['prevText']}',";
412
+ $retVal .= "\n nextText: '{$settings['nextText']}',";
413
+ $retVal .= "\n });";
414
+ $retVal .= "\n});";
415
+ $retVal .= "</script>";
416
+
417
+ return $retVal;
418
+ }
419
+
420
+ /**
421
+ * Return responsive slides markup
422
+ */
423
+ public function getResponsiveSlider($slides, $identifier, $settings) {
424
+ $retVal = "<ul id='" . $identifier . "' class='rslides'>";
425
+
426
+ foreach ($slides as $slide) {
427
+ $retVal .= "<li>";
428
+ if (strlen($slide['url'])) $retVal .= "<a href='{$slide['url']}'>";
429
+ $retVal .= "<img src='{$slide['src']}' alt='{$slide['alt']}'>";
430
+ if (strlen($slide['url'])) $retVal .= "</a>";
431
+ $retVal .= "</li>";
432
+ }
433
+
434
+ $retVal .= "</ul>";
435
+
436
+ $retVal .= "<script type='text/javascript'>";
437
+ $retVal .= "\njQuery(document).ready(function($) {";
438
+ $retVal .= "\n $('#" . $identifier . "').responsiveSlides({";
439
+ $retVal .= "\n timeout: {$settings['delay']},";
440
+ $retVal .= "\n pause: {$settings['hoverPause']},";
441
+ $retVal .= "\n pauseControls: {$settings['hoverPause']},";
442
+ $retVal .= "\n speed: {$settings['animationSpeed']},";
443
+ $retVal .= "\n pager: {$settings['navigation']},";
444
+ $retVal .= "\n nav: {$settings['links']},";
445
+ $retVal .= "\n prevText: '{$settings['prevText']}',";
446
+ $retVal .= "\n nextText: '{$settings['nextText']}',";
447
+ $retVal .= "\n });";
448
+ $retVal .= "\n});";
449
+ $retVal .= "</script>";
450
+
451
+ return $retVal;
452
+ }
453
+
454
+ /**
455
+ * Return nivoslider markup
456
+ */
457
+ public function getNivoSlider($slides, $identifier, $settings) {
458
+ $retVal = "<div class='slider-wrapper theme-{$settings['theme']}'>";
459
+ $retVal .= "<div class='ribbon'></div>";
460
+ $retVal .= "<div id='" . $identifier . "' class='nivoSlider'>";
461
+
462
+ foreach ($slides as $slide) {
463
+ if (strlen($slide['url'])) $retVal .= "<a href='{$slide['url']}'>";
464
+ $retVal .= "<img src='{$slide['src']}' title='{$slide['caption']}' alt='{$slide['alt']}'>";
465
+ if (strlen($slide['url'])) $retVal .= "</a>";
466
+ }
467
+
468
+ $retVal .= "</div></div>";
469
+
470
+ $retVal .= "<script type='text/javascript'>";
471
+ $retVal .= "\njQuery(document).ready(function($) {";
472
+ $retVal .= "\n $('#" . $identifier . "').nivoSlider({";
473
+ $retVal .= "\n effect: '{$settings['effect']}',";
474
+ $retVal .= "\n slices: {$settings['slices']},";
475
+ $retVal .= "\n pauseTime: {$settings['delay']},";
476
+ $retVal .= "\n animSpeed: {$settings['animationSpeed']},";
477
+ $retVal .= "\n pauseOnHover: {$settings['hoverPause']},";
478
+ $retVal .= "\n boxCols: {$settings['spw']},";
479
+ $retVal .= "\n boxRows: {$settings['sph']},";
480
+ $retVal .= "\n controlNav: {$settings['navigation']},";
481
+ $retVal .= "\n directionNav: {$settings['links']},";
482
+ $retVal .= "\n prevText: '{$settings['prevText']}',";
483
+ $retVal .= "\n nextText: '{$settings['nextText']}',";
484
+ $retVal .= "\n });";
485
+ $retVal .= "\n});";
486
+ $retVal .= "</script>";
487
+
488
+ return $retVal;
489
+ }
490
+
491
+ /**
492
+ * Shortcode used to display slideshow
493
+ */
494
+ public function register_shortcode($atts) {
495
+ extract(shortcode_atts(array(
496
+ 'id' => null
497
+ ), $atts));
498
+
499
+ if ($id != null) {
500
+ $slider = get_post($id);
501
+
502
+ if ($slider->post_status != 'publish') {
503
+ return false;
504
+ }
505
+
506
+ $this->set_current_slide($id);
507
+
508
+ $settings = get_post_meta($id, 'ml-slider_settings', true);
509
+ $identifier = 'ml-slider-' . $settings['type'] . '-' . rand();
510
+ $slides = $this->getSlides($settings['random']);
511
+
512
+ if ($settings['type'] == 'coin') {
513
+ if ($settings['printJs'] == 'true') {
514
+ wp_enqueue_script('ml-slider_coin_slider', MLSLIDER_ASSETS_URL . 'coinslider/coin-slider.min.js', array('jquery'), MLSLIDER_VERSION);
515
+ }
516
+
517
+ if ($settings['printCss'] == 'true') {
518
+ wp_enqueue_style('ml-slider_coin_slider_css', plugins_url('ml-slider/assets/coinslider/coin-slider-styles.css'));
519
+ }
520
+
521
+ $retVal = $this->getCoinSlider($slides, $identifier, $settings);
522
+ }
523
+
524
+ if ($settings['type'] == 'flex') {
525
+ if ($settings['printJs'] == 'true') {
526
+ wp_enqueue_script('ml-slider_flex_slider', MLSLIDER_ASSETS_URL . 'flexslider/jquery.flexslider-min.js', array('jquery'), MLSLIDER_VERSION);
527
+ }
528
+
529
+ if ($settings['printCss'] == 'true') {
530
+ wp_enqueue_style('ml-slider_flex_slider_css', plugins_url('ml-slider/assets/flexslider/flexslider.css'));
531
+ }
532
+
533
+ $retVal = $this->getFlexSlider($slides, $identifier, $settings);
534
+ }
535
+
536
+ if ($settings['type'] == 'responsive') {
537
+ if ($settings['printJs'] == 'true') {
538
+ wp_enqueue_script('ml-slider_responsive_slides', MLSLIDER_ASSETS_URL . 'responsiveslides/responsiveslides.min.js', array('jquery'), MLSLIDER_VERSION);
539
+ }
540
+
541
+ if ($settings['printCss'] == 'true') {
542
+ wp_enqueue_style('ml-slider_responsive_slides_css', plugins_url('ml-slider/assets/responsiveslides/responsiveslides.css'));
543
+ }
544
+
545
+ $retVal = $this->getResponsiveSlider($slides, $identifier, $settings);
546
+ }
547
+
548
+ if ($settings['type'] == 'nivo') {
549
+ if ($settings['printJs'] == 'true') {
550
+ wp_enqueue_script('ml-slider_nivo_slider', MLSLIDER_ASSETS_URL . 'nivoslider/jquery.nivo.slider.pack.js', array('jquery'), MLSLIDER_VERSION);
551
+ }
552
+
553
+ if ($settings['printCss'] == 'true') {
554
+ wp_enqueue_style('ml-slider_nivo_slider_css', plugins_url('ml-slider/assets/nivoslider/nivo-slider.css'));
555
+ wp_enqueue_style('ml-slider_nivo_slider_theme_' . $settings['theme'], plugins_url('ml-slider/assets/nivoslider/themes/' . $settings['theme'] . '/' . $settings['theme'] . '.css'));
556
+ }
557
+
558
+ $retVal = $this->getNivoSlider($slides, $identifier, $settings);
559
+ }
560
+
561
+ return "<div class='ml-slider ml-slider-{$settings['type']} {$settings['cssClass']}'>" . $retVal . "</div>";
562
+ }
563
+
564
+ return false;
565
+ }
566
+
567
+ /**
568
+ * Returns an array of all the published slide shows
569
+ */
570
+ private function getTabs() {
571
+ $tabs = false;
572
+
573
+ // list the tabs
574
+ $args = array(
575
+ 'post_type' => 'ml-slider',
576
+ 'post_status' => 'publish',
577
+ 'orderby' => 'date',
578
+ 'order' => 'ASC',
579
+ 'posts_per_page' => -1
580
+ );
581
+
582
+ $the_query = new WP_Query($args);
583
+
584
+ while ($the_query->have_posts()) {
585
+ if (!$this->get_current_slide()) {
586
+ $this->set_current_slide($the_query->post->ID);
587
+ }
588
+
589
+ $the_query->the_post();
590
+ $active = $this->get_current_slide() == $the_query->post->ID ? true : false;
591
+
592
+ $tabs[] = array(
593
+ 'active' => $active,
594
+ 'title' => get_the_title(),
595
+ 'id' => $the_query->post->ID
596
+ );
597
+ }
598
+
599
+ return $tabs;
600
+ }
601
+
602
+ /**
603
+ * Render the admin page (tabs, slides, settings)
604
+ */
605
+ public function render_admin_page() {
606
+ $tabs = $this->getTabs();
607
+ $settings = get_post_meta($this->get_current_slide(), 'ml-slider_settings', true);
608
+
609
+ ?>
610
+
611
+ <div class="wrap ml-slider">
612
+ <form enctype="multipart/form-data" action="?page=ml-slider&id=<?php echo $this->get_current_slide() ?>" method="post">
613
+
614
+ <h2 class="nav-tab-wrapper" style="font-size: 13px;">
615
+ <?php
616
+ if($tabs) {
617
+ foreach ($tabs as $tab) {
618
+ if ($tab['active']) {
619
+ echo "<div class='nav-tab nav-tab-active' style='font-size: 13px;'><input type='text' name='title' value='" . $tab['title'] . "' style='padding: 0; margin: 0; border: 0; width: 100px; font-size: 14px' onkeypress='this.style.width = ((this.value.length + 1) * 9) + \"px\"' /></div>";
620
+ } else {
621
+ echo "<a href='?page=ml-slider&id={$tab['id']}' class='nav-tab' style='font-size: 13px;'>" . $tab['title'] . "</a>";
622
+ }
623
+ }
624
+ }
625
+ ?>
626
+
627
+ <a href="?page=ml-slider&add=true" id="create_new_tab" class="nav-tab">+</a>
628
+ </h2>
629
+
630
+ <?php
631
+ if (!$this->get_current_slide()) {
632
+ return;
633
+ }
634
+ ?>
635
+
636
+ <div class="slider-wrap">
637
+ <div class="left" style='width: 67%; margin-left: 1%; margin-top: 20px; float: left; clear: none;'>
638
+ <table class="widefat sortable slides">
639
+ <thead>
640
+ <tr>
641
+ <th style="width: 100px;">Slides</th>
642
+ <th><input class='upload_image_button alignright button-secondary' type='submit' value='Add Slide' data-uploader_title='Select Slide' data-uploader_button_text='Add to slider' /></th>
643
+ </tr>
644
+ </thead>
645
+
646
+ <tbody>
647
+ <?php
648
+ $slides = $this->getSlides();
649
+
650
+ foreach($slides as $slide) {
651
+ $image_attributes = wp_get_attachment_image_src($slide['id']); // returns an array
652
+ $url = get_post_meta($slide['id'], 'ml-slider_url', true);
653
+ echo "<tr class='slide'>";
654
+ echo "<td>";
655
+ echo "<div style='position: absolute'><a class='delete-slide confirm' href='?page=ml-slider&id={$this->get_current_slide()}&deleteSlide={$slide['id']}'>x</a></div>";
656
+ echo "<img src='{$image_attributes[0]}' width='150px'></td>";
657
+ echo "<td>";
658
+ echo "<textarea name='attachment[{$slide['id']}][post_excerpt]' placeholder='Caption'>{$slide['caption']}</textarea>";
659
+ echo "<input type='text' name='attachment[{$slide['id']}][url]' placeholder='URL' value='{$url}' />";
660
+ echo "<input type='hidden' class='menu_order' name='attachment[{$slide['id']}][menu_order]' value={$slide['menu_order']} />";
661
+ echo "</td>";
662
+ echo "</tr>";
663
+ }
664
+ ?>
665
+ </tbody>
666
+ </table>
667
+ </div>
668
+
669
+ <div class='right' style="width: 29%; float: right; margin-right: 1%; margin-top: 20px; clear: none;">
670
+ <table class="widefat settings">
671
+ <thead>
672
+ <tr>
673
+ <th colspan="2">Settings</th>
674
+
675
+ <th><input type='submit' value='Save' class='alignright button-primary' /></th>
676
+ </tr>
677
+ </thead>
678
+ <tbody>
679
+ <tr>
680
+ <td colspan='3'>
681
+ <div class='slider-lib nivo'>
682
+ <label for='nivo' title='Version: 3.2<br />Responsive: Yes<br />Effects: 14<br />Size: 12kb<br />Mobile Friendly: Yes<br />Themes: 4' class='tooltiptop'>NivoSlider</label>
683
+ <input class="select-slider" id='nivo' rel='nivo' type='radio' name="settings[type]" <?php if ($settings['type'] == 'nivo') echo 'checked=checked' ?> value='nivo' />
684
+ </div>
685
+ <div class='slider-lib coin'>
686
+ <label for='coin' title='Version: 1.0<br />Responsive: No<br />Effects: 4<br />Size: 8kb<br />Mobile Friendly: Yes' class='tooltiptop'>CoinSlider</label>
687
+ <input class="select-slider" id='coin' rel='coin' type='radio' name="settings[type]" <?php if ($settings['type'] == 'coin') echo 'checked=checked' ?> value='coin' />
688
+ </div>
689
+ <div class='slider-lib flex'>
690
+ <label for='flex' title='Version: 2.1<br />Responsive: Yes<br />Effects: 2<br />Size: 17kb<br />Mobile Friendly: Yes' class='tooltiptop'>FlexSlider</label>
691
+ <input class="select-slider" id='flex' rel='flex' type='radio' name="settings[type]" <?php if ($settings['type'] == 'flex') echo 'checked=checked' ?> value='flex' />
692
+ </div>
693
+ <div class='slider-lib responsive'>
694
+ <label for='responsive' title='Version: 1.53<br />Responsive: Yes<br />Effects: 1<br />Size: 3kb<br />Mobile Friendly: Yes' class='tooltiptop'>Responsive</label>
695
+ <input class="select-slider" id='responsive' rel='responsive' type='radio' name="settings[type]" <?php if ($settings['type'] == 'responsive') echo 'checked=checked' ?> value='responsive' />
696
+ </div>
697
+ </td>
698
+ </tr>
699
+ <tr>
700
+ <td><a href="#" class="tooltip" title="Set the initial size for the slides (width x height)">?</a></td>
701
+ <td>Size</td>
702
+ <td>
703
+ <input type='text' size='3' name="settings[width]" value='<?php echo $settings['width'] ?>' />px X
704
+ <input type='text' size='3' name="settings[height]" value='<?php echo $settings['height'] ?>' />px
705
+ </td>
706
+ </tr>
707
+ <tr>
708
+ <td><a href="#" class="tooltip" title="Slide transition effect">?</a></td>
709
+ <td>Effect</td>
710
+ <td>
711
+ <select name="settings[effect]" class='effect option coin nivo flex'>
712
+ <option class='option coin nivo' value='random' <?php if ($settings['effect'] == 'random') echo 'selected=selected' ?>>Random</option>
713
+ <option class='option coin' value='swirl' <?php if ($settings['effect'] == 'swirl') echo 'selected=selected' ?>>Swirl</option>
714
+ <option class='option coin' value='rain' <?php if ($settings['effect'] == 'rain') echo 'selected=selected' ?>>Rain</option>
715
+ <option class='option coin' value='straight' <?php if ($settings['effect'] == 'straight') echo 'selected=selected' ?>>Straight</option>
716
+ <option class='option nivo' value='sliceDown' <?php if ($settings['effect'] == 'sliceDown') echo 'selected=selected' ?>>Slice Down</option>
717
+ <option class='option nivo' value='sliceUp' <?php if ($settings['effect'] == 'sliceUp') echo 'selected=selected' ?>>Slice Up</option>
718
+ <option class='option nivo' value='sliceUpLeft' <?php if ($settings['effect'] == 'sliceUpLeft') echo 'selected=selected' ?>>Slice Up Left</option>
719
+ <option class='option nivo' value='sliceUpDown' <?php if ($settings['effect'] == 'sliceUpDown') echo 'selected=selected' ?>>Slice Up Down</option>
720
+ <option class='option nivo' value='sliceUpDownLeft' <?php if ($settings['effect'] == 'sliceUpDownLeft') echo 'selected=selected' ?>>Slice Up Down Left</option>
721
+ <option class='option nivo' value='fold' <?php if ($settings['effect'] == 'fold') echo 'selected=selected' ?>>Fold</option>
722
+ <option class='option nivo flex' value='fade' <?php if ($settings['effect'] == 'fade') echo 'selected=selected' ?>>Fade</option>
723
+ <option class='option nivo' value='slideInRight' <?php if ($settings['effect'] == 'slideInRight') echo 'selected=selected' ?>>Slide In Right</option>
724
+ <option class='option nivo' value='slideInLeft' <?php if ($settings['effect'] == 'slideInLeft') echo 'selected=selected' ?>>Slide In Left</option>
725
+ <option class='option nivo' value='boxRandom' <?php if ($settings['effect'] == 'boxRandom') echo 'selected=selected' ?>>Box Random</option>
726
+ <option class='option nivo' value='boxRain' <?php if ($settings['effect'] == 'boxRain') echo 'selected=selected' ?>>Box Rain</option>
727
+ <option class='option nivo' value='boxRainReverse' <?php if ($settings['effect'] == 'boxRainReverse') echo 'selected=selected' ?>>Box Rain Reverse</option>
728
+ <option class='option nivo' value='boxRainGrowReverse' <?php if ($settings['effect'] == 'boxRainGrowReverse') echo 'selected=selected' ?>>Box Rain Grow Reverse</option>
729
+ <option class='option flex' value='slide' <?php if ($settings['effect'] == 'slide') echo 'selected=selected' ?>>Slide</option>
730
+ </select>
731
+ </td>
732
+ </tr>
733
+ <tr>
734
+ <td><a href="#" class="tooltip" title="Change the slider style">?</a></td>
735
+ <td>Theme</td>
736
+ <td>
737
+ <select class='option nivo' name="settings[theme]">
738
+ <option value='default' <?php if ($settings['theme'] == 'default') echo 'selected=selected' ?>>Default</option>
739
+ <option value='dark' <?php if ($settings['theme'] == 'dark') echo 'selected=selected' ?>>Dark</option>
740
+ <option value='light' <?php if ($settings['theme'] == 'light') echo 'selected=selected' ?>>Light</option>
741
+ <option value='bar' <?php if ($settings['theme'] == 'bar') echo 'selected=selected' ?>>Bar</option>
742
+ </select>
743
+ </td>
744
+ </tr>
745
+ <tr>
746
+ <td><a href="#" class="tooltip" title="Number of squares (width x height)">?</a></td>
747
+ <td>Number of squares</td>
748
+ <td>
749
+ <input class='option coin nivo' type='text' size='2' name="settings[spw]" value='<?php echo $settings['spw'] ?>' /> x
750
+ <input class='option coin nivo' type='text' size='2' name="settings[sph]" value='<?php echo $settings['sph'] ?>' />
751
+ </td>
752
+ </tr>
753
+ <tr>
754
+ <td><a href="#" class="tooltip" title="Number of slices">?</a></td>
755
+ <td>Number of slices</td>
756
+ <td>
757
+ <input class='option nivo' type='text' size='2' name="settings[slices]" value='<?php echo $settings['slices'] ?>' />
758
+ </td>
759
+ </tr>
760
+ <tr>
761
+ <td><a href="#" class="tooltip" title="How long to display each slide, in milliseconds">?</a></td>
762
+ <td>Slide delay</td>
763
+ <td><input class='option coin flex responsive nivo' type='text' size='5' name="settings[delay]" value='<?php echo $settings['delay'] ?>' />ms</td>
764
+ </tr>
765
+ <tr>
766
+ <td><a href="#" class="tooltip" title="Delay beetwen squares in ms">?</a></td>
767
+ <td>Square delay</td>
768
+ <td><input class='option coin' type='text' size='5' name="settings[sDelay]" value='<?php echo $settings['sDelay'] ?>' />ms</td>
769
+ </tr>
770
+ <tr>
771
+ <td><a href="#" class="tooltip" title="Opacity of title and navigation">?</a></td>
772
+ <td>Opacity</td>
773
+ <td><input class='option coin' type='text' size='5' name="settings[opacity]" value='<?php echo $settings['opacity'] ?>' /></td>
774
+ </tr>
775
+ <tr>
776
+ <td><a href="#" class="tooltip" title="Set the fade in speef of the caption">?</a></td>
777
+ <td>Caption speed</td>
778
+ <td><input class='option coin' type='text' size='5' name="settings[titleSpeed]" value='<?php echo $settings['titleSpeed'] ?>' />ms</td>
779
+ </tr>
780
+ <tr>
781
+ <td><a href="#" class="tooltip" title="Set the speed of animations, in milliseconds">?</a></td>
782
+ <td>Animation speed</td>
783
+ <td><input class='option flex responsive nivo' type='text' size='5' name="settings[animationSpeed]" value='<?php echo $settings['animationSpeed'] ?>' />ms</td>
784
+ </tr>
785
+ <tr>
786
+ <td><a href="#" class="tooltip" title="Show slide navigation row">?</a></td>
787
+ <td>Navigation</td>
788
+ <td>
789
+ <input class='option coin responsive nivo flex' type='checkbox' name="settings[navigation]" <?php if ($settings['navigation'] == 'true') echo 'checked=checked' ?> />
790
+ </td>
791
+ </tr>
792
+ <tr>
793
+ <td><a href="#" class="tooltip" title="Show previous and next links">?</a></td>
794
+ <td>Links</td>
795
+ <td>
796
+ <input class='option responsive nivo flex' type='checkbox' name="settings[links]" <?php if ($settings['links'] == 'true') echo 'checked=checked' ?> />
797
+ </td>
798
+ </tr>
799
+ <tr>
800
+ <td><a href="#" class="tooltip" title="Pause the slideshow when hovering over slider, then resume when no longer hovering">?</a></td>
801
+ <td>Hover pause</td>
802
+ <td>
803
+ <input class='option coin flex responsive nivo' type='checkbox' name="settings[hoverPause]" <?php if ($settings['hoverPause'] == 'true') echo 'checked=checked' ?> />
804
+ </td>
805
+ </tr>
806
+ <tr>
807
+ <td><a href="#" class="tooltip" title="Reverse the animation direction">?</a></td>
808
+ <td>Reverse</td>
809
+ <td>
810
+ <input class='option flex' type='checkbox' name="settings[reverse]" <?php if ($settings['reverse'] == 'true') echo 'checked=checked' ?> />
811
+ </td>
812
+ </tr>
813
+ <tr>
814
+ <td><a href="#" class="tooltip" title="Randomise the order of the slides">?</a></td>
815
+ <td>Random</td>
816
+ <td>
817
+ <input type='checkbox' name="settings[random]" <?php if ($settings['random'] == 'true') echo 'checked=checked' ?> />
818
+ </td>
819
+ </tr>
820
+ <tr>
821
+ <td><a href="#" class="tooltip" title="Uncheck this is you would like to include your own CSS">?</a></td>
822
+ <td>Print CSS</td>
823
+ <td>
824
+ <input type='checkbox' name="settings[printCss]" <?php if ($settings['printCss'] == 'true') echo 'checked=checked' ?> />
825
+ </td>
826
+ </tr>
827
+ <tr>
828
+ <td><a href="#" class="tooltip" title="Uncheck this is you would like to include your own Javascript">?</a></td>
829
+ <td>Print JS</td>
830
+ <td>
831
+ <input type='checkbox' name="settings[printJs]" <?php if ($settings['printJs'] == 'true') echo 'checked=checked' ?> />
832
+ </td>
833
+ </tr>
834
+ <tr>
835
+ <td><a href="#" class="tooltip" title="Select the sliding direction">?</a></td>
836
+ <td>Direction</td>
837
+ <td>
838
+ <select class='option flex' name="settings[direction]">
839
+ <option value='horizontal' <?php if ($settings['direction'] == 'horizontal') echo 'selected=selected' ?>>Horizontal</option>
840
+ <option value='vertical' <?php if ($settings['direction'] == 'vertical') echo 'selected=selected' ?>>Vertical</option>
841
+ </select>
842
+ </td>
843
+ </tr>
844
+ <tr>
845
+ <td><a href="#" class="tooltip" title="Set the text for the 'previous' direction item">?</a></td>
846
+ <td>Previous text</td>
847
+ <td><input class='option flex responsive nivo' type='text' name="settings[prevText]" value='<?php echo $settings['prevText'] ?>' /></td>
848
+ </tr>
849
+ <tr>
850
+ <td><a href="#" class="tooltip" title="Set the text for the 'previous' direction item">?</a></td>
851
+ <td>Next text</td>
852
+ <td><input class='option flex responsive nivo' type='text' name="settings[nextText]" value='<?php echo $settings['nextText'] ?>' /></td>
853
+ </tr>
854
+ <tr>
855
+ <td><a href="#" class="tooltip" title="Specify any custom CSS Classes you would like to be added to the slider wrapper">?</a></td>
856
+ <td>CSS classes</td>
857
+ <td><input type='text' name="settings[cssClass]" value='<?php echo $settings['cssClass'] ?>' /></td>
858
+ </tr>
859
+ </tbody>
860
+ </table>
861
+
862
+ <table class="widefat" style="width: 100%; margin-top: 20px;">
863
+ <thead>
864
+ <tr>
865
+ <th>Shortcode</th>
866
+ </tr>
867
+ </thead>
868
+
869
+ <tbody>
870
+ <tr>
871
+ <td><textarea style="width: 100%">[ml-slider id=<?php echo $this->get_current_slide() ?>]</textarea></td>
872
+ </tr>
873
+ </tbody>
874
+ </table>
875
+
876
+ <br />
877
+ <a class='alignright button-secondary confirm' href="?page=ml-slider&delete=<?php echo $this->get_current_slide() ?>">Delete Slider</a>
878
+ </div>
879
+ </div>
880
+ </form>
881
+ </div>
882
+ <?php
883
+ }
884
+ }
885
+ $mlslider = new MLSlider();
886
+ ?>
readme.txt ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Plugin Name ===
2
+ Contributors: matchalabs
3
+ Tags: flexslider,flex,nivoslider,nivo,responsive,slider,slideshow,carousel,coinslider,coin
4
+ Requires at least: 3.3
5
+ Tested up to: 3.5
6
+ Stable tag: 1.0
7
+ License: GPLv2 or later
8
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+
10
+ 4 sliders in 1! Choose from NivoSlider, FlexSlider, CoinSlider or Responsive Slides.
11
+
12
+ == Description ==
13
+
14
+ 4 sliders in 1! Choose from NivoSlider, FlexSlider, CoinSlider or Responsive Slides.
15
+
16
+ ML Slider is a clean slideshow management plugin that leaves the heavy lifting to a selection of popular MIT licensed jQuery slider plugins - the choice is yours! ML Slider builds upon standard WordPress functionality wherever possible; slideshows are stored as a custom post type, slides are stored as media attachments.
17
+
18
+ Use the intuitive administration panel to manage your slideshows.
19
+
20
+ Each slider can be set to use a different library.
21
+
22
+ Add multiple slideshows to pages, posts and templates using the built in shortcode.
23
+
24
+ == Installation ==
25
+
26
+ 1. Upload the `ml-slider` folder to the `/wp-content/plugins/` directory
27
+ 1. Activate the plugin through the 'Plugins' menu in WordPress
28
+ 1. Manage your slideshows using the 'ML Slider' menu option
29
+
30
+ == Frequently Asked Questions ==
31
+
32
+ == Screenshots ==
33
+
34
+ == Changelog ==
35
+
36
+ = 1.0 =
37
+ * Initial version
38
+
39
+ == Upgrade Notice ==