/** * @preserve * * slippry v1.2.1 - simple responsive content slider * http://slippry.com * * author(s): lukas jakob hafner - @saftsaak * * copyright 2013, booncon oy - http://booncon.com * * thanks @ http://bxslider.com for the inspiration! * * released under the mit license - http://opensource.org/licenses/mit */ !function(a){"use strict";var b;b={slipprywrapper:'
',slidewrapper:'',slidecrop:'',boxclass:"sy-list",elements:"li",activeclass:"sy-active",fillerclass:"sy-filler",loadingclass:"sy-loading",adaptiveheight:!0,start:1,loop:!0,captionssrc:"img",captions:"overlay",captionsel:".sy-caption",initsingle:!0,responsive:!0,preload:"visible",pager:!0,pagerclass:"sy-pager",controls:!0,controlclass:"sy-controls",prevclass:"sy-prev",prevtext:"previous",nextclass:"sy-next",nexttext:"next",hideonend:!0,transition:"fade",kenzoom:120,slidemargin:0,transclass:"transition",speed:800,easing:"swing",continuous:!0,usecss:!0,auto:!0,autodirection:"next",autohover:!0,autohoverdelay:100,autodelay:500,pause:4e3,onsliderload:function(){return this},onslidebefore:function(){return this},onslideafter:function(){return this}},a.fn.slippry=function(c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;return e=this,0===e.length?this:e.length>1?(e.each(function(){a(this).slippry(c)}),this):(d={},d.vars={},n=function(){var a,b,c;b=document.createelement("div"),c={webkittransition:"webkittransitionend",moztransition:"transitionend",mstransition:"mstransitionend",otransition:"otransitionend",transition:"transitionend transitionend"};for(a in c)if(void 0!==b.style[a])return c[a]},v=function(){var a=document.createelement("div"),b=["khtml","ms","o","moz","webkit"],c=b.length;return function(d){if(d in a.style)return!0;for(d=d.replace(/^[a-z]/,function(a){return a.touppercase()});c--;)if(b[c]+d in a.style)return!0;return!1}}(),y=function(b,c){var d,e,f,g;return d=c.split("."),e=a(b),f="",g="",a.each(d,function(a,b){b.indexof("#")>=0?f+=b.replace(/^#/,""):g+=b+" "}),f.length&&e.attr("id",f),g.length&&e.attr("class",a.trim(g)),e},z=function(){var a,b,c,e;c={},e={},a=100-d.settings.kenzoom,e.width=d.settings.kenzoom+"%",d.vars.active.index()%2===0?(e.left=a+"%",e.top=a+"%",c.left="0%",c.top="0%"):(e.left="0%",e.top="0%",c.left=a+"%",c.top=a+"%"),b=d.settings.pause+2*d.settings.speed,d.vars.active.css(e),d.vars.active.animate(c,{duration:b,easing:d.settings.easing,queue:!1})},l=function(){d.vars.fresh?(d.vars.slipprywrapper.removeclass(d.settings.loadingclass),d.vars.fresh=!1,d.settings.auto&&e.startauto(),d.settings.usecss||"kenburns"!==d.settings.transition||z(),d.settings.onsliderload.call(void 0,d.vars.active.index())):a("."+d.settings.fillerclass,d.vars.slidewrapper).addclass("ready")},q=function(b,c){var e,f,g;e=b/c,f=1/e*100+"%",g=a("."+d.settings.fillerclass,d.vars.slidewrapper),g.css({paddingtop:f}),l()},g=function(b){var c,d;void 0!==a("img",b).attr("src")?a("").load(function(){c=b.width(),d=b.height(),q(c,d)}).attr("src",a("img",b).attr("src")):(c=b.width(),d=b.height(),q(c,d))},f=function(){if(0===a("."+d.settings.fillerclass,d.vars.slidewrapper).length&&d.vars.slidewrapper.append(a('')),d.settings.adaptiveheight===!0)g(a("."+d.settings.activeclass,e));else{var b,c,f;c=0,f=0,a(d.vars.slides).each(function(){a(this).height()>c&&(b=a(this),c=b.height()),f+=1,f===d.vars.count&&(void 0===b&&(b=a(a(d.vars.slides)[0])),g(b))})}},p=function(){d.settings.pager&&(a("."+d.settings.pagerclass+" li",d.vars.slipprywrapper).removeclass(d.settings.activeclass),a(a("."+d.settings.pagerclass+" li",d.vars.slipprywrapper)[d.vars.active.index()]).addclass(d.settings.activeclass))},t=function(){!d.settings.loop&&d.settings.hideonend&&(a("."+d.settings.prevclass,d.vars.slipprywrapper)[d.vars.first?"hide":"show"](),a("."+d.settings.nextclass,d.vars.slipprywrapper)[d.vars.last?"hide":"show"]())},i=function(){var b,c;d.settings.captions!==!1&&(b="img"!==d.settings.captionssrc?d.vars.active.attr("title"):a("img",d.vars.active).attr(void 0!==a("img",d.vars.active).attr("title")?"title":"alt"),c="custom"!==d.settings.captions?a(d.settings.captionsel,d.vars.slipprywrapper):a(d.settings.captionsel),void 0!==b&&""!==b?c.html(b).show():c.hide())},e.startauto=function(){void 0===d.vars.timer&&void 0===d.vars.delay&&(d.vars.delay=window.settimeout(function(){d.vars.autodelay=!1,d.vars.timer=window.setinterval(function(){d.vars.trigger="auto",e.gotoslide(d.settings.autodirection)},d.settings.pause)},d.vars.autodelay?d.settings.autohoverdelay:d.settings.autodelay)),d.settings.autohover&&d.vars.slidewrapper.unbind("mouseenter").unbind("mouseleave").bind("mouseenter",function(){void 0!==d.vars.timer?(d.vars.hoverstop=!0,e.stopauto()):d.vars.hoverstop=!1}).bind("mouseleave",function(){d.vars.hoverstop&&(d.vars.autodelay=!0,e.startauto())})},e.stopauto=function(){window.clearinterval(d.vars.timer),d.vars.timer=void 0,window.cleartimeout(d.vars.delay),d.vars.delay=void 0},e.refresh=function(){d.vars.slides.removeclass(d.settings.activeclass),d.vars.active.addclass(d.settings.activeclass),d.settings.responsive?f():l(),t(),p(),i()},s=function(){e.refresh()},m=function(){d.vars.moving=!1,d.vars.active.removeclass(d.settings.transclass),d.vars.fresh||d.vars.old.removeclass("sy-ken"),d.vars.old.removeclass(d.settings.transclass),d.settings.onslideafter.call(void 0,d.vars.active,d.vars.old.index(),d.vars.active.index())},r=function(){var b,c,f,g,h,i,j;d.settings.onslidebefore.call(void 0,d.vars.active,d.vars.old.index(),d.vars.active.index()),d.settings.transition!==!1?(d.vars.moving=!0,"fade"===d.settings.transition||"kenburns"===d.settings.transition?(d.vars.fresh?(d.vars.slides.css(d.settings.usecss?{transitionduration:d.settings.speed+"ms",opacity:0}:{opacity:0}),d.vars.active.css("opacity",1),"kenburns"===d.settings.transition&&d.settings.usecss&&(h=d.settings.pause+2*d.settings.speed,d.vars.slides.css({animationduration:h+"ms"}),d.vars.active.addclass("sy-ken")),m()):d.settings.usecss?(d.vars.old.addclass(d.settings.transclass).css("opacity",0),d.vars.active.addclass(d.settings.transclass).css("opacity",1),"kenburns"===d.settings.transition&&d.vars.active.addclass("sy-ken"),a(window).off("focus").on("focus",function(){d.vars.moving&&d.vars.old.trigger(d.vars.transition)}),d.vars.old.one(d.vars.transition,function(){return m(),this})):("kenburns"===d.settings.transition&&z(),d.vars.old.addclass(d.settings.transclass).animate({opacity:0},d.settings.speed,d.settings.easing,function(){m()}),d.vars.active.addclass(d.settings.transclass).css("opacity",0).animate({opacity:1},d.settings.speed,d.settings.easing)),s()):("horizontal"===d.settings.transition||"vertical"===d.settings.transition)&&(i="horizontal"===d.settings.transition?"left":"top",b="-"+d.vars.active.index()*(100+d.settings.slidemargin)+"%",d.vars.fresh?(e.css(i,b),m()):(j={},d.settings.continuous&&(!d.vars.jump||"controls"!==d.vars.trigger&&"auto"!==d.vars.trigger||(c=!0,g=b,d.vars.first?(f=0,d.vars.active.css(i,d.vars.count*(100+d.settings.slidemargin)+"%"),b="-"+d.vars.count*(100+d.settings.slidemargin)+"%"):(f=(d.vars.count-1)*(100+d.settings.slidemargin)+"%",d.vars.active.css(i,-(100+d.settings.slidemargin)+"%"),b=100+d.settings.slidemargin+"%"))),d.vars.active.addclass(d.settings.transclass),d.settings.usecss?(j[i]=b,j.transitionduration=d.settings.speed+"ms",e.addclass(d.settings.transition),e.css(j),a(window).off("focus").on("focus",function(){d.vars.moving&&e.trigger(d.vars.transition)}),e.one(d.vars.transition,function(){return e.removeclass(d.settings.transition),c&&(d.vars.active.css(i,f),j[i]=g,j.transitionduration="0ms",e.css(j)),m(),this})):(j[i]=b,e.stop().animate(j,d.settings.speed,d.settings.easing,function(){return c&&(d.vars.active.css(i,f),e.css(i,g)),m(),this}))),s())):(s(),m())},u=function(a){d.vars.first=!1,d.vars.last=!1,"prev"===a||0===a?d.vars.first=!0:("next"===a||a===d.vars.count-1)&&(d.vars.last=!0)},e.gotoslide=function(b){var c;d.vars.moving||(c=d.vars.active.index(),"prev"===b?c>0?b=c-1:d.settings.loop&&(b=d.vars.count-1):"next"===b?c