// wowslider plugin
/** WOWSlider version 3.1
  Created by WowSlider.com
  Modified 10:37 13.03.2013
  Using structure
  <div id=wowslider-container>
 	<div class=ws_images><ul>
 		<li><a><img src="..." id=wows0 /></a></li>...
 	</ul></div>
 	<div class=ws_bullets>
 		<a href="#wows0"></a>...
 	</div>
 	<div class=ws_bullets>
 		<a href="#wows0"></a>...
 	</div>
 	<div class=ws_shadow></div>
  </div>

  z-index:
 	-1 = .ws_shadow
 	no = .images - basicaly no z-index
 	8  = .ws_effect, canvas or other overlap object
 	9  = .ws_frame
  	10 = <cover frame> - between .ws_images||.ws_frame and arrows+bullets
    50 = .ws_title
  	55 = .ws_video_btn - div with youtube/vimeo play button (must be above description, to be able to press play when big description)
  	56 = .ws_logo (must be over play video button to prevent user click when on-demand loading)
 	60 = .ws_prev,.ws_next
 	60 = .ws_thumbs - if fullWidth filmstrips go to container and need to be under controls
 	61 = .ws_fullscreen - fullscreen button ower controls!
 	70 = .ws_bullets

 */
// exported functions:
//	.wsStart([index]) - start playing [from index] if autoPlay=true, or go to step if autoPlay=false
//	.wsStop() - stop playing
jQuery.fn.wowSlider=function(a){function c(a){return F.css({left:-a+"00%"})}function f(a){return((a||0)+I)%I}function d(A){if(window["ws_"+A]){var b=new window["ws_"+A](a,L,C);b.name="ws_"+A;B.push(b)}}function h(a,b){u?u.pause(a.curIndex,b):b()}function l(a,b){u?u.play(a,0,b):b()}function k(a,b,g){N||(isNaN(a)&&(a=Aa(n,I)),a=f(a),n!=a&&(O?O.load(a,function(){K(a,b,g)}):K(a,b,g)))}function v(a){for(var b="",g=0;g<a.length;g++)b+=String.fromCharCode(a.charCodeAt(g)^1+(a.length-g)%7);return b}function K(b,
Fa,e){if(!N){if(Fa)void 0!=e&&(aa=e^a.revers),c(b);else{if(N)return;(function(b,A,e){ba=Math.floor(Math.random()*B.length);g(B[ba]).trigger("effectStart",{curIndex:b,nextIndex:A,cont:g("."+B[ba].name,t),start:function(){aa=void 0!=e?e^a.revers:!!(A>b)^a.revers?1:0;B[ba].go(A,b,aa)}})})(n,b,e);t.trigger(g.Event("go",{index:b}))}n=b;n!=a.stopOn||--a.loop||(a.autoPlay=0);if(a.onStep)a.onStep(b)}}function p(){t.find(".ws_effect").fadeOut(200);c(n).fadeIn(200).find("img").css({visibility:"visible"})}function E(a,
b,g,e,c,r){new H(a,b,g,e,c,r)}function H(b,e,c,r,p,f){var d,k,m,h,x=0,l=0,y=0;b[0]||(b=g(b));b.on((e?"mousedown ":"")+"touchstart",function(b){var g=b.originalEvent.touches?b.originalEvent.touches[0]:b;2==a.gestures&&t.addClass("ws_grabbing");x=0;g?(d=g.pageX,k=g.pageY,l=y=1,r&&(l=y=r(b))):l=y=0;b.originalEvent.touches||(b.preventDefault(),b.stopPropagation())});g(document).on((e?"mousemove ":"")+"touchmove",b,function(a){if(l){var b=a.originalEvent.touches?a.originalEvent.touches[0]:a;x=1;m=b.pageX-
d;h=b.pageY-k;c&&c(a,m,h)}});g(document).on((e?"mouseup ":"")+"touchend",b,function(b){2==a.gestures&&t.removeClass("ws_grabbing");l&&(x&&p&&p(b,m,h),!x&&f&&f(b),x&&(b.preventDefault(),b.stopPropagation()),l=x=0)});b.on("click",function(a){y&&(a.preventDefault(),a.stopPropagation());y=0})}function e(b,e,c){P.length&&U(b);z.length&&G(b);a.controlsThumb&&a.controls&&ca(b);if(a.caption){var r=Ba(b);e=Ba(e);var p=a.captionEffect;(X[g.type(p)]||X[p]||X.none)(g.extend({$this:t,curIdx:n,prevIdx:Y,noDelay:c},
a),da,Ca,r,e,aa)}V&&((b=g("A",R.get(b)).get(0))?(V.setAttribute("href",b.href),V.setAttribute("target",b.target),V.style.display="block"):V.style.display="none");a.responsive&&ea()}function b(){fa&&(fa=0,setTimeout(function(){t.trigger(g.Event("stop",{}))},a.duration))}function r(){x();b()}function m(){x();a.autoPlay?(ga=setTimeout(function(){pa||k(void 0,void 0,1)},a.delay),!fa&&a.autoPlay&&(fa=1,t.trigger(g.Event("start",{})))):b()}function x(){ga&&clearTimeout(ga);ga=null}function y(b,a,g){x();
b&&b.preventDefault();k(a,void 0,g);m();qa&&w&&w.play()}function ca(b){var e=a.controlsThumb,c=e[b+1]||e[0],r=e[(b||e.length)-1];Ga.attr("src",c);ra.css("transition","none");Ha.attr("src",r);sa.css("transition","none");wowAnimate(g.merge(ra,sa),{opacity:1},{opacity:0},400,function(){ra.attr({src:c,style:""});sa.attr({src:r,style:""})})}function ta(){function b(a){if(!p){clearTimeout(r);for(var A=0;2>A;A++){if(A)var f=e.find("> a"),f=ha?e.width():g(f.get(0)).outerWidth(!0)*f.length;else f=e.height();
var d=z[A?"width":"height"](),m=d-f;if(0>m){d=(a[A?"pageX":"pageY"]-z.offset()[A?"left":"top"])/d;if(c==d)break;c=d;var k=e.position()[A?"left":"top"];e.css({transition:"0ms linear",transform:"translate3d("+k.left+"px,"+k.top+"px,0)"});e.stop(!0);if(0<ia){if(.2<d&&.8>d)break;m=.5>d?0:m-1;f=ia*Math.abs(k-m)/(Math.abs(d-.5)-.2)}else m*=Math.min(Math.max((d-.2)/.6,0),1),f=-ia*f/2;e.animate(A?{left:m}:{top:m},f,0<ia?"linear":"easeOutCubic")}else e.css(A?"left":"top",m/2)}}}t.find(".ws_bullets a,.ws_thumbs a").click(function(b){y(b,
g(this).index())});if(z.length){z.hover(function(){ua=1},function(){ua=0});var e=z.find(">div");z.css({overflow:"hidden"});var c,r,p;ha=z.width()<t.width();z.bind("mousemove mouseover",b);z.mouseout(function(b){r=setTimeout(function(){e.stop()},100)});z.trigger("mousemove");if(a.gestures){var f,d,m,k,x,h;E(z,2==a.gestures,function(b,a,g){if(m>x||k>h)return!1;ha?(b=Math.min(Math.max(d+g,k-h),0),e.css("top",b)):(b=Math.min(Math.max(f+a,m-x),0),e.css("left",b))},function(b){p=1;b=e.find("> a");m=z.width();
k=z.height();x=g(b.get(0)).outerWidth(!0)*b.length;h=e.height();f=parseFloat(e.css("left"))||0;d=parseFloat(e.css("top"))||0;return!0},function(){p=0},function(){p=0})}t.find(".ws_thumbs a").each(function(b,a){E(a,0,0,function(b){return!!g(b.target).parents(".ws_thumbs").get(0)},function(b){p=1},function(b){y(b,g(a).index())})})}if(P.length){var l=P.find(">div"),n=g("a",P),v=n.find("IMG");if(v.length){var H=function(b){0>b&&(b=0);O&&O.loadTtip(b);g(n.get(U)).removeClass("ws_overbull");g(n.get(b)).addClass("ws_overbull");
q.show();var a={left:n.get(b).offsetLeft-q.width()/2,"margin-top":n.get(b).offsetTop-n.get(0).offsetTop+"px","margin-bottom":-n.get(b).offsetTop+n.get(n.length-1).offsetTop+"px"},e=v.get(b),e={left:-e.offsetLeft+(g(e).outerWidth(!0)-g(e).outerWidth())/2};0>U?(q.css(a),u.css(e)):(document.all||(a.opacity=1),q.stop().animate(a,"fast"),u.stop().animate(e,"fast"));U=b},q=g('<div class="ws_bulframe"/>').appendTo(l),u=g("<div/>").css({width:v.length+1+"00%"}).appendTo(g("<div/>").appendTo(q));v.appendTo(u);
g("<span/>").appendTo(q);var U=-1;n.hover(function(){H(g(this).index())});var w;l.hover(function(){w&&(clearTimeout(w),w=0);H(U)},function(){n.removeClass("ws_overbull");document.all?w||(w=setTimeout(function(){q.hide();w=0},400)):q.stop().animate({opacity:0},{duration:"fast",complete:function(){q.hide()}})});l.click(function(b){y(b,g(b.target).index())})}}}function G(b){g("A",z).each(function(a){if(a==b){if(a=g(this),a.addClass("ws_selthumb"),!ua){var e=z.find(">div"),c=a.position()||{},r;r=e.position()||
{};for(var f=0;1>=f;f++){if(f)var d=e.find("> a"),d=ha?e.width():g(d.get(0)).outerWidth(!0)*d.length;else d=e.height();d=z[f?"width":"height"]()-d;0>d?f?e.stop(!0).animate({left:-Math.max(Math.min(c.left,-r.left),c.left+a.outerWidth(!0)-z.width())}):e.stop(!0).animate({top:-Math.max(Math.min(c.top,0),c.top+a.outerHeight(!0)-z.height())}):e.css(f?"left":"top",d/2)}}}else g(this).removeClass("ws_selthumb")})}function U(b){g("A",P).each(function(a){a==b?g(this).addClass("ws_selbull"):g(this).removeClass("ws_selbull")})}
function Ba(b){var a=R[b];b=g("img",a).attr("title");a=g(a).data("descr");b.replace(/\s+/g,"")||(b="");return(b?"<span>"+b+"</span>":"")+(a?"<br><div>"+a+"</div>":"")}function Da(){a.autoPlay=!a.autoPlay;a.autoPlay?(m(),Q.removeClass("ws_play"),Q.addClass("ws_pause"),u&&u.start(n)):(ja.wsStop(),Q.removeClass("ws_pause"),Q.addClass("ws_play"))}function ea(){var b=va?4:a.responsive,e=C.width()||a.width,c=g([L,ka.find("img"),la.find("img")]);0<b&&document.addEventListener&&t.css("fontSize",Math.max(10*
Math.min(e/a.width||1,1),4));if(2==b){var r=Math.max(e/a.width,1)-1;c.each(function(){g(this).css("marginTop",-a.height*r/2)})}if(3==b){var f=window.innerHeight,d=a.width/a.height;heightCentering=d>e/f;t.css("height",f);c.each(function(){g(this).css({width:heightCentering?"auto":"100%",height:heightCentering?"100%":"auto",marginLeft:heightCentering?(e-f*d)/2:0,marginTop:heightCentering?0:(f-e/d)/2})})}if(4==b){var b=window.innerWidth,p=window.innerHeight,d=(t.width()||a.width)/(t.height()||a.height);
t.css({maxWidth:d>b/p?"100%":d*p,height:""});c.each(function(){g(this).css({width:"100%",marginLeft:0,marginTop:0})})}else t.css({maxWidth:"",top:""})}var g=jQuery,t=this,ja=t.get(0);window.ws_basic=function(b,a,e){var c=g(this);this.go=function(a){e.find(".ws_list").css("transform","translate3d(0,0,0)").stop(!0).animate({left:a?-a+"00%":/Safari/.test(navigator.userAgent)?"0%":0},b.duration,"easeInOutExpo",function(){c.trigger("effectEnd")})}};a=g.extend({effect:"fade",prev:"",next:"",duration:1E3,
delay:2E3,captionDuration:1E3,captionEffect:"none",width:960,height:360,thumbRate:1,gestures:2,caption:!0,controls:!0,controlsThumb:!1,keyboardControl:!1,scrollControl:!1,autoPlay:!0,autoPlayVideo:!1,responsive:1,support:jQuery.fn.wowSlider.support,stopOnHover:0,preventCopy:1},a);var S=navigator.userAgent,C=g(".ws_images",t).css("overflow","visible"),q=g("<div>").appendTo(C).css({position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"}),F=C.find("ul").css("width","100%").wrap("<div class='ws_list'></div>").parent().appendTo(q);
g("<div>").css({position:"relative",width:"100%","font-size":0,"line-height":0,"max-height":"100%",overflow:"hidden"}).append(C.find("li:first img:first").clone().css({width:"100%",visibility:"hidden"})).prependTo(C);F.css({position:"absolute",top:0,height:"100%",transform:/Firefox/.test(S)?"":"translate3d(0,0,0)"});var O=a.images&&new wowsliderPreloader(this,a),R=C.find("li"),I=R.length;F.width();F.find("li").width();var q={position:"absolute",top:0,height:"100%",overflow:"hidden"},ka=g("<div>").addClass("ws_swipe_left").css(q).prependTo(F),
la=g("<div>").addClass("ws_swipe_right").css(q).appendTo(F);/MSIE/.test(S)||/Trident/.test(S)||/Safari/.test(S)||/Firefox/.test(S)?(q=Math.pow(10,Math.ceil(Math.LOG10E*Math.log(I))),F.css({width:q+"00%"}),R.css({width:100/q+"%"}),ka.css({width:100/q+"%",left:-100/q+"%"}),la.css({width:100/q+"%",left:100*I/q+"%"})):(F.css({width:I+"00%",display:"table"}),R.css({display:"table-cell","float":"none",width:"auto"}),ka.css({width:100/I+"%",left:-100/I+"%"}),la.css({width:100/I+"%",left:"100%"}));var Aa=
a.onBeforeStep||function(b){return b+1};a.startSlide=f(isNaN(a.startSlide)?Aa(-1,I):a.startSlide);O&&O.load(a.startSlide,function(){});c(a.startSlide);var V;a.preventCopy&&(q=g('<div class="ws_cover"><a href="#" style="display:none;position:absolute;left:0;top:0;width:100%;height:100%"></a></div>').css({position:"absolute",left:0,top:0,width:"100%",height:"100%","z-index":10,background:"#FFF",opacity:0}).appendTo(C),V=q.find("A").get(0));var L=[];g(".ws_frame",t);R.each(function(b){b=g(">img:first,>iframe:first,>iframe:first+img,>a:first,>div:first",
this);for(var a=g("<div></div>"),e=0;e<this.childNodes.length;)this.childNodes[e]!=b.get(0)&&this.childNodes[e]!=b.get(1)?a.append(this.childNodes[e]):e++;g(this).data("descr")||(a.text().replace(/\s+/g,"")?g(this).data("descr",a.html().replace(/^\s+|\s+$/g,"")):g(this).data("descr",""));g(this).data("type",b[0].tagName);g(">iframe",this).css("opacity",0);L[L.length]=g(">a>img",this).get(0)||g(">iframe+img",this).get(0)||g(">*",this).get(0)});L=g(L);L.css("visibility","visible");ka.append(g(L[I-1]).clone());
la.append(g(L[0]).clone());var B=[];a.effect=a.effect.replace(/\s+/g,"").split(",");for(var D in a.effect)d(a.effect[D]);B.length||d("basic");var n=a.startSlide,Y=n,u=!1,aa=1,N=0;g(B).bind("effectStart",function(b,a){N++;h(a,function(){p();a.cont&&g(a.cont).stop().show().css("opacity",1);a.start&&a.start();Y=n;n=a.nextIndex;e(n,Y,a.captionNoDelay)})});g(B).bind("effectEnd",function(b,a){c(n).stop(!0,!0).show();setTimeout(function(){l(n,function(){N--;m();u&&u.start(n)})},a?a.delay||0:0)});a.loop=
a.loop||Number.MAX_VALUE;a.stopOn=f(a.stopOn);var ba=Math.floor(Math.random()*B.length);2==a.gestures&&t.addClass("ws_gestures");D=C;if(q=v("$WmkT$")){if(a.gestures){var Ea=0,T,wa,ma,Z;E(C,2==a.gestures,function(b,e,c){Z=!!B[0].step;x();F.stop(!0,!0);ma&&(N++,ma=0,Z||p());Ea=e;e>T&&(e=T);e<-T&&(e=-T);Z?B[0].step(n,e/T):a.support.transform&&a.support.transition?F.css("transform","translate3d("+e+"px,0,0)"):F.css("left",wa+e)},function(b){var a=/ws_playpause|ws_prev|ws_next|ws_bullets/g.test(b.target.className)||
g(b.target).parents(".ws_bullets").get(0);b=M?b.target==M[0]:0;if(a||b||u&&u.playing())return!1;ma=1;T=C.width();wa=parseFloat(-n*T)||0;qa&&w&&w.play();return!0},function(b,e,c){ma=0;var d=C.width(),r=f(n+(0>e?1:-1)),p=d*e/Math.abs(e);10>Math.abs(Ea)&&(r=n,p=0);var m=200+200*(d-Math.abs(e))/d;N--;g(B[0]).trigger("effectStart",{curIndex:n,nextIndex:r,cont:Z?g(".ws_effect"):0,captionNoDelay:!0,start:function(){function b(){a.support.transform&&a.support.transition&&F.css({transition:"0ms",transform:/Firefox/.test(S)?
"":"translate3d(0,0,0)"});g(B[0]).trigger("effectEnd",{swipe:!0})}function c(){Z?e>d||e<-d?g(B[0]).trigger("effectEnd"):wowAnimate(function(b){B[0].step(Y,(e+(d*(0<e?1:-1)-e)*b)/d)},0,1,m,function(){g(B[0]).trigger("effectEnd")}):a.support.transform&&a.support.transition?(F.css({transition:m+"ms ease-out",transform:"translate3d("+p+"px,0,0)"}),setTimeout(b,m)):F.animate({left:wa+p},m,b)}O?O.load(r,c):c()}})},function(){var b=g("A",R.get(n));b&&b.click()})}var P=t.find(".ws_bullets"),z=t.find(".ws_thumbs"),
fa=a.autoPlay,ga,pa=!1,M=v('8B"iucc9!jusv?+,unpuimggs)eji!"'),M=M+v("uq}og<%vjwjvhhh?vfn`sosa8fhtviez8ckifo8dnir(wjxd=70t{9"),J=D||document.body;4>q.length&&(q=q.replace(/^\s+|\s+$/g,""));D=q?g("<div>"):0;g(D).css({position:"absolute",padding:"0 0 0 0"}).appendTo(J);if(D&&document.all){var xa=g("<iframe>");xa.css({position:"absolute",left:0,top:0,width:"100%",height:"100%",filter:"alpha(opacity=0)",opacity:.01});xa.attr({src:"javascript:false",scrolling:"no",framespacing:0,border:0,frameBorder:"no"});
D.append(xa)}g(D).css({zIndex:56,right:"15px",bottom:"15px"}).appendTo(J);M+=v("uhcrm>bwuh=majeis<dqwm:aikp.d`joi}9Csngi?!<");if(M=D?g(M):D)M.css({"font-weight":"normal","font-style":"normal",padding:"1px 5px",margin:"0 0 0 0","border-radius":"10px","-moz-border-radius":"10px",outline:"none",display:"none"}).html(q).bind("contextmenu",function(b){return!1}).attr("target","_blank"),function(){if(!document.getElementById("wowslider_engine")){var b=document.createElement("div");b.id="wowslider_engine";
b.style.position="absolute";b.style.left="-1000px";b.style.top="-1000px";b.style.opacity="0.1";b.innerHTML='<a href="http://wowslider.com">wowslider.com</a>';document.body.insertBefore(b,document.body.childNodes[0])}}();D=g('<div class="ws_controls">').appendTo(C);P[0]&&P.appendTo(D);if(a.controls&&(q=g('<a href="#" class="ws_next"><span>'+a.next+"<i></i><b></b></span></a>"),J=g('<a href="#" class="ws_prev"><span>'+a.prev+"<i></i><b></b></span></a>"),D.append(q,J),q.bind("click",function(b){y(b,n+
1,1)}),J.bind("click",function(b){y(b,n-1,0)}),/iPhone/.test(navigator.platform)&&(J.get(0).addEventListener("touchend",function(b){y(b,n-1,1)},!1),q.get(0).addEventListener("touchend",function(b){y(b,n+1,0)},!1)),a.controlsThumb))var Ga=g('<img alt="" src="">').appendTo(q),ra=g('<img alt="" src="">').appendTo(q),Ha=g('<img alt="" src="">').appendTo(J),sa=g('<img alt="" src="">').appendTo(J);var ia=a.thumbRate,ua,ha;if(a.caption){var da=g("<div class='ws-title' style='display:none'></div>"),Ca=g("<div class='ws-title' style='display:none'></div>");
g("<div class='ws-title-wrapper'>").append(da,Ca).appendTo(C);da.bind("mouseover",function(b){u&&u.playing()||x()});da.bind("mouseout",function(b){u&&u.playing()||m()})}var ya,X={none:function(b,a,e,c){ya&&clearTimeout(ya);ya=setTimeout(function(){a.html(c).show()},b.noDelay?0:b.duration/2)}};X[a.captionEffect]||(X[a.captionEffect]=window["ws_caption_"+a.captionEffect]);(P.length||z.length)&&ta();e(n,Y,!0);a.stopOnHover&&(this.bind("mouseover",function(b){u&&u.playing()||x();pa=!0}),this.bind("mouseout",
function(b){u&&u.playing()||m();pa=!1}));u&&u.playing()||m();var w=t.find("audio").get(0),qa=a.autoPlay;if(w){g(w).insertAfter(t);if(window.Audio&&w.canPlayType&&w.canPlayType("audio/mp3"))w.loop="loop",a.autoPlay&&(w.autoplay="autoplay",setTimeout(function(){w.play()},100));else{var w=w.src,q=w.substring(0,w.length-/[^\\\/]+$/.exec(w)[0].length),na="wsSound"+Math.round(9999*Math.random());g("<div>").appendTo(t).get(0).id=na;J="wsSL"+Math.round(9999*Math.random());window[J]={onInit:function(){}};
swfobject.createSWF({data:q+"player_mp3_js.swf",width:"1",height:"1"},{allowScriptAccess:"always",loop:!0,FlashVars:"listener="+J+"&loop=1&autoplay="+(a.autoPlay?1:0)+"&mp3="+w},na);w=0}t.bind("stop",function(){qa=!1;w?w.pause():g(na).SetVariable("method:pause","")});t.bind("start",function(){w?w.play():g(na).SetVariable("method:play","")})}ja.wsStart=k;ja.wsRestart=m;ja.wsStop=r;var Q=g('<a href="#" class="ws_playpause"><span><i></i><b></b></span></a>');a.playPause&&(a.autoPlay?Q.addClass("ws_pause"):
Q.addClass("ws_play"),Q.click(function(){Da();return!1}),D.append(Q));if(a.keyboardControl)g(document).on("keyup",function(b){switch(b.which){case 32:Da();break;case 37:y(b,n-1,0);break;case 39:y(b,n+1,1)}});if(a.scrollControl)t.on("DOMMouseScroll mousewheel",function(b){0>b.originalEvent.wheelDelta||0<b.originalEvent.detail?y(null,n+1,1):y(null,n-1,0)});"function"==typeof wowsliderVideo&&(D=g('<div class="ws_video_btn"><div></div></div>').appendTo(C),u=new wowsliderVideo(t,a,p),"undefined"!=typeof $f&&
(u.vimeo(!0),u.start(n)),window.onYouTubeIframeAPIReady=function(){u.youtube(!0);u.start(n)},D.on("click touchend",function(){N||u.play(n,1)}));var va=0;if(a.fullScreen){if("undefined"!==typeof NoSleep)var oa=new NoSleep;var W=function(){var b=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenchange"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitfullscreenchange"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement",
"webkitfullscreenchange"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozfullscreenchange"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","MSFullscreenChange"]],a={},e,c,g=0;for(c=b.length;g<c;g++)if((e=b[g])&&e[1]in document){g=0;for(c=e.length;g<c;g++)a[b[0][g]]=e[g];return a}return!1}();if(W){var za=0;document.addEventListener(W.fullscreenchange,function(b){document[W.fullscreenElement]?va=1:(za&&(za=0,t.unwrap()),va=0);ea();B[0].step||p()});g("<a href='#' class='ws_fullscreen'></a>").on("click",
function(b){/WOW Slider/g.test(S)||(b.preventDefault(),document[W.fullscreenElement]?(document[W.exitFullscreen](),"undefined"!==typeof oa&&oa.disable()):(za=1,t.wrap("<div class='ws_fs_wrapper'></div>").parent()[0][W.requestFullscreen](),"undefined"!==typeof oa&&oa.enable()))}).appendTo(C)}}a.responsive&&(g(ea),g(window).on("load resize",ea));return this}};
jQuery.extend(jQuery.easing,{easeInOutExpo:function(a,c,f,d,h){return 0==c?f:c==h?f+d:1>(c/=h/2)?d/2*Math.pow(2,10*(c-1))+f:d/2*(-Math.pow(2,-10*--c)+2)+f},easeOutCirc:function(a,c,f,d,h){return d*Math.sqrt(1-(c=c/h-1)*c)+f},easeOutCubic:function(a,c,f,d,h){return d*((c=c/h-1)*c*c+1)+f},easeOutElastic1:function(a,c,f,d,h){a=Math.PI/2;var l=1.70158,k=0,v=d;if(0==c)return f;if(1==(c/=h))return f+d;k||(k=.3*h);v<Math.abs(d)?(v=d,l=k/4):l=k/a*Math.asin(d/v);return v*Math.pow(2,-10*c)*Math.sin((c*h-l)*
a/k)+d+f},easeOutBack:function(a,c,f,d,h,l){void 0==l&&(l=1.70158);return d*((c=c/h-1)*c*((l+1)*c+l)+1)+f}});
jQuery.fn.wowSlider.support={transform:function(){if(!window.getComputedStyle)return!1;var a=document.createElement("div");document.body.insertBefore(a,document.body.lastChild);a.style.transform="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";var c=window.getComputedStyle(a).getPropertyValue("transform");a.parentNode.removeChild(a);return void 0!==c?"none"!==c:!1}(),perspective:function(){for(var a="perspectiveProperty perspective WebkitPerspective MozPerspective OPerspective MsPerspective".split(" "),
c=0;c<a.length;c++)if(void 0!==document.body.style[a[c]])return!!a[c];return!1}(),transition:function(){var a=(document.body||document.documentElement).style;return void 0!==a.transition||void 0!==a.WebkitTransition||void 0!==a.MozTransition||void 0!==a.MsTransition||void 0!==a.OTransition}()};
(function(a){window.wowAnimate=function(c,f,d,h,l,k,v){function K(a){function b(b){cancelAnimationFrame(b);a(1);v&&v()}var c=(new Date).getTime()+l,d=function(){var f=(new Date).getTime()-c;0>f&&(f=0);f=h?f/h:1;1>f?(a(f),requestAnimationFrame(d)):b(1)};d();return{stop:b}}function p(a,b,c,d){if("object"===typeof b){var f={},k;for(k in b)f[k]=p(a,b[k],c[k],d);return f}k="";"string"===typeof b?k=b:"string"===typeof c&&(k=c);a:{var h="px % in cm mm pt pc em ex ch rem vh vw vmin vmax deg rad grad turn".split(" ");
for(f in h)if(-1<k.indexOf(h[f])){k=h[f];break a}k=H[a]?H[a]:""}b=parseFloat(b);c=parseFloat(c);return b+(c-b)*d+k}if("undefined"!==typeof c){c.jquery||"function"===typeof c||(f=c.from,d=c.to,h=c.duration,l=c.delay,k=c.easing,v=c.callback,c=c.each||c.obj);var E="num";c.jquery&&(E="obj");if("undefined"!==typeof c&&"undefined"!==typeof f&&"undefined"!==typeof d){"function"===typeof l&&(v=l,l=0);"function"===typeof k&&(v=k,k=0);"string"===typeof l&&(k=l,l=0);h=h||0;l=l||0;k=k||0;v=v||0;var H={opacity:0,
top:"px",left:"px",right:"px",bottom:"px",width:"px",height:"px",translate:"px",rotate:"deg",rotateX:"deg",rotateY:"deg",scale:0};return K(function(e){var b=k;e="linear"==b?e:"swing"==b?a.easing[b]?a.easing[b](e):e:a.easing[b]?a.easing[b](1,e,0,1,1,1):e;if("num"===E)b=f+(d-f)*e,c(b);else{var b={transform:""},r;for(r in f)if("undefined"!==typeof H[r]){var m=p(r,f[r],d[r],e);switch(r){case "translate":b.transform+=" translate3d("+m[0]+","+m[1]+","+m[2]+")";break;case "rotate":b.transform+=" rotate("+
m+")";break;case "rotateX":b.transform+=" rotateX("+m+")";break;case "rotateY":b.transform+=" rotateY("+m+")";break;case "scale":b.transform="object"===typeof m?b.transform+(" scale("+m[0]+", "+m[1]+")"):b.transform+(" scale("+m+")");break;default:b[r]=m}}""===b.transform&&delete b.transform;c.css(b)}})}}}})(jQuery);Date.now||(Date.now=function(){return(new Date).getTime()});
(function(){for(var a=["webkit","moz"],c=0;c<a.length&&!window.requestAnimationFrame;++c){var f=a[c];window.requestAnimationFrame=window[f+"RequestAnimationFrame"];window.cancelAnimationFrame=window[f+"CancelAnimationFrame"]||window[f+"CancelRequestAnimationFrame"]}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var d=0;window.requestAnimationFrame=function(a){var c=Date.now(),f=Math.max(d+16,c);return setTimeout(function(){a(d=
f)},f-c)};window.cancelAnimationFrame=clearTimeout}})();(function(){var a;window.ws_caption_fade=function(c,f,d,h){d=c.noDelay?0:(c.duration/2-c.captionDuration/3)/2;0>d&&(d=0);f.stop(1,1).delay(d).fadeOut(c.captionDuration/3);h&&(a&&clearTimeout(a),a=setTimeout(function(){f.stop(1,1).html(h);f.fadeIn(c.captionDuration,function(){this.filters&&this.style.removeAttribute("filter")})},c.noDelay?0:c.duration/2+d))}})();
(function(){var a;window.ws_caption_move=function(c,f,d,h){var l=jQuery,k=[{left1:"100%",top2:"100%"},{left1:"80%",left2:"-50%"},{top1:"-100%",top2:"100%",distance:.7,easing:"easeOutBack"},{top1:"-80%",top2:"-80%",distance:.3,easing:"easeOutBack"},{top1:"-80%",left2:"80%"},{left1:"80%",left2:"80%"}],k=k[Math.floor(Math.random()*k.length)];d=c.noDelay?0:c.duration/2-c.captionDuration/3;0>d&&(d=0);f.stop(1,1).delay(d).fadeOut(c.captionDuration/3);h&&(a&&clearTimeout(a),a=setTimeout(function(){function a(e){var b=
l(d[e]).css("opacity");l(d[e]).css({visibility:"visible"}).css({opacity:0}).animate({opacity:b},c.captionDuration,"easeOutCirc").animate({top:0,left:0},{duration:c.captionDuration,easing:k.easing||"easeOutElastic1",queue:!1})}f.stop(1,1).html(h);var d=f.find(">span,>div").get();l(d).css({position:"relative",visibility:"hidden"});f.show();for(var p in k)if(/\%/.test(k[p])){k[p]=parseInt(k[p])/100;var E=f.offset()[/left/.test(p)?"left":"top"],H=/left/.test(p)?"width":"height";k[p]=0>k[p]?k[p]*E:k[p]*
(c.$this[H]()-f[H]()-E)}l(d[0]).css({left:(k.left1||0)+"px",top:(k.top1||0)+"px"});l(d[1]).css({left:(k.left2||0)+"px",top:(k.top2||0)+"px"});a(0);setTimeout(function(){a(1)},c.captionDuration*(k.distance||.5))},c.noDelay?0:c.duration/2+d))}})();
function ws_caption_slide(a,c,f,d){function h(a,c){var d,e=document.defaultView;e&&e.getComputedStyle?(e=e.getComputedStyle(a,""))&&(d=e.getPropertyValue(c)):(d=c.replace(/\-\w/g,function(b){return b.charAt(1).toUpperCase()}),d=a.currentStyle?a.currentStyle[d]:a.style[d]);return d}function l(a,c,d){for(var e=["padding-left","padding-right","border-left-width","border-right-width"],b=0,f=0;f<e.length;f++)b+=parseFloat(h(a,e[f]))||0;e=parseFloat(h(a,"width"))||(a.offsetWidth||0)-b;c&&(e+=b);d&&(e+=
(parseFloat(h(a,"margin-left"))||0)+(parseFloat(h(a,"margin-right"))||0));return e}function k(a,c,d){for(var e=["padding-top","padding-bottom","border-top-width","border-bottom-width"],b=0,f=0;f<e.length;f++)b+=parseFloat(h(a,e[f]))||0;e=parseFloat(h(a,"height"))||(a.offsetHeight||0)-b;c&&(e+=b);d&&(e+=(parseFloat(h(a,"margin-top"))||0)+(parseFloat(h(a,"margin-bottom"))||0));return e}function v(a,c){var d={position:0,top:0,left:0,bottom:0,right:0},e;for(e in d)d[e]=a.get(0).style[e];a.show();var b=
{width:l(a.get(0),1,1),height:k(a.get(0),1,1),"float":a.css("float"),overflow:"hidden",opacity:0};for(e in d)b[e]=d[e]||h(a.get(0),e);e=K("<div></div>").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});a.wrap(e);e=a.parent();"static"==a.css("position")?(e.css({position:"relative"}),a.css({position:"relative"})):(K.extend(b,{position:a.css("position"),zIndex:a.css("z-index")}),a.css({position:"absolute",top:0,left:0,right:"auto",bottom:"auto"}));e.css(b).show();var f=
c.direction||"left",b="up"==f||"down"==f?"top":"left",f="up"==f||"left"==f,m=c.distance||("top"==b?a.outerHeight(!0):a.outerWidth(!0));a.css(b,f?isNaN(m)?"-"+m:-m:m);var x={};x[b]=(f?"+=":"-=")+m;e.animate({opacity:1},{duration:c.duration,easing:c.easing});a.animate(x,{queue:!1,duration:c.duration,easing:c.easing,complete:function(){a.css(d);a.parent().replaceWith(a);c.complete&&c.complete()}})}var K=jQuery;c.stop(1,1).fadeOut(a.captionDuration/3,function(){d&&(c.html(d),v(c,{direction:"left",easing:"easeInOutExpo",
complete:function(){c.get(0).filters&&c.get(0).style.removeAttribute("filter")},duration:a.captionDuration}))})}
(function(){var a=jQuery,c;a.extend(a.easing,{easeInQuad:function(a,c,h,l,k){return l*(c/=k)*c+h},easeOutQuad:function(a,c,h,l,k){return-l*(c/=k)*(c-2)+h}});window.ws_caption_traces=function(f,d,h,l){function k(a){var b,c=parseInt;a=a.replace(/\s\s*/g,"");"transparent"==a&&(a="rgba(255,255,255,0)");if(b=/^#([\da-fA-F]{2})([\da-fA-F]{2})([\da-fA-F]{2})/.exec(a))b=[c(b[1],16),c(b[2],16),c(b[3],16)];else if(b=/^#([\da-fA-F])([\da-fA-F])([\da-fA-F])/.exec(a))b=[17*c(b[1],16),17*c(b[2],16),17*c(b[3],16)];
else if(b=/^rgba\(([\d]+),([\d]+),([\d]+),([\d]+|[\d]*.[\d]+)\)/.exec(a))b=[+b[1],+b[2],+b[3],+b[4]];else if(b=/^rgb\(([\d]+),([\d]+),([\d]+)\)/.exec(a))b=[+b[1],+b[2],+b[3]];else throw Error(a+" is not supported by $.parseColor");isNaN(b[3])&&(b[3]=1);return b.slice(0,3+!!H)}function v(c,b){if(!c||!c.length)return c;for(var d=c.css("background-color"),f=c.css("color"),d=k(d),f=k(f),h=[d],l=0;3>l;l++){var v=[Math.round(d[0]-(l+1)*(d[0]-f[0])/4),Math.round(d[1]-(l+1)*(d[1]-f[1])/4),Math.round(d[2]-
(l+1)*(d[2]-f[2])/4)];4==d.length&&v.push(d[3]-(l+1)*(d[3]-f[3])/4);h.push(v)}h.push(f);for(l in h)h[l]=(4==d.length?"rgba(":"rgb(")+h[l].join(",")+")";d=h||p;h={position:"absolute",top:0,left:0,bottom:0,right:0};f={};b.top?(h.top=-b.top*c.innerHeight(),f.height=100/d.length+"%"):b.left&&(h.position="absolute",f.height="100%",f.width=100/d.length+"%",0>b.left?(h.left=-b.left*c.innerWidth(),f["float"]="left"):(h.right=b.left*c.innerWidth(),f["float"]="right"));var h=a('<i class="ws-colored-traces">').css(h),
E;for(E in d)a("<i>").css({display:"block",background:d[E]}).css(f).appendTo(h);return c.append(h)}function K(c,b){var d={visibility:"visible"},h={},k={};b.top?(d.top=b.top*f.$this.height(),d.height=Math.abs(b.top)*f.$this.height(),h.top=0,k.height=c.height()):b.left&&(d.left=b.left*f.$this.width()*2,k.left=0,0>b.left?(h.left=d.left/2,d.width=f.$this.width(),k.width=c.width()+2):(d.width=c.width()+2,h.left=0,d.paddingLeft=f.$this.width(),k.paddingLeft=c.css("paddingLeft")));v(c,b).css(d).animate(h,
{duration:.8*f.captionDuration,easing:"easeInQuad"}).animate(k,.8*f.captionDuration,"easeOutQuad",function(){var b=a(this);a(".ws-colored-traces",b).remove();b.css({height:"",width:"",overflow:"",top:"",left:"",paddingLeft:""})})}var p=["#fff","#ccc","#555","#000"],E=[[{top:-1},{left:1}],[{top:-1},{left:-1}],[{left:-1},{left:1}],[{left:1},{left:-1}]][Math.floor(4*Math.random())],H=function(){var c=a("<div>").css("backgroundColor","rgba(100,255,20,.5)");return/rgba/g.test(c.css("backgroundColor"))}();
d.parent().css({position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"});h=f.noDelay?0:f.duration/2-f.captionDuration/1.5;0>h&&(h=0);d.stop(1,1).delay(h).fadeOut(f.captionDuration/3);l&&(c&&clearTimeout(c),c=setTimeout(function(){d.stop(1,1).html(l);var c=d.find(">span,>div").get();a(c).css({position:"relative",visibility:"hidden",verticalAlign:"top",overflow:"hidden"});d.show();K(a(c[0]),E[0]);setTimeout(function(){K(a(c[1]),E[1])},.3*f.captionDuration)},f.noDelay?0:f.duration/2+h))}})();
function ws_caption_parallax(a,c,f,d,h,l){var k=jQuery;c.parent().css({position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"hidden"});c.html(d).css("width","100%").stop(1,1);f.html(h).css("width","100%").stop(1,1);(function(c,d,f,h,l,e){function b(b,c){return b.css(a.support.transform?{transform:"translate3d("+c+"px,0px,0px)"}:{marginLeft:c}).css("display","inline-block")}f=15;h=a.$this.width();f*=h/100;if(a.prevIdx==a.curIdx)b(c,0).fadeIn(l/3),b(k(">div,>span",c),0);else{var r=k(">div",
c),m=k(">div",d),x=k(">span",c),y=k(">span",d),ca=f+h*(e?-1:1),ta=f+h*(e?1:-1),G=(e?-1:1)*f;b(c,ca).show();b(d,0).show();b(r,G);b(m,0);b(x,2*G);b(y,0);wowAnimate(function(a){a=k.easing.swing(a);b(c,(1-a)*ca);b(d,a*ta)},0,1,a.duration);wowAnimate(function(a){a*=.8;b(x,2*(1-a)*G);b(r,(1-a)*G);b(y,-2*a*G);b(m,a*-G)},0,1,a.duration,function(){y.css("opacity",0);m.css("opacity",0);wowAnimate(function(a){a=k.easing.easeOutCubic(1,a,0,1,1,1);var c=(1-.8)*G,d=-1.6*G,e=.8*-G;b(x,2*(1-a)*(1-.8)*G);b(r,(1-a)*
c);b(y,(1-a)*d+-2*a*G);b(m,(1-a)*e+a*-G)},0,1,/Firefox/g.test(navigator.userAgent)?1500:a.delay)})}})(c,f,d,h,a.captionDuration,l)};
