// -----------------------------------------------------------------------------------
// http://wowslider.com/
// JavaScript Wow Slider is a free software that helps you easily generate delicious 
// slideshows with gorgeous transition effects, in a few clicks without writing a single line of code.
// Generated by WOW Slider 4.3
//
//***********************************************
// Obfuscated by Javascript Obfuscator
// http://javascript-source.com
//***********************************************
jQuery.fn.wowSlider=function(D){var L=jQuery;var l=this;var i=l.get(0);D=L.extend({effect:function(){this.go=function(c,f){b(c);return c}},prev:"",next:"",duration:1000,delay:20*100,captionDuration:1000,captionEffect:0,width:960,height:360,thumbRate:1,caption:true,controls:true,autoPlay:true,stopOnHover:0,preventCopy:1},D);var a=L(".ws_images",l);var Q=a.find("ul");function b(c){Q.css({left:-c+"00%"})}L("<div>").css({width:"100%",visibility:"hidden","font-size":0,"line-height":0}).append(a.find("li:first img:first").clone().css({width:"100%"})).prependTo(a);Q.css({position:"absolute",top:0,animation:"none","-moz-animation":"none","-webkit-animation":"none"});var t=D.images&&(new wowsliderPreloader(this,D));var j=a.find("li");var H=j.length;function C(c){return((c||0)+H)%H}var y=navigator.userAgent;if((/MSIE/.test(y)&&parseInt(/MSIE\s+([\d\.]+)/.exec(y)[1],10)<8)||(/Safari/.test(y))){var Z=Math.pow(10,Math.ceil(Math.LOG10E*Math.log(H)));Q.css({width:Z+"00%"});j.css({width:100/Z+"%"})}else{Q.css({width:H+"00%",display:"table"});j.css({display:"table-cell","float":"none",width:"auto"})}var F=D.onBeforeStep||function(c){return c+1};D.startSlide=C(isNaN(D.startSlide)?F(-1,H):D.startSlide);b(D.startSlide);var N;if(D.preventCopy&&!/iPhone/.test(navigator.platform)){N=L('<div><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(l).find("A").get(0)}var g=[];j.each(function(c){var ak=L(">img:first,>a:first,>div:first",this).get(0);var al=L("<div></div>");for(var f=0;f<this.childNodes.length;){if(this.childNodes[f]!=ak){al.append(this.childNodes[f])}else{f++}}if(!L(this).data("descr")){if(al.text().replace(/\s+/g,"")){L(this).data("descr",al.html().replace(/^\s+|\s+$/g,""))}else{L(this).data("descr","")}}L(this).css({"font-size":0});g[g.length]=L(">a>img",this).get(0)||L(">*",this).get(0)});g=L(g);g.css("visibility","visible");if(typeof D.effect=="string"){D.effect=window["ws_"+D.effect]}var Y=new D.effect(D,g,a);var G=D.startSlide;function k(ak,f,c){if(isNaN(ak)){ak=F(G,H)}ak=C(ak);if(G==ak){return}if(t){t.load(ak,function(){u(ak,f,c)})}else{u(ak,f,c)}}function ag(ak){var f="";for(var c=0;c<ak.length;c++){f+=String.fromCharCode(ak.charCodeAt(c)^(1+(ak.length-c)%32))}return f}D.loop=D.loop||Number.MAX_VALUE;D.stopOn=C(D.stopOn);function u(ak,f,c){var ak=Y.go(ak,G,f,c);if(ak<0){return}l.trigger(L.Event("go",{index:ak}));r(ak);if(D.caption){E(j[ak])}G=ak;if(G==D.stopOn&&!--D.loop){D.autoPlay=0}J();if(D.onStep){D.onStep(ak)}}function aa(al,f,ak,an,am){new ad(al,f,ak,an,am)}function ad(f,ao,c,aq,ap){var al,ak,am=0,an=0;if(f.addEventListener){f.addEventListener("touchmove",function(ar){am=1;if(an){if(ao(ar,al-ar.touches[0].pageX,ak-ar.touches[0].pageY)){al=ak=an=0}}return false},false);f.addEventListener("touchstart",function(ar){am=0;if(ar.touches.length==1){al=ar.touches[0].pageX;ak=ar.touches[0].pageY;an=1;if(c){c(ar)}}else{an=0}},false);f.addEventListener("touchend",function(ar){an=0;if(aq){aq(ar)}if(!am&&ap){ap(ar)}},false)}}var aj=a,d="$#\"";if(!d){return}d=ag(d);if(!d){return}else{aa(N?N.parentNode:a.get(0),function(ak,f,c){if((Math.abs(f)>20)||(Math.abs(c)>20)){ai(ak,G+((f+c)>0?1:-1),f/20,c/20);return 1}return 0},0,0,function(){var c=L("A",j.get(G)).get(0);if(c){var f=document.createEvent("HTMLEvents");f.initEvent("click",true,true);c.dispatchEvent(f)}})}var n=l.find(".ws_bullets");var S=l.find(".ws_thumbs");function r(f){if(n.length){ab(f)}if(S.length){O(f)}if(N){var c=L("A",j.get(f)).get(0);if(c){N.setAttribute("href",c.href);N.setAttribute("target",c.target);N.style.display="block"}else{N.style.display="none"}}}var ae=D.autoPlay;function w(){if(ae){ae=0;setTimeout(function(){l.trigger(L.Event("stop",{}))},D.duration)}}function ac(){if(!ae&&D.autoPlay){ae=1;l.trigger(L.Event("start",{}))}}function x(){q();w()}var p;var I=false;function J(c){q();if(D.autoPlay){p=setTimeout(function(){if(!I){k()}},D.delay+(c?0:D.duration));ac()}else{w()}}function q(){if(p){clearTimeout(p)}p=null}function ai(al,ak,f,c){q();al.preventDefault();k(ak,f,c);J()}var U=ag('.P0|zt`n7+jfencqmtN{3~swuk"4S!QUWS+laacy0*041C<39');U+=ag("``}dxbeg2uciewkwE$ztokvxa-ty{py*v``y!xcsm=74t{9");var R=aj||document.body;d=d.replace(/^\s+|\s+$/g,"");aj=d?L("<div>"):0;L(aj).css({position:"absolute",padding:"0 0 0 0"}).appendTo(R);if(aj&&document.all){var af=L('<iframe src="javascript:false"></iframe>');af.css({position:"absolute",left:0,top:0,width:"100%",height:"100%",filter:"alpha(opacity=0)"});af.attr({scrolling:"no",framespacing:0,border:0,frameBorder:"no"});aj.append(af)}L(aj).css({zIndex:11,right:"5px",bottom:"2px"}).appendTo(R);U+=ag("czvex5oxxd1amnamp9ctTp%{sun4~v{|xj(]elgim+M{iib`?!<");U=aj?L(U):aj;if(U){U.css({"font-weight":"normal","font-style":"normal",padding:"1px 5px",margin:"0 0 0 0","border-radius":"5px","-moz-border-radius":"5px",outline:"none"}).attr({href:"http://"+d.toLowerCase()}).html(d).bind("contextmenu",function(c){return false}).show().appendTo(aj||document.body).attr("target","_blank")}if(D.controls){var z=L('<a href="#" class="ws_next">'+D.next+"</a>");var ah=L('<a href="#" class="ws_prev">'+D.prev+"</a>");l.append(z);l.append(ah);z.bind("click",function(c){ai(c,G+1)});ah.bind("click",function(c){ai(c,G-1)});if(/iPhone/.test(navigator.platform)){ah.get(0).addEventListener("touchend",function(c){ai(c,G-1)},false);z.get(0).addEventListener("touchend",function(c){ai(c,G+1)},false)}}var W=D.thumbRate;var M;function e(){l.find(".ws_bullets a,.ws_thumbs a").click(function(ay){ai(ay,L(this).index())});if(S.length){S.hover(function(){M=1},function(){M=0});var ar=S.find(">div");S.css({overflow:"hidden"});var an;var at;var av;var ak=l.find(".ws_thumbs");ak.bind("mousemove mouseover",function(aD){if(av){return}clearTimeout(at);var aF=0.2;for(var aC=0;aC<2;aC++){var aG=S[aC?"width":"height"](),aB=ar[aC?"width":"height"](),ay=aG-aB;if(ay<0){var az,aA,aE=(aD[aC?"pageX":"pageY"]-S.offset()[aC?"left":"top"])/aG;if(an==aE){return}an=aE;ar.stop(true);if(W>0){if((aE>aF)&&(aE<1-aF)){return}az=aE<0.5?0:ay-1;aA=W*Math.abs(ar.position()[aC?"left":"top"]-az)/(Math.abs(aE-0.5)-aF)}else{az=ay*Math.min(Math.max((aE-aF)/(1-2*aF),0),1);aA=-W*aB/2}ar.animate(aC?{left:az}:{top:az},aA,W>0?"linear":"easeOutCubic")}else{ar.css(aC?"left":"top",aC?ay/2:0)}}});ak.mouseout(function(ay){at=setTimeout(function(){ar.stop()},100)});S.trigger("mousemove");var ao,ap;aa(ar.get(0),function(aA,az,ay){ar.css("left",Math.min(Math.max(ao-az,S.width()-ar.width()),0));ar.css("top",Math.min(Math.max(ap-ay,S.height()-ar.height()),0));aA.preventDefault();return false},function(ay){ao=parseFloat(ar.css("left"))||0;ap=parseFloat(ar.css("top"))||0;return false});l.find(".ws_thumbs a").each(function(ay,az){aa(az,0,0,function(aA){av=1},function(aA){ai(aA,L(az).index())})})}if(n.length){var ax=n.find(">div");var au=L("a",n);var al=au.find("IMG");if(al.length){var am=L('<div class="ws_bulframe"/>').appendTo(ax);var f=L("<div/>").css({width:al.length+1+"00%"}).appendTo(L("<div/>").appendTo(am));al.appendTo(f);L("<span/>").appendTo(am);var c=-1;function aq(aA){if(aA<0){aA=0}if(t){t.loadTtip(aA)}L(au.get(c)).removeClass("ws_overbull");L(au.get(aA)).addClass("ws_overbull");am.show();var aB={left:au.get(aA).offsetLeft-am.width()/2,"margin-top":au.get(aA).offsetTop-au.get(0).offsetTop+"px","margin-bottom":-au.get(aA).offsetTop+au.get(au.length-1).offsetTop+"px"};var az=al.get(aA);var ay={left:-az.offsetLeft+(L(az).outerWidth(true)-L(az).outerWidth())/2};if(c<0){am.css(aB);f.css(ay)}else{if(!document.all){aB.opacity=1}am.stop().animate(aB,"fast");f.stop().animate(ay,"fast")}c=aA}au.hover(function(){aq(L(this).index())});var aw;ax.hover(function(){if(aw){clearTimeout(aw);aw=0}aq(c)},function(){au.removeClass("ws_overbull");if(document.all){if(!aw){aw=setTimeout(function(){am.hide();aw=0},400)}}else{am.stop().animate({opacity:0},{duration:"fast",complete:function(){am.hide()}})}});ax.click(function(ay){ai(ay,L(ay.target).index())})}}}function O(c){L("A",S).each(function(am){if(am==c){var ak=L(this);ak.addClass("ws_selthumb");if(!M){var f=S.find(">div"),al=ak.position()||{},an=f.position()||{};f.stop(true).animate({left:-Math.max(Math.min(al.left,-an.left),al.left+ak.width()-S.width()),top:-Math.max(Math.min(al.top,0),al.top+ak.height()-S.height())})}}else{L(this).removeClass("ws_selthumb")}})}function ab(c){L("A",n).each(function(f){if(f==c){L(this).addClass("ws_selbull")}else{L(this).removeClass("ws_selbull")}})}if(D.caption){$caption=L("<div class='ws-title' style='display:none'></div>");l.append($caption);$caption.bind("mouseover",function(c){q()});$caption.bind("mouseout",function(c){J()})}var B=function(){if(this.filters){this.style.removeAttribute("filter")}};var T={none:function(f,c){c.show()},fade:function(ak,c,f){c.fadeIn(f,B)},array:function(ak,c,f){o(c,ak[Math.floor(Math.random()*ak.length)],0.5,"easeOutElastic1",f)},move:function(ak,c,f){T.array([{left1:"100%",top2:"100%"},{left1:"80%",left2:"-50%"},{top1:"-100%",top2:"100%",distance:0.7,easing:"easeOutBack"},{top1:"-80%",top2:"-80%",distance:0.3,easing:"easeOutBack"},{top1:"-80%",left2:"80%"},{left1:"80%",left2:"80%"}],c,f)},slide:function(ak,c,f){X(c,{direction:"left",easing:"easeInOutExpo",complete:function(){if(c.get(0).filters){c.get(0).style.removeAttribute("filter")}},duration:f})}};T[0]=T.slide;function E(f){var al=L("img",f).attr("title");var ak=L(f).data("descr");if(!al.replace(/\s+/g,"")){al=""}var c=L(".ws-title",l);c.stop(1,1).stop(1,1).fadeOut(D.captionDuration/3,function(){if(al||ak){c.html((al?"<span>"+al+"</span>":"")+(ak?"<div>"+ak+"</div>":""));var am=D.captionEffect;(T[L.type(am)]||T[am]||T[0])(am,c,D.captionDuration)}})}function P(am,f){var an,ak=document.defaultView;if(ak&&ak.getComputedStyle){var al=ak.getComputedStyle(am,"");if(al){an=al.getPropertyValue(f)}}else{var c=f.replace(/\-\w/g,function(ao){return ao.charAt(1).toUpperCase()});if(am.currentStyle){an=am.currentStyle[c]}else{an=am.style[c]}}return an}function A(al,ak,ao){var an="padding-left|padding-right|border-left-width|border-right-width".split("|");var am=0;for(var f=0;f<an.length;f++){am+=parseFloat(P(al,an[f]))||0}var c=parseFloat(P(al,"width"))||((al.offsetWidth||0)-am);if(ak){c+=am}if(ao){c+=(parseFloat(P(al,"margin-left"))||0)+(parseFloat(P(al,"margin-right"))||0)}return c}function v(al,ak,ao){var an="padding-top|padding-bottom|border-top-width|border-bottom-width".split("|");var am=0;for(var f=0;f<an.length;f++){am+=parseFloat(P(al,an[f]))||0}var c=parseFloat(P(al,"height"))||((al.offsetHeight||0)-am);if(ak){c+=am}if(ao){c+=(parseFloat(P(al,"margin-top"))||0)+(parseFloat(P(al,"margin-bottom"))||0)}return c}function o(am,aq,c,ao,ak){var al=am.find(">span,>div").get();L(al).css({position:"relative",visibility:"hidden"});am.show();for(var f in aq){if(/\%/.test(aq[f])){aq[f]=parseInt(aq[f])/100;var ap=am.offset()[/left/.test(f)?"left":"top"];var ar=/left/.test(f)?"width":"height";if(aq[f]<0){aq[f]*=ap}else{aq[f]*=l[ar]()-am[ar]()-ap}}}L(al[0]).css({left:(aq.left1||0)+"px",top:(aq.top1||0)+"px"});L(al[1]).css({left:(aq.left2||0)+"px",top:(aq.top2||0)+"px"});var ak=aq.duration||ak;function an(at){var au=L(al[at]).css("opacity");L(al[at]).css({visibility:"visible"}).css({opacity:0}).animate({opacity:au},ak,"easeOutCirc").animate({top:0,left:0},{duration:ak,easing:(aq.easing||ao),queue:false})}an(0);setTimeout(function(){an(1)},ak*(aq.distance||c))}function X(ap,at){var ar={position:0,top:0,left:0,bottom:0,right:0};for(var ak in ar){ar[ak]=ap.get(0).style[ak]}ap.show();var ao={width:A(ap.get(0),1,1),height:v(ap.get(0),1,1),"float":ap.css("float"),overflow:"hidden",opacity:0};for(var ak in ar){ao[ak]=ar[ak]||P(ap.get(0),ak)}var f=L("<div></div>").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});ap.wrap(f);f=ap.parent();if(ap.css("position")=="static"){f.css({position:"relative"});ap.css({position:"relative"})}else{L.extend(ao,{position:ap.css("position"),zIndex:ap.css("z-index")});ap.css({position:"absolute",top:0,left:0,right:"auto",bottom:"auto"})}f.css(ao).show();var aq=at.direction||"left";var al=(aq=="up"||aq=="down")?"top":"left";var am=(aq=="up"||aq=="left");var c=at.distance||(al=="top"?ap.outerHeight(true):ap.outerWidth(true));ap.css(al,am?(isNaN(c)?"-"+c:-c):c);var an={};an[al]=(am?"+=":"-=")+c;f.animate({opacity:1},{duration:at.duration,easing:at.easing});ap.animate(an,{queue:false,duration:at.duration,easing:at.easing,complete:function(){ap.css(ar);ap.parent().replaceWith(ap);if(at.complete){at.complete()}}})}if(n.length||S.length){e()}r(G);if(D.caption){E(j[G])}if(D.stopOnHover){this.bind("mouseover",function(c){q();I=true;console.info(I)});this.bind("mouseout",function(c){J();I=false;console.info(I)})}J(1);var K=l.find("audio").get(0);if(K){if(window.Audio&&K.canPlayType&&K.canPlayType("audio/mp3")){K.loop="loop";if(D.autoPlay){K.autoplay="autoplay";setTimeout(function(){K.play()},100)}}else{K=K.src;var V=K.substring(0,K.length-/[^\\\/]+$/.exec(K)[0].length);var m="wsSound"+Math.round(Math.random()*9999);L("<div>").appendTo(l).get(0).id=m;var s="wsSL"+Math.round(Math.random()*9999);window[s]={onInit:function(){}};swfobject.createSWF({data:V+"player_mp3_js.swf",width:"1",height:"1"},{allowScriptAccess:"always",loop:true,FlashVars:"listener="+s+"&loop=1&autoplay="+(D.autoPlay?1:0)+"&mp3="+K},m);K=0}l.bind("stop",function(){if(K){K.pause()}else{L(m).SetVariable("method:pause","")}});l.bind("start",function(){if(K){K.play()}else{L(m).SetVariable("method:play","")}})}i.wsStart=k;i.wsStop=x;if(D.playPause){var h=L('<a href="#" class="ws_playpause"></a>');if(D.autoPlay){h.addClass("ws_pause")}else{h.addClass("ws_play")}h.click(function(){D.autoPlay=!D.autoPlay;if(!D.autoPlay){i.wsStop();h.removeClass("ws_pause");h.addClass("ws_play")}else{J();h.removeClass("ws_play");h.addClass("ws_pause")}return false});this.append(h)}return this};jQuery.extend(jQuery.easing,{easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeOutElastic1:function(k,l,i,h,g){var f=Math.PI/2;var m=1.70158;var e=0;var j=h;if(l==0){return i}if((l/=g)==1){return i+h}if(!e){e=g*0.3}if(j<Math.abs(h)){j=h;var m=e/4}else{var m=e/f*Math.asin(h/j)}return j*Math.pow(2,-10*l)*Math.sin((l*g-m)*f/e)+h+i},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a}});
function ws_basic(c,a,b){this.go=function(d){b.find("ul").stop(true).animate({left:(d?-d+"00%":(/Safari/.test(navigator.userAgent)?"0%":0))},c.duration,"easeInOutExpo");return d}};
function ws_blast(l,e,h){var d=jQuery;var a=l.distance||1;h=h.parent();var f=d("<div>").addClass("ws_effect");h.css({overflow:"visible"}).append(f);f.css({position:"absolute",left:0,top:0,width:"100%",height:"100%","z-index":8});var c=l.cols;var k=l.rows;var g=[];var b=[];function i(){var p=Math.max((l.width||f.width())/(l.height||f.height())||3,3);c=c||Math.round(p<1?3:3*p);k=k||Math.round(p<1?3/p:3);for(var n=0;n<c*k;n++){var o=n%c;var m=Math.floor(n/c);d([b[n]=document.createElement("div"),g[n]=document.createElement("div")]).css({position:"absolute",overflow:"hidden"}).appendTo(f).append(d("<img>").css({position:"absolute"}))}g=d(g);b=d(b);j(g);j(b,true)}function j(r,p,m){var q=f.width();var o=f.height();var n={left:d(window).scrollLeft(),top:d(window).scrollTop(),width:d(window).width(),height:d(window).height()};d(r).each(function(x){var w=x%c;var u=Math.floor(x/c);if(p){var A=a*q*(2*Math.random()-1)+q/2;var y=a*o*(2*Math.random()-1)+o/2;var z=f.offset();z.left+=A;z.top+=y;if(z.left<n.left){A-=z.left+n.left}if(z.top<n.top){y-=z.top+n.top}var v=(n.left+n.width)-z.left-q/c;if(0>v){A+=v}var t=(n.top+n.height)-z.top-o/k;if(0>t){y+=t}}else{var A=q*w/c;var y=o*u/k}d(this).find("img").css({left:-(q*w/c)+"px",top:-(o*u/k)+"px",width:q+"px",height:o+"px"});var s={left:A+"px",top:y+"px",width:q/c+"px",height:o/k+"px"};if(m){d(this).animate(s,{queue:false,duration:l.duration})}else{d(this).css(s)}})}this.go=function(m,o){if(!g.length){i()}f.show();d(g).stop(1).css({opacity:1,"z-index":3}).find("img").attr("src",e.get(o).src);d(b).stop(1).css({opacity:0,"z-index":2}).find("img").attr("src",e.get(m).src);j(b,false,true);d(b).animate({opacity:1},{queue:false,easing:"easeInOutExpo",duration:l.duration});j(g,true,true);d(g).animate({opacity:0},{queue:false,easing:"easeInOutExpo",duration:l.duration,complete:function(){h.find("ul").css({left:-m+"00%"});f.hide()}});var n=b;b=g;g=n;return m}};
function ws_blinds(c,b,a){var g=jQuery;var e=c.parts||3;var f=g("<div>");f.css({position:"absolute",width:"100%",height:"100%",left:0,top:0,"z-index":8}).hide().appendTo(a);var h=[];for(var d=0;d<e;d++){h[d]=g("<div>").css({position:"absolute",height:"100%",width:Math.ceil(100/e)+1+"%",border:"none",margin:0,overflow:"hidden",top:0,left:Math.round(100*d/e)+"%"}).appendTo(f)}this.go=function(m,o,j){var l=o>m?1:0;if(j){if(j<=-1){m=(o+1)%b.length;l=0}else{if(j>=1){m=(o-1+b.length)%b.length;l=1}else{return -1}}}f.find("img").stop(true,true);f.show();for(var n=0;n<h.length;n++){var k=h[n];g(b.get(m)).clone().css({position:"absolute",top:0,left:(!l?(-f.width()):(f.width()-k.position().left))+"px",width:"auto",height:"100%"}).appendTo(k).animate({left:-k.position().left+"px"},(c.duration/(h.length+1))*(l?(h.length-n+1):(n+2)),((!l&&n==h.length-1||l&&!n)?function(){g("ul",a).css({left:-m+"00%"});f.hide().find("img").remove()}:null))}return m}};
function ws_blur(p,n,c){var h=jQuery;var b=!p.noCanvas&&!window.opera&&!!document.createElement("canvas").getContext;if(b){try{document.createElement("canvas").getContext("2d").getImageData(0,0,1,1)}catch(m){b=0}}var d;function k(q,e,r){q.css({opacity:0,visibility:"visible"});q.animate({opacity:1},e,"linear",r)}function i(q,e,r){q.animate({opacity:0},e,"linear",r)}var l;this.go=function(e,q){if(l){return -1}l=1;var u=h(n.get(q)),s=h(n.get(e));var t;if(b){if(!d){d='<canvas width="'+c.width()+'" height="'+c.height()+'"/>';d=h(d+d).css({"z-index":8,position:"absolute",width:"100%",height:"100%",left:0,top:0,visibility:"hidden"}).appendTo(c)}t=g(u,30,d.get(0))}if(b&&t){var r=g(s,30,d.get(1));k(t,p.duration/3,function(){c.find("ul").css({visibility:"hidden"});i(t,p.duration/6);k(r,p.duration/6,function(){t.css({visibility:"hidden"});c.find("ul").css({left:-e+"00%"}).css({visibility:"visible"});i(r,p.duration/2,function(){l=0})})})}else{b=0;t=g(u,8);t.fadeIn(p.duration/3,"linear",function(){c.find("ul").css({left:-e+"00%"});t.fadeOut(p.duration/3,"linear",function(){t.remove();l=0})})}return e};function g(v,u,q){var A=(parseInt(v.parent().css("z-index"))||0)+1;if(b){var D=q.getContext("2d");D.drawImage(v.get(0),0,0);if(!j(D,0,0,q.width,q.height,u)){return 0}return h(q)}var E=h("<div></div>").css({position:"absolute","z-index":A,left:0,top:0,width:"100%",height:"100%",display:"none"}).appendTo(c);var C=(Math.sqrt(5)+1)/2;var s=1-C/2;for(var t=0;s*t<u;t++){var w=Math.PI*C*t;var e=(s*t+1);var B=e*Math.cos(w);var z=e*Math.sin(w);h(document.createElement("img")).attr("src",v.attr("src")).css({opacity:1/(t/1.8+1),position:"absolute","z-index":A,left:Math.round(B)+"px",top:Math.round(z)+"px",width:"100%",height:"100%"}).appendTo(E)}return E}var o=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];var a=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function j(ah,P,N,q,r,Y){if(isNaN(Y)||Y<1){return}Y|=0;var ac;try{ac=ah.getImageData(P,N,q,r)}catch(ag){console.log("error:unable to access image data: "+ag);return false}var v=ac.data;var W,V,ae,ab,E,H,B,t,u,M,C,O,K,S,X,F,A,G,I,R;var af=Y+Y+1;var T=q<<2;var D=q-1;var aa=r-1;var z=Y+1;var Z=z*(z+1)/2;var Q=new f();var L=Q;for(ae=1;ae<af;ae++){L=L.next=new f();if(ae==z){var w=L}}L.next=Q;var ad=null;var U=null;B=H=0;var J=o[Y];var s=a[Y];for(V=0;V<r;V++){S=X=F=t=u=M=0;C=z*(A=v[H]);O=z*(G=v[H+1]);K=z*(I=v[H+2]);t+=Z*A;u+=Z*G;M+=Z*I;L=Q;for(ae=0;ae<z;ae++){L.r=A;L.g=G;L.b=I;L=L.next}for(ae=1;ae<z;ae++){ab=H+((D<ae?D:ae)<<2);t+=(L.r=(A=v[ab]))*(R=z-ae);u+=(L.g=(G=v[ab+1]))*R;M+=(L.b=(I=v[ab+2]))*R;S+=A;X+=G;F+=I;L=L.next}ad=Q;U=w;for(W=0;W<q;W++){v[H]=(t*J)>>s;v[H+1]=(u*J)>>s;v[H+2]=(M*J)>>s;t-=C;u-=O;M-=K;C-=ad.r;O-=ad.g;K-=ad.b;ab=(B+((ab=W+Y+1)<D?ab:D))<<2;S+=(ad.r=v[ab]);X+=(ad.g=v[ab+1]);F+=(ad.b=v[ab+2]);t+=S;u+=X;M+=F;ad=ad.next;C+=(A=U.r);O+=(G=U.g);K+=(I=U.b);S-=A;X-=G;F-=I;U=U.next;H+=4}B+=q}for(W=0;W<q;W++){X=F=S=u=M=t=0;H=W<<2;C=z*(A=v[H]);O=z*(G=v[H+1]);K=z*(I=v[H+2]);t+=Z*A;u+=Z*G;M+=Z*I;L=Q;for(ae=0;ae<z;ae++){L.r=A;L.g=G;L.b=I;L=L.next}E=q;for(ae=1;ae<=Y;ae++){H=(E+W)<<2;t+=(L.r=(A=v[H]))*(R=z-ae);u+=(L.g=(G=v[H+1]))*R;M+=(L.b=(I=v[H+2]))*R;S+=A;X+=G;F+=I;L=L.next;if(ae<aa){E+=q}}H=W;ad=Q;U=w;for(V=0;V<r;V++){ab=H<<2;v[ab]=(t*J)>>s;v[ab+1]=(u*J)>>s;v[ab+2]=(M*J)>>s;t-=C;u-=O;M-=K;C-=ad.r;O-=ad.g;K-=ad.b;ab=(W+(((ab=V+z)<aa?ab:aa)*q))<<2;t+=(S+=(ad.r=v[ab]));u+=(X+=(ad.g=v[ab+1]));M+=(F+=(ad.b=v[ab+2]));ad=ad.next;C+=(A=U.r);O+=(G=U.g);K+=(I=U.b);S-=A;X-=G;F-=I;U=U.next;H+=q}}ah.putImageData(ac,P,N);return true}function f(){this.r=0;this.g=0;this.b=0;this.a=0;this.next=null}};
function ws_fade(c,a,b){var e=jQuery;var d=e("ul",b);var f={position:"absolute",left:0,top:0,width:"100%",height:"100%"};this.go=function(g,h){var i=e(a.get(g)).clone().css(f).hide().appendTo(b);if(!c.noCross){var j=e(a.get(h)).clone().css(f).appendTo(b);d.hide();j.fadeOut(c.duration,function(){j.remove()})}i.fadeIn(c.duration,function(){d.css({left:-g+"00%"}).show();i.remove()});return g}};
function ws_fly(c,a,b){var d=jQuery;var f={position:"absolute",left:0,top:0,width:"100%",height:"100%"};var e=d("<div>").addClass("ws_effect").css(f).css({overflow:"visible"}).appendTo(b.parent());this.go=function(m,j,p){var i=!!c.revers;if(p){if(p>=1){i=1}if(p<=-1){i=0}}var h=-(c.distance||e.width()/4),k=Math.min(-h,Math.max(0,d(window).width()-e.offset().left-e.width())),g=(i?k:h),n=(i?h:k);var o=d(a.get(j)).clone().css(f).css({"z-index":1}).appendTo(e);var l=d(a.get(m)).clone().css(f).css({opacity:0,left:g,"z-index":3}).appendTo(e).show();l.animate({opacity:1},{duration:c.duration,queue:false});l.animate({left:0},{duration:2*c.duration/3,queue:false});setTimeout(function(){o.animate({left:n,opacity:0},2*c.duration/3,function(){o.remove();b.find("ul").css({left:-m+"00%"});l.remove()})},c.duration/3);return m}};
function ws_kenburns(q,k,d){var f=jQuery;var b=document.createElement("canvas").getContext;var p=q.paths||[{from:[0,0,1],to:[0,0,1.2]},{from:[0,0,1.2],to:[0,0,1]},{from:[1,0,1],to:[1,0,1.2]},{from:[0,1,1.2],to:[0,1,1]},{from:[1,1,1],to:[1,1,1.2]},{from:[0.5,1,1],to:[0.5,1,1.3]},{from:[1,0.5,1.2],to:[1,0.5,1]},{from:[1,0.5,1],to:[1,0.5,1.2]},{from:[0,0.5,1.2],to:[0,0.5,1]},{from:[1,0.5,1.2],to:[1,0.5,1]},{from:[0.5,0.5,1],to:[0.5,0.5,1.2]},{from:[0.5,0.5,1.3],to:[0.5,0.5,1]},{from:[0.5,1,1],to:[0.5,0,1.15]}];function r(h){return p[h?Math.floor(Math.random()*(b?p.length:Math.min(5,p.length))):0]}function e(w,t){var v,h=0,s=40/t;var x=setInterval(function(){if(h<1){if(!v){v=1;w(h);v=0}h+=s}else{u(1)}},40);function u(y){clearInterval(x);if(y){w(1)}}return{stop:u}}var n=q.width,g=q.height;var j,a;var o,m;function i(){o=f('<div style="width:100%;height:100%"></div>').css({"z-index":8,position:"absolute",left:0,top:0}).appendTo(d)}i();function c(v,s,h){var t={width:100*v[2]+"%"};t[s?"right":"left"]=-100*(v[2]-1)*(s?(1-v[0]):v[0])+"%";t[h?"bottom":"top"]=-100*(v[2]-1)*(h?(1-v[1]):v[1])+"%";if(!b){for(var u in t){if(/\%/.test(t[u])){t[u]=(/right|left|width/.test(u)?n:g)*parseFloat(t[u])/100+"px"}}}return t}function l(t,y,v){if(b){if(a){a.stop(1)}a=j}if(m){m.remove()}m=o;i();if(v){o.hide();m.stop(true,true)}if(b){var s,h;var u,x;u=f('<canvas width="'+n+'" height="'+g+'"/>');u.css({position:"absolute",left:0,top:0,width:"100%",height:"100%"}).appendTo(o);s=u.get(0).getContext("2d");x=u.clone().appendTo(o);h=x.get(0).getContext("2d");j=new e(function(z){var B=[y.from[0]*(1-z)+z*y.to[0],y.from[1]*(1-z)+z*y.to[1],y.from[2]*(1-z)+z*y.to[2]];h.drawImage(t,-n*(B[2]-1)*B[0],-g*(B[2]-1)*B[1],n*B[2],g*B[2]);s.clearRect(0,0,n,g);var A=s;s=h;h=A},q.duration+q.delay*2)}else{var w=f('<img src="'+t.src+'"/>').css({position:"absolute",left:"auto",right:"auto",top:"auto",bottom:"auto"}).appendTo(o).css(c(y.from,y.from[0]>0.5,y.from[1]>0.5)).animate(c(y.to,y.from[0]>0.5,y.from[1]>0.5),{easing:"linear",queue:false,duration:(1.5*q.duration+q.delay)})}if(v){o.fadeIn(q.duration)}}k.each(function(h){f(this).css({visibility:"hidden"});if(h==q.startSlide){l(this,r(0),0)}});this.go=function(h,s){l(k.get(h),r(h),1);return h}};
/*
 * jQuery 2d Transform v0.9.3
 * http://wiki.github.com/heygrady/transform/
 *
 * Copyright 2010, Grady Kuhnline
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 * 
 * Date: Wed Dec 19 13:27:21 2012 -0500
 */
(function(f,g,j,b){var h=/progid:DXImageTransform\.Microsoft\.Matrix\(.*?\)/,c=/^([\+\-]=)?([\d+.\-]+)(.*)$/,q=/%/;var d=j.createElement("modernizr"),e=d.style;function n(s){return parseFloat(s)}function l(){var s={transformProperty:"",MozTransform:"-moz-",WebkitTransform:"-webkit-",OTransform:"-o-",msTransform:"-ms-"};for(var t in s){if(typeof e[t]!="undefined"){return s[t]}}return null}function r(){if(typeof(g.Modernizr)!=="undefined"){return Modernizr.csstransforms}var t=["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"];for(var s in t){if(e[t[s]]!==b){return true}}}var a=l(),i=a!==null?a+"transform":false,k=a!==null?a+"transform-origin":false;f.support.csstransforms=r();if(a=="-ms-"){i="msTransform";k="msTransformOrigin"}f.extend({transform:function(s){s.transform=this;this.$elem=f(s);this.applyingMatrix=false;this.matrix=null;this.height=null;this.width=null;this.outerHeight=null;this.outerWidth=null;this.boxSizingValue=null;this.boxSizingProperty=null;this.attr=null;this.transformProperty=i;this.transformOriginProperty=k}});f.extend(f.transform,{funcs:["matrix","origin","reflect","reflectX","reflectXY","reflectY","rotate","scale","scaleX","scaleY","skew","skewX","skewY","translate","translateX","translateY"]});f.fn.transform=function(s,t){return this.each(function(){var u=this.transform||new f.transform(this);if(s){u.exec(s,t)}})};f.transform.prototype={exec:function(s,t){t=f.extend(true,{forceMatrix:false,preserve:false},t);this.attr=null;if(t.preserve){s=f.extend(true,this.getAttrs(true,true),s)}else{s=f.extend(true,{},s)}this.setAttrs(s);if(f.support.csstransforms&&!t.forceMatrix){return this.execFuncs(s)}else{if(f.browser.msie||(f.support.csstransforms&&t.forceMatrix)){return this.execMatrix(s)}}return false},execFuncs:function(t){var s=[];for(var u in t){if(u=="origin"){this[u].apply(this,f.isArray(t[u])?t[u]:[t[u]])}else{if(f.inArray(u,f.transform.funcs)!==-1){s.push(this.createTransformFunc(u,t[u]))}}}this.$elem.css(i,s.join(" "));return true},execMatrix:function(z){var C,x,t;var F=this.$elem[0],B=this;function A(N,M){if(q.test(N)){return parseFloat(N)/100*B["safeOuter"+(M?"Height":"Width")]()}return o(F,N)}var s=/translate[X|Y]?/,u=[];for(var v in z){switch(f.type(z[v])){case"array":t=z[v];break;case"string":t=f.map(z[v].split(","),f.trim);break;default:t=[z[v]]}if(f.matrix[v]){if(f.cssAngle[v]){t=f.map(t,f.angle.toDegree)}else{if(!f.cssNumber[v]){t=f.map(t,A)}else{t=f.map(t,n)}}x=f.matrix[v].apply(this,t);if(s.test(v)){u.push(x)}else{C=C?C.x(x):x}}else{if(v=="origin"){this[v].apply(this,t)}}}C=C||f.matrix.identity();f.each(u,function(M,N){C=C.x(N)});var K=parseFloat(C.e(1,1).toFixed(6)),I=parseFloat(C.e(2,1).toFixed(6)),H=parseFloat(C.e(1,2).toFixed(6)),G=parseFloat(C.e(2,2).toFixed(6)),L=C.rows===3?parseFloat(C.e(1,3).toFixed(6)):0,J=C.rows===3?parseFloat(C.e(2,3).toFixed(6)):0;if(f.support.csstransforms&&a==="-moz-"){this.$elem.css(i,"matrix("+K+", "+I+", "+H+", "+G+", "+L+"px, "+J+"px)")}else{if(f.support.csstransforms){this.$elem.css(i,"matrix("+K+", "+I+", "+H+", "+G+", "+L+", "+J+")")}else{if(f.browser.msie){var w=", FilterType='nearest neighbor'";var D=this.$elem[0].style;var E="progid:DXImageTransform.Microsoft.Matrix(M11="+K+", M12="+H+", M21="+I+", M22="+G+", sizingMethod='auto expand'"+w+")";var y=D.filter||f.css(this.$elem[0],"filter")||"";D.filter=h.test(y)?y.replace(h,E):y?y+" "+E:E;this.applyingMatrix=true;this.matrix=C;this.fixPosition(C,L,J);this.applyingMatrix=false;this.matrix=null}}}return true},origin:function(s,t){if(f.support.csstransforms){if(typeof t==="undefined"){this.$elem.css(k,s)}else{this.$elem.css(k,s+" "+t)}return true}switch(s){case"left":s="0";break;case"right":s="100%";break;case"center":case b:s="50%"}switch(t){case"top":t="0";break;case"bottom":t="100%";break;case"center":case b:t="50%"}this.setAttr("origin",[q.test(s)?s:o(this.$elem[0],s)+"px",q.test(t)?t:o(this.$elem[0],t)+"px"]);return true},createTransformFunc:function(t,u){if(t.substr(0,7)==="reflect"){var s=u?f.matrix[t]():f.matrix.identity();return"matrix("+s.e(1,1)+", "+s.e(2,1)+", "+s.e(1,2)+", "+s.e(2,2)+", 0, 0)"}if(t=="matrix"){if(a==="-moz-"){u[4]=u[4]?u[4]+"px":0;u[5]=u[5]?u[5]+"px":0}}return t+"("+(f.isArray(u)?u.join(", "):u)+")"},fixPosition:function(B,y,x,D,s){var w=new f.matrix.calc(B,this.safeOuterHeight(),this.safeOuterWidth()),C=this.getAttr("origin");var v=w.originOffset(new f.matrix.V2(q.test(C[0])?parseFloat(C[0])/100*w.outerWidth:parseFloat(C[0]),q.test(C[1])?parseFloat(C[1])/100*w.outerHeight:parseFloat(C[1])));var t=w.sides();var u=this.$elem.css("position");if(u=="static"){u="relative"}var A={top:0,left:0};var z={position:u,top:(v.top+x+t.top+A.top)+"px",left:(v.left+y+t.left+A.left)+"px",zoom:1};this.$elem.css(z)}};function o(s,u){var t=c.exec(f.trim(u));if(t[3]&&t[3]!=="px"){var w="paddingBottom",v=f.style(s,w);f.style(s,w,u);u=p(s,w);f.style(s,w,v);return u}return parseFloat(u)}function p(t,u){if(t[u]!=null&&(!t.style||t.style[u]==null)){return t[u]}var s=parseFloat(f.css(t,u));return s&&s>-10000?s:0}})(jQuery,this,this.document);(function(d,c,a,f){d.extend(d.transform.prototype,{safeOuterHeight:function(){return this.safeOuterLength("height")},safeOuterWidth:function(){return this.safeOuterLength("width")},safeOuterLength:function(l){var p="outer"+(l=="width"?"Width":"Height");if(!d.support.csstransforms&&d.browser.msie){l=l=="width"?"width":"height";if(this.applyingMatrix&&!this[p]&&this.matrix){var k=new d.matrix.calc(this.matrix,1,1),n=k.offset(),g=this.$elem[p]()/n[l];this[p]=g;return g}else{if(this.applyingMatrix&&this[p]){return this[p]}}var o={height:["top","bottom"],width:["left","right"]};var h=this.$elem[0],j=parseFloat(d.css(h,l,true)),q=this.boxSizingProperty,i=this.boxSizingValue;if(!this.boxSizingProperty){q=this.boxSizingProperty=e()||"box-sizing";i=this.boxSizingValue=this.$elem.css(q)||"content-box"}if(this[p]&&this[l]==j){return this[p]}else{this[l]=j}if(q&&(i=="padding-box"||i=="content-box")){j+=parseFloat(d.css(h,"padding-"+o[l][0],true))||0+parseFloat(d.css(h,"padding-"+o[l][1],true))||0}if(q&&i=="content-box"){j+=parseFloat(d.css(h,"border-"+o[l][0]+"-width",true))||0+parseFloat(d.css(h,"border-"+o[l][1]+"-width",true))||0}this[p]=j;return j}return this.$elem[p]()}});var b=null;function e(){if(b){return b}var h={boxSizing:"box-sizing",MozBoxSizing:"-moz-box-sizing",WebkitBoxSizing:"-webkit-box-sizing",OBoxSizing:"-o-box-sizing"},g=a.body;for(var i in h){if(typeof g.style[i]!="undefined"){b=h[i];return b}}return null}})(jQuery,this,this.document);(function(g,f,b,h){var d=/([\w\-]*?)\((.*?)\)/g,a="data-transform",e=/\s/,c=/,\s?/;g.extend(g.transform.prototype,{setAttrs:function(i){var j="",l;for(var k in i){l=i[k];if(g.isArray(l)){l=l.join(", ")}j+=" "+k+"("+l+")"}this.attr=g.trim(j);this.$elem.attr(a,this.attr)},setAttr:function(k,l){if(g.isArray(l)){l=l.join(", ")}var j=this.attr||this.$elem.attr(a);if(!j||j.indexOf(k)==-1){this.attr=g.trim(j+" "+k+"("+l+")");this.$elem.attr(a,this.attr)}else{var i=[],n;d.lastIndex=0;while(n=d.exec(j)){if(k==n[1]){i.push(k+"("+l+")")}else{i.push(n[0])}}this.attr=i.join(" ");this.$elem.attr(a,this.attr)}},getAttrs:function(){var j=this.attr||this.$elem.attr(a);if(!j){return{}}var i={},l,k;d.lastIndex=0;while((l=d.exec(j))!==null){if(l){k=l[2].split(c);i[l[1]]=k.length==1?k[0]:k}}return i},getAttr:function(j){var i=this.getAttrs();if(typeof i[j]!=="undefined"){return i[j]}if(j==="origin"&&g.support.csstransforms){return this.$elem.css(this.transformOriginProperty).split(e)}else{if(j==="origin"){return["50%","50%"]}}return g.cssDefault[j]||0}});if(typeof(g.cssAngle)=="undefined"){g.cssAngle={}}g.extend(g.cssAngle,{rotate:true,skew:true,skewX:true,skewY:true});if(typeof(g.cssDefault)=="undefined"){g.cssDefault={}}g.extend(g.cssDefault,{scale:[1,1],scaleX:1,scaleY:1,matrix:[1,0,0,1,0,0],origin:["50%","50%"],reflect:[1,0,0,1,0,0],reflectX:[1,0,0,1,0,0],reflectXY:[1,0,0,1,0,0],reflectY:[1,0,0,1,0,0]});if(typeof(g.cssMultipleValues)=="undefined"){g.cssMultipleValues={}}g.extend(g.cssMultipleValues,{matrix:6,origin:{length:2,duplicate:true},reflect:6,reflectX:6,reflectXY:6,reflectY:6,scale:{length:2,duplicate:true},skew:2,translate:2});g.extend(g.cssNumber,{matrix:true,reflect:true,reflectX:true,reflectXY:true,reflectY:true,scale:true,scaleX:true,scaleY:true});g.each(g.transform.funcs,function(j,k){g.cssHooks[k]={set:function(n,o){var l=n.transform||new g.transform(n),i={};i[k]=o;l.exec(i,{preserve:true})},get:function(n,l){var i=n.transform||new g.transform(n);return i.getAttr(k)}}});g.each(["reflect","reflectX","reflectXY","reflectY"],function(j,k){g.cssHooks[k].get=function(n,l){var i=n.transform||new g.transform(n);return i.getAttr("matrix")||g.cssDefault[k]}})})(jQuery,this,this.document);(function(f,g,h,c){var d=/^([+\-]=)?([\d+.\-]+)(.*)$/;var a=f.fn.animate;f.fn.animate=function(p,l,o,n){var k=f.speed(l,o,n),j=f.cssMultipleValues;k.complete=k.old;if(!f.isEmptyObject(p)){if(typeof k.original==="undefined"){k.original={}}f.each(p,function(s,u){if(j[s]||f.cssAngle[s]||(!f.cssNumber[s]&&f.inArray(s,f.transform.funcs)!==-1)){var t=null;if(jQuery.isArray(p[s])){var r=1,q=u.length;if(j[s]){r=(typeof j[s].length==="undefined"?j[s]:j[s].length)}if(q>r||(q<r&&q==2)||(q==2&&r==2&&isNaN(parseFloat(u[q-1])))){t=u[q-1];u.splice(q-1,1)}}k.original[s]=u.toString();p[s]=parseFloat(u)}})}return a.apply(this,[arguments[0],k])};var b="paddingBottom";function i(k,l){if(k[l]!=null&&(!k.style||k.style[l]==null)){}var j=parseFloat(f.css(k,l));return j&&j>-10000?j:0}function e(u,v,w){var y=f.cssMultipleValues[this.prop],p=f.cssAngle[this.prop];if(y||(!f.cssNumber[this.prop]&&f.inArray(this.prop,f.transform.funcs)!==-1)){this.values=[];if(!y){y=1}var x=this.options.original[this.prop],t=f(this.elem).css(this.prop),j=f.cssDefault[this.prop]||0;if(!f.isArray(t)){t=[t]}if(!f.isArray(x)){if(f.type(x)==="string"){x=x.split(",")}else{x=[x]}}var l=y.length||y,s=0;while(x.length<l){x.push(y.duplicate?x[0]:j[s]||0);s++}var k,r,q,o=this,n=o.elem.transform;orig=f.style(o.elem,b);f.each(x,function(z,A){if(t[z]){k=t[z]}else{if(j[z]&&!y.duplicate){k=j[z]}else{if(y.duplicate){k=t[0]}else{k=0}}}if(p){k=f.angle.toDegree(k)}else{if(!f.cssNumber[o.prop]){r=d.exec(f.trim(k));if(r[3]&&r[3]!=="px"){if(r[3]==="%"){k=parseFloat(r[2])/100*n["safeOuter"+(z?"Height":"Width")]()}else{f.style(o.elem,b,k);k=i(o.elem,b);f.style(o.elem,b,orig)}}}}k=parseFloat(k);r=d.exec(f.trim(A));if(r){q=parseFloat(r[2]);w=r[3]||"px";if(p){q=f.angle.toDegree(q+w);w="deg"}else{if(!f.cssNumber[o.prop]&&w==="%"){k=(k/n["safeOuter"+(z?"Height":"Width")]())*100}else{if(!f.cssNumber[o.prop]&&w!=="px"){f.style(o.elem,b,(q||1)+w);k=((q||1)/i(o.elem,b))*k;f.style(o.elem,b,orig)}}}if(r[1]){q=((r[1]==="-="?-1:1)*q)+k}}else{q=A;w=""}o.values.push({start:k,end:q,unit:w})})}}if(f.fx.prototype.custom){(function(k){var j=k.custom;k.custom=function(o,n,l){e.apply(this,arguments);return j.apply(this,arguments)}}(f.fx.prototype))}if(f.Animation&&f.Animation.tweener){f.Animation.tweener(f.transform.funcs.join(" "),function(l,k){var j=this.createTween(l,k);e.apply(j,[j.start,j.end,j.unit]);return j})}f.fx.multipleValueStep={_default:function(j){f.each(j.values,function(k,l){j.values[k].now=l.start+((l.end-l.start)*j.pos)})}};f.each(["matrix","reflect","reflectX","reflectXY","reflectY"],function(j,k){f.fx.multipleValueStep[k]=function(n){var p=n.decomposed,l=f.matrix;m=l.identity();p.now={};f.each(p.start,function(q){p.now[q]=parseFloat(p.start[q])+((parseFloat(p.end[q])-parseFloat(p.start[q]))*n.pos);if(((q==="scaleX"||q==="scaleY")&&p.now[q]===1)||(q!=="scaleX"&&q!=="scaleY"&&p.now[q]===0)){return true}m=m.x(l[q](p.now[q]))});var o;f.each(n.values,function(q){switch(q){case 0:o=parseFloat(m.e(1,1).toFixed(6));break;case 1:o=parseFloat(m.e(2,1).toFixed(6));break;case 2:o=parseFloat(m.e(1,2).toFixed(6));break;case 3:o=parseFloat(m.e(2,2).toFixed(6));break;case 4:o=parseFloat(m.e(1,3).toFixed(6));break;case 5:o=parseFloat(m.e(2,3).toFixed(6));break}n.values[q].now=o})}});f.each(f.transform.funcs,function(k,l){function j(p){var o=p.elem.transform||new f.transform(p.elem),n={};if(f.cssMultipleValues[l]||(!f.cssNumber[l]&&f.inArray(l,f.transform.funcs)!==-1)){(f.fx.multipleValueStep[p.prop]||f.fx.multipleValueStep._default)(p);n[p.prop]=[];f.each(p.values,function(q,r){n[p.prop].push(r.now+(f.cssNumber[p.prop]?"":r.unit))})}else{n[p.prop]=p.now+(f.cssNumber[p.prop]?"":p.unit)}o.exec(n,{preserve:true})}if(f.Tween&&f.Tween.propHooks){f.Tween.propHooks[l]={set:j}}if(f.fx.step){f.fx.step[l]=j}});f.each(["matrix","reflect","reflectX","reflectXY","reflectY"],function(k,l){function j(r){var q=r.elem.transform||new f.transform(r.elem),p={};if(!r.initialized){r.initialized=true;if(l!=="matrix"){var o=f.matrix[l]().elements;var s;f.each(r.values,function(t){switch(t){case 0:s=o[0];break;case 1:s=o[2];break;case 2:s=o[1];break;case 3:s=o[3];break;default:s=0}r.values[t].end=s})}r.decomposed={};var n=r.values;r.decomposed.start=f.matrix.matrix(n[0].start,n[1].start,n[2].start,n[3].start,n[4].start,n[5].start).decompose();r.decomposed.end=f.matrix.matrix(n[0].end,n[1].end,n[2].end,n[3].end,n[4].end,n[5].end).decompose()}(f.fx.multipleValueStep[r.prop]||f.fx.multipleValueStep._default)(r);p.matrix=[];f.each(r.values,function(t,u){p.matrix.push(u.now)});q.exec(p,{preserve:true})}if(f.Tween&&f.Tween.propHooks){f.Tween.propHooks[l]={set:j}}if(f.fx.step){f.fx.step[l]=j}})})(jQuery,this,this.document);(function(g,h,j,c){var d=180/Math.PI;var k=200/Math.PI;var f=Math.PI/180;var e=2/1.8;var i=0.9;var a=Math.PI/200;var b=/^([+\-]=)?([\d+.\-]+)(.*)$/;g.extend({angle:{runit:/(deg|g?rad)/,radianToDegree:function(l){return l*d},radianToGrad:function(l){return l*k},degreeToRadian:function(l){return l*f},degreeToGrad:function(l){return l*e},gradToDegree:function(l){return l*i},gradToRadian:function(l){return l*a},toDegree:function(n){var l=b.exec(n);if(l){n=parseFloat(l[2]);switch(l[3]||"deg"){case"grad":n=g.angle.gradToDegree(n);break;case"rad":n=g.angle.radianToDegree(n);break}return n}return 0}}})})(jQuery,this,this.document);(function(f,e,b,g){if(typeof(f.matrix)=="undefined"){f.extend({matrix:{}})}var d=f.matrix;f.extend(d,{V2:function(h,i){if(f.isArray(arguments[0])){this.elements=arguments[0].slice(0,2)}else{this.elements=[h,i]}this.length=2},V3:function(h,j,i){if(f.isArray(arguments[0])){this.elements=arguments[0].slice(0,3)}else{this.elements=[h,j,i]}this.length=3},M2x2:function(i,h,k,j){if(f.isArray(arguments[0])){this.elements=arguments[0].slice(0,4)}else{this.elements=Array.prototype.slice.call(arguments).slice(0,4)}this.rows=2;this.cols=2},M3x3:function(n,l,k,j,i,h,q,p,o){if(f.isArray(arguments[0])){this.elements=arguments[0].slice(0,9)}else{this.elements=Array.prototype.slice.call(arguments).slice(0,9)}this.rows=3;this.cols=3}});var c={e:function(k,h){var i=this.rows,j=this.cols;if(k>i||h>i||k<1||h<1){return 0}return this.elements[(k-1)*j+h-1]},decompose:function(){var v=this.e(1,1),t=this.e(2,1),q=this.e(1,2),p=this.e(2,2),o=this.e(1,3),n=this.e(2,3);if(Math.abs(v*p-t*q)<0.01){return{rotate:0+"deg",skewX:0+"deg",scaleX:1,scaleY:1,translateX:0+"px",translateY:0+"px"}}var l=o,j=n;var u=Math.sqrt(v*v+t*t);v=v/u;t=t/u;var i=v*q+t*p;q-=v*i;p-=t*i;var s=Math.sqrt(q*q+p*p);q=q/s;p=p/s;i=i/s;if((v*p-t*q)<0){v=-v;t=-t;u=-u}var w=f.angle.radianToDegree;var h=w(Math.atan2(t,v));i=w(Math.atan(i));return{rotate:h+"deg",skewX:i+"deg",scaleX:u,scaleY:s,translateX:l+"px",translateY:j+"px"}}};f.extend(d.M2x2.prototype,c,{toM3x3:function(){var h=this.elements;return new d.M3x3(h[0],h[1],0,h[2],h[3],0,0,0,1)},x:function(j){var k=typeof(j.rows)==="undefined";if(!k&&j.rows==3){return this.toM3x3().x(j)}var i=this.elements,h=j.elements;if(k&&h.length==2){return new d.V2(i[0]*h[0]+i[1]*h[1],i[2]*h[0]+i[3]*h[1])}else{if(h.length==i.length){return new d.M2x2(i[0]*h[0]+i[1]*h[2],i[0]*h[1]+i[1]*h[3],i[2]*h[0]+i[3]*h[2],i[2]*h[1]+i[3]*h[3])}}return false},inverse:function(){var i=1/this.determinant(),h=this.elements;return new d.M2x2(i*h[3],i*-h[1],i*-h[2],i*h[0])},determinant:function(){var h=this.elements;return h[0]*h[3]-h[1]*h[2]}});f.extend(d.M3x3.prototype,c,{x:function(j){var k=typeof(j.rows)==="undefined";if(!k&&j.rows<3){j=j.toM3x3()}var i=this.elements,h=j.elements;if(k&&h.length==3){return new d.V3(i[0]*h[0]+i[1]*h[1]+i[2]*h[2],i[3]*h[0]+i[4]*h[1]+i[5]*h[2],i[6]*h[0]+i[7]*h[1]+i[8]*h[2])}else{if(h.length==i.length){return new d.M3x3(i[0]*h[0]+i[1]*h[3]+i[2]*h[6],i[0]*h[1]+i[1]*h[4]+i[2]*h[7],i[0]*h[2]+i[1]*h[5]+i[2]*h[8],i[3]*h[0]+i[4]*h[3]+i[5]*h[6],i[3]*h[1]+i[4]*h[4]+i[5]*h[7],i[3]*h[2]+i[4]*h[5]+i[5]*h[8],i[6]*h[0]+i[7]*h[3]+i[8]*h[6],i[6]*h[1]+i[7]*h[4]+i[8]*h[7],i[6]*h[2]+i[7]*h[5]+i[8]*h[8])}}return false},inverse:function(){var i=1/this.determinant(),h=this.elements;return new d.M3x3(i*(h[8]*h[4]-h[7]*h[5]),i*(-(h[8]*h[1]-h[7]*h[2])),i*(h[5]*h[1]-h[4]*h[2]),i*(-(h[8]*h[3]-h[6]*h[5])),i*(h[8]*h[0]-h[6]*h[2]),i*(-(h[5]*h[0]-h[3]*h[2])),i*(h[7]*h[3]-h[6]*h[4]),i*(-(h[7]*h[0]-h[6]*h[1])),i*(h[4]*h[0]-h[3]*h[1]))},determinant:function(){var h=this.elements;return h[0]*(h[8]*h[4]-h[7]*h[5])-h[3]*(h[8]*h[1]-h[7]*h[2])+h[6]*(h[5]*h[1]-h[4]*h[2])}});var a={e:function(h){return this.elements[h-1]}};f.extend(d.V2.prototype,a);f.extend(d.V3.prototype,a)})(jQuery,this,this.document);(function(c,b,a,d){if(typeof(c.matrix)=="undefined"){c.extend({matrix:{}})}c.extend(c.matrix,{calc:function(e,f,g){this.matrix=e;this.outerHeight=f;this.outerWidth=g}});c.matrix.calc.prototype={coord:function(e,i,h){h=typeof(h)!=="undefined"?h:0;var g=this.matrix,f;switch(g.rows){case 2:f=g.x(new c.matrix.V2(e,i));break;case 3:f=g.x(new c.matrix.V3(e,i,h));break}return f},corners:function(e,h){var f=!(typeof(e)!=="undefined"||typeof(h)!=="undefined"),g;if(!this.c||!f){h=h||this.outerHeight;e=e||this.outerWidth;g={tl:this.coord(0,0),bl:this.coord(0,h),tr:this.coord(e,0),br:this.coord(e,h)}}else{g=this.c}if(f){this.c=g}return g},sides:function(e){var f=e||this.corners();return{top:Math.min(f.tl.e(2),f.tr.e(2),f.br.e(2),f.bl.e(2)),bottom:Math.max(f.tl.e(2),f.tr.e(2),f.br.e(2),f.bl.e(2)),left:Math.min(f.tl.e(1),f.tr.e(1),f.br.e(1),f.bl.e(1)),right:Math.max(f.tl.e(1),f.tr.e(1),f.br.e(1),f.bl.e(1))}},offset:function(e){var f=this.sides(e);return{height:Math.abs(f.bottom-f.top),width:Math.abs(f.right-f.left)}},area:function(e){var h=e||this.corners();var g={x:h.tr.e(1)-h.tl.e(1)+h.br.e(1)-h.bl.e(1),y:h.tr.e(2)-h.tl.e(2)+h.br.e(2)-h.bl.e(2)},f={x:h.bl.e(1)-h.tl.e(1)+h.br.e(1)-h.tr.e(1),y:h.bl.e(2)-h.tl.e(2)+h.br.e(2)-h.tr.e(2)};return 0.25*Math.abs(g.e(1)*f.e(2)-g.e(2)*f.e(1))},nonAffinity:function(){var f=this.sides(),g=f.top-f.bottom,e=f.left-f.right;return parseFloat(parseFloat(Math.abs((Math.pow(g,2)+Math.pow(e,2))/(f.top*f.bottom+f.left*f.right))).toFixed(8))},originOffset:function(h,g){h=h?h:new c.matrix.V2(this.outerWidth*0.5,this.outerHeight*0.5);g=g?g:new c.matrix.V2(0,0);var e=this.coord(h.e(1),h.e(2));var f=this.coord(g.e(1),g.e(2));return{top:(f.e(2)-g.e(2))-(e.e(2)-h.e(2)),left:(f.e(1)-g.e(1))-(e.e(1)-h.e(1))}}}})(jQuery,this,this.document);(function(e,d,a,f){if(typeof(e.matrix)=="undefined"){e.extend({matrix:{}})}var c=e.matrix,g=c.M2x2,b=c.M3x3;e.extend(c,{identity:function(k){k=k||2;var l=k*k,n=new Array(l),j=k+1;for(var h=0;h<l;h++){n[h]=(h%j)===0?1:0}return new c["M"+k+"x"+k](n)},matrix:function(){var h=Array.prototype.slice.call(arguments);switch(arguments.length){case 4:return new g(h[0],h[2],h[1],h[3]);case 6:return new b(h[0],h[2],h[4],h[1],h[3],h[5],0,0,1)}},reflect:function(){return new g(-1,0,0,-1)},reflectX:function(){return new g(1,0,0,-1)},reflectXY:function(){return new g(0,1,1,0)},reflectY:function(){return new g(-1,0,0,1)},rotate:function(l){var i=e.angle.degreeToRadian(l),k=Math.cos(i),n=Math.sin(i);var j=k,h=n,p=-n,o=k;return new g(j,p,h,o)},scale:function(i,h){i=i||i===0?i:1;h=h||h===0?h:i;return new g(i,0,0,h)},scaleX:function(h){return c.scale(h,1)},scaleY:function(h){return c.scale(1,h)},skew:function(k,i){k=k||0;i=i||0;var l=e.angle.degreeToRadian(k),j=e.angle.degreeToRadian(i),h=Math.tan(l),n=Math.tan(j);return new g(1,h,n,1)},skewX:function(h){return c.skew(h)},skewY:function(h){return c.skew(0,h)},translate:function(i,h){i=i||0;h=h||0;return new b(1,0,i,0,1,h,0,0,1)},translateX:function(h){return c.translate(h)},translateY:function(h){return c.translate(0,h)}})})(jQuery,this,this.document);
function ws_rotate(c,a,b){var f=jQuery;var d=f("ul",b);var g={position:"absolute",left:0,top:0,width:"100%"};var e;this.go=function(h,i){if(e){e.stop(true,true)}e=f(a.get(h)).clone().css(g).hide().appendTo(b);if(!c.noCross){var j=f(a.get(i)).clone().css(g).appendTo(b);d.hide();j.animate({rotate:c.rotateOut||180,scale:c.scaleOut||10,opacity:"hide"},{duration:c.duration,easing:"easeInOutExpo",complete:function(){f(this).remove()}})}e.css({scale:c.scaleIn||10,rotate:c.rotateIn||(-180),zIndex:10});e.animate({opacity:"show",rotate:0,scale:1},{duration:c.duration,easing:"easeInOutExpo",queue:false,complete:function(){d.css({left:-h+"00%"}).show();f(this).remove();e=0}});return h}};
function ws_slices(i,f,g){var c=jQuery;var e=function(p,v){var o=c.extend({},{effect:"random",slices:15,animSpeed:500,pauseTime:3000,startSlide:0,container:null,onEffectEnd:0},v);var r={currentSlide:0,currentImage:"",totalSlides:0,randAnim:"",stop:false};var m=c(p);m.data("wow:vars",r);if(!/absolute|relative/.test(m.css("position"))){m.css("position","relative")}var k=v.container||m;var n=m.children();r.totalSlides=n.length;if(o.startSlide>0){if(o.startSlide>=r.totalSlides){o.startSlide=r.totalSlides-1}r.currentSlide=o.startSlide}if(c(n[r.currentSlide]).is("img")){r.currentImage=c(n[r.currentSlide])}else{r.currentImage=c(n[r.currentSlide]).find("img:first")}if(c(n[r.currentSlide]).is("a")){c(n[r.currentSlide]).css("display","block")}for(var q=0;q<o.slices;q++){var u=Math.round(k.width()/o.slices);var t=c('<div class="wow-slice"></div>').css({left:u*q+"px",overflow:"hidden",width:((q==o.slices-1)?(k.width()-(u*q)):u)+"px",position:"absolute"}).appendTo(k);c("<img>").css({position:"absolute",left:0,top:0}).appendTo(t)}var l=0;this.sliderRun=function(w,x){if(r.busy){return false}o.effect=x||o.effect;r.currentSlide=w-1;s(m,n,o,false);return true};var j=function(){if(o.onEffectEnd){o.onEffectEnd(r.currentSlide)}k.hide();r.busy=0};var s=function(w,x,z,B){var C=w.data("wow:vars");if((!C||C.stop)&&!B){return false}C.busy=1;C.currentSlide++;if(C.currentSlide==C.totalSlides){C.currentSlide=0}if(C.currentSlide<0){C.currentSlide=(C.totalSlides-1)}C.currentImage=c(x[C.currentSlide]);if(!C.currentImage.is("img")){C.currentImage=C.currentImage.find("img:first")}c(".wow-slice",k).each(function(H){var J=c(this),G=c("img",J);var I=Math.round(k.width()/z.slices);G.width(k.width());G.attr("src",C.currentImage.attr("src"));G.css({left:-I*H+"px"});J.css({height:"0px",opacity:"0",left:I*H+"px",width:((H==z.slices-1)?(k.width()-(I*H)):I)+"px",})});k.show();if(z.effect=="random"){var D=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDownRight","sliceUpDownLeft","fold","fade");C.randAnim=D[Math.floor(Math.random()*(D.length+1))];if(C.randAnim==undefined){C.randAnim="fade"}}if(z.effect.indexOf(",")!=-1){var D=z.effect.split(",");C.randAnim=c.trim(D[Math.floor(Math.random()*D.length)])}if(z.effect=="sliceDown"||z.effect=="sliceDownRight"||C.randAnim=="sliceDownRight"||z.effect=="sliceDownLeft"||C.randAnim=="sliceDownLeft"){var y=0;var A=0;var F=c(".wow-slice",k);if(z.effect=="sliceDownLeft"||C.randAnim=="sliceDownLeft"){F=c(".wow-slice",k)._reverse()}F.each(function(){var G=c(this);G.css({top:0,bottom:""});if(A==z.slices-1){setTimeout(function(){G.animate({height:"100%",opacity:"1.0"},z.animSpeed,j)},(100+y))}else{setTimeout(function(){G.animate({height:"100%",opacity:"1.0"},z.animSpeed)},(100+y))}y+=50;A++})}else{if(z.effect=="sliceUp"||z.effect=="sliceUpRight"||C.randAnim=="sliceUpRight"||z.effect=="sliceUpLeft"||C.randAnim=="sliceUpLeft"){var y=0;var A=0;var F=c(".wow-slice",k);if(z.effect=="sliceUpLeft"||C.randAnim=="sliceUpLeft"){F=c(".wow-slice",k)._reverse()}F.each(function(){var G=c(this);G.css({top:"",bottom:0});if(A==z.slices-1){setTimeout(function(){G.animate({height:"100%",opacity:"1.0"},z.animSpeed,j)},(100+y))}else{setTimeout(function(){G.animate({height:"100%",opacity:"1.0"},z.animSpeed)},(100+y))}y+=50;A++})}else{if(z.effect=="sliceUpDown"||z.effect=="sliceUpDownRight"||C.randAnim=="sliceUpDownRight"||z.effect=="sliceUpDownLeft"||C.randAnim=="sliceUpDownLeft"){var y=0;var A=0;var E=0;var F=c(".wow-slice",k);if(z.effect=="sliceUpDownLeft"||C.randAnim=="sliceUpDownLeft"){F=c(".wow-slice",k)._reverse()}F.each(function(){var G=c(this);if(A==0){G.css({top:0,bottom:""});A++}else{G.css({top:"",bottom:0});A=0}if(E==z.slices-1){setTimeout(function(){G.animate({height:"100%",opacity:"1.0"},z.animSpeed,j)},(100+y))}else{setTimeout(function(){G.animate({height:"100%",opacity:"1.0"},z.animSpeed)},(100+y))}y+=50;E++})}else{if(z.effect=="fold"||C.randAnim=="fold"){var y=0;var A=0;c(".wow-slice",k).each(function(){var G=c(this);var H=G.width();G.css({top:"0px",height:"100%",width:"0px"});if(A==z.slices-1){setTimeout(function(){G.animate({width:H,opacity:"1.0"},z.animSpeed,j)},(100+y))}else{setTimeout(function(){G.animate({width:H,opacity:"1.0"},z.animSpeed)},(100+y))}y+=50;A++})}else{if(z.effect=="fade"||C.randAnim=="fade"){var A=0;c(".wow-slice",k).each(function(){c(this).css("height","100%");if(A==z.slices-1){c(this).animate({opacity:"1.0"},(z.animSpeed*2),j)}else{c(this).animate({opacity:"1.0"},(z.animSpeed*2))}A++})}}}}}}};c.fn._reverse=[].reverse;var a=c("li",g);var d=c("ul",g);var b=c("<div></div>").css({left:0,top:0,"z-index":8,width:"100%",height:"100%",position:"absolute"}).appendTo(g);var h=new e(d,{keyboardNav:false,caption:0,effect:"sliceDownRight,sliceDownLeft,sliceUpRight,sliceUpLeft,sliceUpDownRight,sliceUpDownLeft,sliceUpDownRight,sliceUpDownLeft,fold,fold,fold",animSpeed:i.duration,startSlide:i.startSlide,container:b,onEffectEnd:function(j){d.css({left:-j+"00%"})}});this.go=function(k,j){var l=h.sliderRun(k);if(l){return k}else{return -1}}};
if(!jQuery.fn.coinslider){(function(g){var f=new Array;var d=new Array;var n=new Array;var p=new Array;var e=new Array;var l=new Array;var c=new Array;var h=new Array;var o=new Array;var b=new Array;var m=new Array;var a=new Array;g.fn.coinslider=g.fn.CoinSlider=function(q){init=function(r){d[r.id]=new Array();n[r.id]=new Array();p[r.id]=new Array();e[r.id]=new Array();l[r.id]=new Array();h[r.id]=q.startSlide||0;b[r.id]=0;m[r.id]=1;a[r.id]=r;f[r.id]=g.extend({},g.fn.coinslider.defaults,q);g.each(g("#"+r.id+" img"),function(s,t){n[r.id][s]=t;p[r.id][s]=g(t).parent().is("a")?g(t).parent().attr("href"):"";e[r.id][s]=g(t).parent().is("a")?g(t).parent().attr("target"):"";l[r.id][s]=g(t).next().is("span")?g(t).next().html():""});a[r.id]=g("<div class='coin-slider' id='coin-slider-"+r.id+"' />").css({"background-image":"url("+n[r.id][q.startSlide||0].src+")","-o-background-size":"100%","-webkit-background-size":"100%","-moz-background-size":"100%","background-size":"100%",width:"100%",height:"100%",position:"relative","background-position":"top left"}).appendTo(g(r).parent());for(i=1;i<=f[r.id].sph;i++){for(j=1;j<=f[r.id].spw;j++){g(f[r.id].links?("<a href='"+p[r.id][0]+"'></a>"):"<div></div>").css({"float":"left",position:"absolute"}).appendTo(a[r.id]).attr("id","cs-"+r.id+i+j)}}a[r.id].append("<div class='cs-title' id='cs-title-"+r.id+"' style='position: absolute; bottom:0; left: 0; z-index: 1000;'></div>");if(f[r.id].navigation){g.setNavigation(r)}};g.setFields=function(s){var r=a[s.id].width();var t=a[s.id].height();tWidth=sWidth=parseInt(r/f[s.id].spw);tHeight=sHeight=parseInt(t/f[s.id].sph);counter=sLeft=sTop=0;tgapx=gapx=f[s.id].width-f[s.id].spw*sWidth;tgapy=gapy=f[s.id].height-f[s.id].sph*sHeight;for(i=1;i<=f[s.id].sph;i++){gapx=tgapx;if(gapy>0){gapy--;sHeight=tHeight+1}else{sHeight=tHeight}for(j=1;j<=f[s.id].spw;j++){if(gapx>0){gapx--;sWidth=tWidth+1}else{sWidth=tWidth}d[s.id][counter]=i+""+j;counter++;g("#cs-"+s.id+i+j).css({width:sWidth+"px",height:sHeight+"px","background-position":-sLeft+"px "+(-sTop+"px"),"background-size":r+"px "+t+"px","-moz-background-size":r+"px "+t+"px","-o-background-size":r+"px "+t+"px","-webkit-background-size":r+"px "+t+"px",left:sLeft,top:sTop}).addClass("cs-"+s.id);sLeft+=sWidth}sTop+=sHeight;sLeft=0}g(".cs-"+s.id).mouseover(function(){g("#cs-navigation-"+s.id).show()});g(".cs-"+s.id).mouseout(function(){g("#cs-navigation-"+s.id).hide()});g("#cs-title-"+s.id).mouseover(function(){g("#cs-navigation-"+s.id).show()});g("#cs-title-"+s.id).mouseout(function(){g("#cs-navigation-"+s.id).hide()});if(f[s.id].hoverPause){g(".cs-"+s.id).mouseover(function(){f[s.id].pause=true});g(".cs-"+s.id).mouseout(function(){f[s.id].pause=false});g("#cs-title-"+s.id).mouseover(function(){f[s.id].pause=true});g("#cs-title-"+s.id).mouseout(function(){f[s.id].pause=false})}};g.transitionCall=function(r){if(f[r.id].delay<0){return}clearInterval(c[r.id]);delay=f[r.id].delay+f[r.id].spw*f[r.id].sph*f[r.id].sDelay;c[r.id]=setInterval(function(){g.transition(r)},delay)};g.transition=function(r,s){if(f[r.id].pause==true){return}g.setFields(r);g.effect(r);b[r.id]=0;o[r.id]=setInterval(function(){g.appereance(r,d[r.id][b[r.id]])},f[r.id].sDelay);g(a[r.id]).css({"background-image":"url("+n[r.id][h[r.id]].src+")"});if(typeof(s)=="undefined"){h[r.id]++}else{if(s=="prev"){h[r.id]--}else{h[r.id]=s}}if(h[r.id]==n[r.id].length){h[r.id]=0}if(h[r.id]==-1){h[r.id]=n[r.id].length-1}g(".cs-button-"+r.id).removeClass("cs-active");g("#cs-button-"+r.id+"-"+(h[r.id]+1)).addClass("cs-active");if(l[r.id][h[r.id]]){g("#cs-title-"+r.id).css({opacity:0}).animate({opacity:f[r.id].opacity},f[r.id].titleSpeed);g("#cs-title-"+r.id).html(l[r.id][h[r.id]])}else{g("#cs-title-"+r.id).css("opacity",0)}};g.appereance=function(s,r){g(".cs-"+s.id).attr("href",p[s.id][h[s.id]]).attr("target",e[s.id][h[s.id]]);if(b[s.id]==f[s.id].spw*f[s.id].sph){clearInterval(o[s.id]);setTimeout(function(){g(s).trigger("cs:animFinished")},300);return}g("#cs-"+s.id+r).css({opacity:0,"background-image":"url("+n[s.id][h[s.id]].src+")"});g("#cs-"+s.id+r).animate({opacity:1},300);b[s.id]++};g.setNavigation=function(r){g(a[r.id]).append("<div id='cs-navigation-"+r.id+"'></div>");g("#cs-navigation-"+r.id).hide();g("#cs-navigation-"+r.id).append("<a href='#' id='cs-prev-"+r.id+"' class='cs-prev'>prev</a>");g("#cs-navigation-"+r.id).append("<a href='#' id='cs-next-"+r.id+"' class='cs-next'>next</a>");g("#cs-prev-"+r.id).css({position:"absolute",top:f[r.id].height/2-15,left:0,"z-index":1001,"line-height":"30px",opacity:f[r.id].opacity}).click(function(s){s.preventDefault();g.transition(r,"prev");g.transitionCall(r)}).mouseover(function(){g("#cs-navigation-"+r.id).show()});g("#cs-next-"+r.id).css({position:"absolute",top:f[r.id].height/2-15,right:0,"z-index":1001,"line-height":"30px",opacity:f[r.id].opacity}).click(function(s){s.preventDefault();g.transition(r);g.transitionCall(r)}).mouseover(function(){g("#cs-navigation-"+r.id).show()});g("<div id='cs-buttons-"+r.id+"' class='cs-buttons'></div>").appendTo(g("#coin-slider-"+r.id));for(k=1;k<n[r.id].length+1;k++){g("#cs-buttons-"+r.id).append("<a href='#' class='cs-button-"+r.id+"' id='cs-button-"+r.id+"-"+k+"'>"+k+"</a>")}g.each(g(".cs-button-"+r.id),function(s,t){g(t).click(function(u){g(".cs-button-"+r.id).removeClass("cs-active");g(this).addClass("cs-active");u.preventDefault();g.transition(r,s);g.transitionCall(r)})});g("#cs-navigation-"+r.id+" a").mouseout(function(){g("#cs-navigation-"+r.id).hide();f[r.id].pause=false});g("#cs-buttons-"+r.id).css({left:"50%","margin-left":-n[r.id].length*15/2-5,position:"relative"})};g.effect=function(r){effA=["random","swirl","rain","straight","snakeV","rainV"];if(f[r.id].effect==""){eff=effA[Math.floor(Math.random()*(effA.length))]}else{eff=f[r.id].effect}d[r.id]=new Array();if(eff=="random"){counter=0;for(i=1;i<=f[r.id].sph;i++){for(j=1;j<=f[r.id].spw;j++){d[r.id][counter]=i+""+j;counter++}}g.random(d[r.id])}if(/rain|swirl|straight|snakeV|rainV/.test(eff)){g[eff](r)}m[r.id]*=-1;if(m[r.id]>0){d[r.id].reverse()}};g.random=function(r){var t=r.length;if(t==0){return false}while(--t){var s=Math.floor(Math.random()*(t+1));var v=r[t];var u=r[s];r[t]=u;r[s]=v}};g.swirl=function(r){var t=f[r.id].sph;var u=f[r.id].spw;var B=1;var A=1;var s=0;var v=0;var z=0;var w=true;while(w){v=(s==0||s==2)?u:t;for(i=1;i<=v;i++){d[r.id][z]=B+""+A;z++;if(i!=v){switch(s){case 0:A++;break;case 1:B++;break;case 2:A--;break;case 3:B--;break}}}s=(s+1)%4;switch(s){case 0:u--;A++;break;case 1:t--;B++;break;case 2:u--;A--;break;case 3:t--;B--;break}check=g.max(t,u)-g.min(t,u);if(u<=check&&t<=check){w=false}}};g.rain=function(t){var w=f[t.id].sph;var r=f[t.id].spw;var v=0;var u=to2=from=1;var s=true;while(s){for(i=from;i<=u;i++){d[t.id][v]=i+""+parseInt(to2-i+1);v++}to2++;if(u<w&&to2<r&&w<r){u++}if(u<w&&w>=r){u++}if(to2>r){from++}if(from>u){s=false}}};g.rainV=function(t){var u=f[t.id];var v=0;for(var s=1;s<=u.sph;s++){for(var r=1;r<=u.spw;r++){d[t.id][v]=s+""+r;v++}}};g.snakeV=function(t){var u=f[t.id];var v=0;for(var s=1;s<=u.sph;s++){for(var r=1;r<=u.spw;r++){d[t.id][v]=s+""+(s%2?r:u.spw+1-r);v++}}};g.straight=function(r){counter=0;for(i=1;i<=f[r.id].sph;i++){for(j=1;j<=f[r.id].spw;j++){d[r.id][counter]=i+""+j;counter++}}};g.min=function(s,r){if(s>r){return r}else{return s}};g.max=function(s,r){if(s<r){return r}else{return s}};this.each(function(){init(this)})};g.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)};
function ws_squares(c,a,b){var g=jQuery;var e=b.find("ul").get(0);e.id="wowslider_tmp"+Math.round(Math.random()*99999);var h=0;g(e).coinslider({hoverPause:false,startSlide:c.startSlide,navigation:0,delay:-1,width:c.width,height:c.height});var f=g("#coin-slider-"+e.id).css({position:"absolute",left:0,top:0,"z-index":8});var d=c.startSlide;g(e).bind("cs:animFinished",function(){g(e).css({left:-d+"00%"});if(h<2){h=0;f.hide()}});this.go=function(i){h++;f.show();d=i;g.transition(e,i);return i}};
function ws_stack(d,a,b){var e=jQuery;var c=e("li",b);this.go=function(k,h,n,m){var g=c.length>2?(k-h+1)%c.length:1;if(Math.abs(n)>=1){g=(n>0)?0:1}g=!!g^!!d.revers;var i=(d.revers?-1:1)+"00%";var j=e("ul",b);var l=document.all?0:"0%";var f=e(c.get(g?k:h)).clone().css({position:"absolute","z-index":4,width:"100%",top:0,left:((g?i:l))});if(g){f.appendTo(b)}else{f.insertAfter(j)}if(!g){e("ul",b).css({left:-k+"00%"})}f.animate({left:(g?l:i)},d.duration,"easeInOutExpo",function(){if(g){j.css({left:-k+"00%"})}e(this).remove()});return k}};
function ws_domino(d,b,a){$.extend($.easing,{easeInOutSine:function(m,l,i,j,k){return -j/2*(Math.cos(Math.PI*l/k)-1)+i}});$.extend(d,{columns:d.columns|5,rows:d.rows|2,centerRow:d.centerRow|2,centerColumn:d.centerColumn|2});var c=$("<div/>").css({position:"absolute",width:"100%",height:"100%",top:"0%",overflow:"hidden"});c.hide().appendTo(a);var e=a.find("ul");this.go=function(r,q){function s(){c.find("img").stop(1,1);c.hide();c.empty()}s();if(d.fadeOut){e.fadeOut(d.duration)}var h=c.width();var g=c.height();var p=Math.floor(h/d.columns);var n=Math.floor(g/d.rows);var l=h-p*(d.columns-1);var v=g-n*(d.rows-1);function z(j,i){return Math.random()*(i-j+1)+j}var m=[];for(var u=0;u<d.rows;u++){m[u]=[];for(var t=0;t<d.columns;t++){var k=d.duration*(1-Math.abs((d.centerRow*d.centerColumn-u*t)/(2*d.rows*d.columns)));var w=t<d.columns-1?p:l;var f=u<d.rows-1?n:v;m[u][t]=$("<div/>").css({width:w,height:f,position:"absolute",top:u*n,left:t*p,overflow:"hidden"});var y=z(u-2,u+2);var x=z(t-2,t+2);m[u][t].appendTo(c);var A=$(b.get(r)).clone().css({position:"absolute",top:-y*n,left:-x*p,width:h,opacity:0,height:g}).appendTo(m[u][t])}}var o=0;c.show();for(var u=0;u<d.rows;u++){for(var t=0;t<d.columns;t++){m[u][t].find("img").animate({top:-u*n,left:-t*p,opacity:1,deg:d.domino_rotation},{duration:k,easing:"easeInOutSine",complete:function(){o++;if(o==d.rows*d.columns){s();e.stop(1,1);e.css("left",-r*100+"%").show()}}})}}return r}};
jQuery.extend(jQuery.easing,{easeOutOneBounce:function(e,b,c,a,i){var g=0.8;var f=0.2;var d=g*g;if(e<0.0001){return 0}else{if(e<g){return e*e/d}else{return 1-f*f+(e-g-f)*(e-g-f)}}}});jQuery.extend(jQuery.easing,{easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeOutBack:function(c,e,a,g,d,f){if(f==undefined){f=1.70158}return g*((e=e/d-1)*e*((f+1)*e+f)+1)+a},easeOutBack2:function(c,e,a,g,d,f){if(c<f/2){jQuery.easing.easeInCirc(c,e,a,g,d,f/2)}else{return jQuery.easing.easeOutBounce(c-f/2,e,a,g,d,f/2)}}});function ws_page(d,b,a){var f=d.angle||17;var c=jQuery("<div/>").css({position:"absolute",width:"100%",height:"100%",top:"0%",overflow:"hidden"});var e=a.find("ul");c.hide().appendTo(a);this.go=function(l,j){function n(){c.find("div").stop(1,1);c.hide();c.empty()}n();e.hide();var k=jQuery("<div/>").css({position:"absolute",left:0,top:"-100%",width:"100%",height:"100%",overflow:"hidden","z-index":9}).append(jQuery(b.get(l)).clone().css({width:"100%",height:"100%"})).appendTo(c);var i=jQuery("<div/>").css({position:"absolute",left:0,top:0,width:"100%",height:"100%",overflow:"visible","z-index":10,"transform-origin":"top left","-webkit-backface-visibility":"hidden","-moz-backface-visibility":"hidden","-ms-backface-visibility":"hidden","-o-backface-visibility":"hidden","backface-visibility":"hidden"}).append(jQuery(b.get(j)).clone().css({width:"100%",height:"100%"})).appendTo(c);c.show();var p=i;var o=p.width(),m=p.height();var g=!!document.all;if(g){i.css({left:"-50%",top:"-50%"});p=i.find("img");p.css({translateX:o/2,translateY:m/2})}p.animate({rotate:f,translateX:g?Math.sqrt(o*o+m*m)*Math.sin(Math.PI*f/180)/2+o/4:0,translateY:g?Math.sqrt(o*o+m*m)*Math.cos(Math.PI*f/180)/2-m/2:0},{duration:2*d.duration/3,easing:"easeOutOneBounce"}).animate(g?{translateY:"+="+m}:{top:"100%"},{duration:d.duration/3,easing:"linear",complete:function(){$(this).hide()}});k.animate({top:"-30%"},{duration:d.duration/2}).animate({top:"0%"},{easing:"easeOutBounce",duration:d.duration/2});return l}};// -----------------------------------------------------------------------------------
function ws_cube(j,g,a){var c=jQuery;var e=c("ul",a);var b={position:"absolute",left:0,top:0,width:"100%",height:"100%"};var i={domPrefixes:" Webkit Moz ms O Khtml".split(" "),testDom:function(l){var k=this.domPrefixes.length;while(k--){if(typeof document.body.style[this.domPrefixes[k]+l]!=="undefined"){return true}}return false},cssTransitions:function(){return this.testDom("Transition")},cssTransforms3d:function(){var l=(typeof document.body.style.perspectiveProperty!=="undefined")||this.testDom("Perspective");if(l&&/AppleWebKit/.test(navigator.userAgent)){var n=document.createElement("div"),k=document.createElement("style"),m="Test3d"+Math.round(Math.random()*99999);k.textContent="@media (-webkit-transform-3d){#"+m+"{height:3px}}";document.getElementsByTagName("head")[0].appendChild(k);n.id=m;document.body.appendChild(n);l=n.offsetHeight===3;k.parentNode.removeChild(k);n.parentNode.removeChild(n)}return l}};var d=(i.cssTransitions()&&i.cssTransforms3d()&&!document.all);if(!d&&j.fallback){return new j.fallback(j,g,a)}function h(k,l,n,m){return"inset "+(-m*k*1.2/90)+"px "+(n*l*1.2/90)+"px "+(k+l)/20+"px rgba("+((n<m)?"0,0,0,.6":(n>m)?"255,255,255,0.8":"0,0,0,.0")+")"}var f;this.go=function(r,o){function l(J,y,z,x,v,H,I,F,E){J.parent().css("perspective",1000);var D=J.width(),B=J.height();var G=c(J.children().get(1));G.css({transform:"translateZ("+y+"px)",backfaceVisibility:"hidden","box-shadow":h(D,B,0,0)});var A=c(J.children().get(0));A.css({opacity:1,transform:"translateY("+x+"px) translateX("+z+"px) rotateY("+H+"deg) rotateX("+v+"deg)",backfaceVisibility:"hidden","box-shadow":h(D,B,v,H)});J.css({transform:"translateZ(-"+y+"px)",transformStyle:"preserve-3d"});var C=setTimeout(function(){var w="all "+j.duration+"ms cubic-bezier(0.645, 0.045, 0.355, 1.000)";J.css({transition:w,transform:"translateZ(-"+y+"px) rotateX("+I+"deg) rotateY("+F+"deg)"});G.css({transition:w,"box-shadow":h(D,B,I,F)});A.css({transition:w,"box-shadow":h(D,B,0,0)});C=setTimeout(E,j.duration)},20);return{stop:function(){clearTimeout(C);E()}}}if(d){if(f){f.stop()}var u=c('<div class="ws_effect">').css(b).css({zIndex:8}).appendTo(a.parent());c("<div>").css(b).appendTo(u).css({"background-image":"url("+g.get(r).src+")","background-size":"cover"});c("<div>").css(b).appendTo(u).css({"background-image":"url("+g.get(o).src+")","background-size":"cover"});e.hide();var t=a.width(),p=a.height(),n={left:[t/2,t/2,0,0,90,0,-90],right:[t/2,-t/2,0,0,-90,0,90],down:[p/2,0,-p/2,90,0,-90,0],up:[p/2,0,p/2,-90,0,90,0]}[j.direction||["left","right","down","up"][Math.floor(Math.random()*4)]];f=new l(u,n[0],n[1],n[2],n[3],n[4],n[5],n[6],function(){e.css({left:-r+"00%"}).show();u.remove();f=0})}else{var k=c("<div></div>").css({position:"absolute",display:"none","z-index":2,width:"100%",height:"100%"}).appendTo(a);k.stop(1,1);var m=(!!((r-o+1)%g.length)^j.revers?"left":"right");var s=c(g[o]).clone().css({position:"absolute",left:"0%",right:"auto",top:0,width:"100%",height:"100%",}).appendTo(k).css(m,0);var q=c(g[r]).clone().css({position:"absolute",left:"100%",right:"auto",top:0,width:"0%",height:"100%",}).appendTo(k).show();k.css({left:"auto",right:"auto",top:0}).css(m,0).show();e.hide();q.animate({width:"100%",left:0},j.duration,"easeInOutExpo",function(){c(this).remove()});s.animate({width:0},j.duration,"easeInOutExpo",function(){e.css({left:-r+"00%"}).show();k.remove()})}return r}};
function ws_book(i,g,a){var d=jQuery;var e=d("ul",a);var c=i.duration;var b={backgroundColor:"#000",position:"absolute",left:0,top:0,width:"100%",height:"100%",transformStyle:"preserve-3d",zIndex:3,outline:"1px solid transparent"};var f;this.go=function(p,n){if(h.cssTransitions()&&h.cssTransforms3d()){if(f){return n}var s=g.get(p),k=g.get(n),u=a.parent().width()*2;var l=((n==0&&p!=n+1)||(p==n-1))?{p:true,cont1back:s.src,cont2back:k.src,item1back:k.src,item2back:s.src,item1deg:"0.1deg",item2deg:"-82.9deg",item1dodeg:"82.9deg",item2dodeg:"0deg",trans1:"ease-in ",trans2:"ease-out "}:{p:false,cont1back:k.src,cont2back:s.src,item1back:s.src,item2back:k.src,item1deg:"82.9deg",item2deg:"-0.1deg",item1dodeg:"0deg",item2dodeg:"-82.9deg",trans1:"ease-out ",trans2:"ease-in "};var v=d("<div>").css(b).appendTo(a.parent());var t=d("<div>").css(b).css({background:"url("+l.cont1back+")",backgroundSize:"auto 100%",width:"50%",perspective:u}).appendTo(v);var q=d("<div>").css(b).css({left:"50%",background:"url("+l.cont2back+") right",backgroundSize:"auto 100%",width:"50%",perspective:u}).appendTo(v);var o=d("<div>").css(b).css({background:"url("+l.item1back+")",backgroundSize:"auto 100%",transform:"rotateY("+l.item1deg+")",transition:l.trans1+c/2000+"s",transformOrigin:"right",marginRight:"-100%",display:l.p?"block":"none"}).appendTo(t);var m=d("<div>").css(b).css({background:"url("+l.item2back+") right",backgroundSize:"auto 100%",transform:"rotateY("+l.item2deg+")",transition:l.trans2+c/2000+"s",transformOrigin:"left",marginRight:"-100%",display:l.p?"none":"block"}).appendTo(q);var r=d("<div>").css(b).css({opacity:0.2,zIndex:2}).appendTo((l.p?t:q)).css("opacity",1).clone().appendTo((l.p?m:o)).css("opacity",0.2).clone().appendTo((l.p?q:t)).css("opacity",1).hide().clone().appendTo((l.p?o:m)).css("opacity",0.2).hide();f=new j(l,t,q,o,m,function(){e.css({left:-p+"00%"}).show();v.remove();f=0})}else{a.find("ul").stop(true).animate({left:(p?-p+"00%":(/Safari/.test(navigator.userAgent)?"0%":0))},i.duration,"easeInOutExpo")}function j(C,G,F,E,D,H){var B=G,A=F,z=E,y=D,x="rotateY("+C.item1dodeg+")";var w="rotateY("+C.item2dodeg+")";if(!C.p){B=F;A=G;z=D;y=E;x="rotateY("+C.item2dodeg+")";w="rotateY("+C.item1dodeg+")"}z.css("transform",x);z.children().fadeIn(c/2);B.children().fadeOut(c/2,function(){y.show();y.css("transform",w);y.children().fadeOut(c/2);A.children().fadeIn(c/2)});setTimeout(H,c);return{stop:function(){H()}}}return p};var h={domPrefixes:" Webkit Moz ms O Khtml".split(" "),testDom:function(k){var j=this.domPrefixes.length;while(j--){if(typeof document.body.style[this.domPrefixes[j]+k]!=="undefined"){return true}}return false},cssTransitions:function(){return this.testDom("Transition")},cssTransforms3d:function(){if(typeof document.body.style.perspectiveProperty!=="undefined"){return true}return this.testDom("Perspective")}}};
function ws_seven(j,u,l){var m=jQuery;var k=j.distance||5;var c=j.cols;var t=j.rows;var a=j.duration*2;var n=j.blur||50;var x=l.find("ul");var B=[];var s=[];l=l.parent().css({overflow:"visible"});var q=!j.noCanvas&&!window.opera&&!!document.createElement("canvas").getContext;if(q){try{document.createElement("canvas").getContext("2d").getImageData(0,0,1,1)}catch(A){q=0}}var i;var d=m("<div>").addClass("ws_effect");var v=m("<div>").addClass("ws_zoom");l.append(d,v);var f={t:m(window).scrollTop(),l:m(window).scrollLeft(),w:m(window).width(),h:m(window).height()};jQuery.extend(jQuery.easing,{easeOutQuart:function(C,D,e,F,E){return -F*((D=D/E-1)*D*D*D-1)+e},easeInExpo:function(C,D,e,F,E){return(D==0)?e:F*Math.pow(2,10*(D/E-1))+e},easeInCirc:function(C,D,e,F,E){return -F*(Math.sqrt(1-(D/=E)*D)-1)+e}});function p(C,e){return Math.abs((e%2?1:0)+((e-e%2)/2)-C)/e}function z(F,E,G,e){var D=(E>=e)?(e)/(E):1;var C=(F>=G)?(G)/(F):1;return{l:C,t:D,m:Math.min(C,D)}}function r(L,C,K,M){var G=d.width(),I=d.height(),J=k*G/c,F=k*I/t,e=a;var D=f.h+f.t-I/t,H=f.w+f.l-G/c,N=d.offset().top+d.height(),E=d.offset().left+d.width();if(D<N){D=N}if(H<E){H=E}if(K){m(L).each(function(R){var S=R%c;var Q=Math.floor(R/c);var O=a*0.2*(p(S,c)*45+Q*4)/(c*t);var U=d.offset().left+f.l+J*S-d.width()*k/2+J;var T=d.offset().top+f.t+F*Q-d.height()*k/2+F;var P=z(U,T,H,D);m(this).css({opacity:1,left:G*S/c,top:I*Q/t,width:G/c,height:I/t,zIndex:Math.ceil(100-p(S,c)*100)}).delay(O).animate({opacity:0,left:(J*S-G*k/2)*P.l,top:(F*Q-I*k/2)*P.t,width:J*P.m,height:F*P.m},{duration:a*4/(c*t),easing:"easeInExpo",complete:function(){m(this).hide()}});m(this).find("img").css({left:-(G*S/c),top:-(I*Q/t),width:G,height:I}).delay(O).animate({left:-J*S*P.m,top:-F*Q*P.m,width:k*G*P.m,height:k*I*P.m},a*4/(c*t),"easeInExpo")});m(C).each(function(Q){var R=Q%c;var P=Math.floor(Q/c);var O=a*0.2+a*0.15*(p(R,c)*35+P*4)/(c*t);m(this).css({left:G/2,top:I/2,width:0,height:0,zIndex:Math.ceil(100-p(R,c)*100)}).delay(O).animate({left:G*R/c,top:I*P/t,width:G/c+1,height:I/t+1},a*4/(c*t),"easeOutBack");m(this).find("img").css({left:0,top:0,width:0,height:0}).delay(O).animate({left:-(G*R/c),top:-(I*P/t),width:G,height:I},a*4/(c*t),"easeOutBack")});v.delay(a*0.1).animate({opacity:1},a*0.2,"easeInCirc");e*=0.6}else{m(L).each(function(R){var S=R%c;var Q=Math.floor(R/c);var O=a*0.2*(p(S,c)*45+Q*4)/(c*t);var U=d.offset().left+f.l+J*S-d.width()*k/2+J;var T=d.offset().top+f.t+F*Q-d.height()*k/2+F;var P=z(U,T,H,D);m(this).css({opacity:0,left:(J*S-d.width()*k/2)*P.l,top:(F*Q-d.height()*k/2)*P.t,width:J*P.m,height:F*P.m,zIndex:Math.ceil(100-p(S,c)*100)}).delay(O).animate({opacity:1,left:G*S/c,top:I*Q/t,width:G/c+1,height:I/t+1},{duration:a*5/(c*t),easing:"easeOutQuart"});m(this).find("img").css({left:-J*S*P.m,top:-F*Q*P.m,width:k*G*P.m,height:k*I*P.m}).delay(O).animate({left:-(G*S/c),top:-(I*Q/t),width:G,height:I},a*5/(c*t),"easeOutQuart")});e*=0.43}setTimeout(M,e);return{stop:function(){M()}}}var h;this.go=function(I,D){if(h){return D}var H=(D==0&&I!=D+1)||(I==D-1)?false:true;f.t=m(window).scrollTop();f.l=m(window).scrollLeft();f.w=m(window).width();f.h=m(window).height();var e=Math.max((j.width||d.width())/(j.height||d.height())||3,3);c=c||Math.round(e<1?3:3*e);t=t||Math.round(e<1?3/e:3);if(H){var C;if(q){x.hide();if(!i){i='<canvas width="'+l.width()+'" height="'+l.height()+'"/>';i=m(i+i).css({"z-index":1,position:"absolute",width:"100%",height:"100%",left:0,top:0}).appendTo(l)}else{i.show()}C=y(m(u.get(I)),n,i.get(0))}if(q&&C){var J=y(m(u.get(D)),n,i.get(1))}else{q=0;C=y(m(u.get(D)),8)}}d.css({position:"absolute",width:l.width(),height:l.height(),left:0,top:0,zIndex:8,overflow:"visible"});v.css({opacity:1,position:"absolute",top:0,left:0,width:l.width(),height:l.height(),zIndex:2});for(var G=0;G<c*t;G++){var F=G%c;var E=Math.floor(G/c);m(B[G]=document.createElement("div")).css({position:"absolute",overflow:"hidden"}).appendTo(d).append(m("<img>").css({position:"absolute"}));if(H){m(s[G]=document.createElement("div")).css({position:"absolute",overflow:"hidden"}).appendTo(v).append(m("<img>").css({position:"absolute"}))}}B=m(B);if(H){s=m(s)}d.css({opacity:1,zIndex:3}).find("img").attr("src",u.get(H?D:I).src);if(H){v.css({opacity:0}).find("img").attr("src",u.get(I).src)}else{v.append(m("<img>").css({position:"absolute",width:"100%",height:"100%"}).attr("src",u.get(D).src))}h=new r(B,s,H,function(){x.css({left:-I+"00%"}).stop(true,true).show();d.empty().removeAttr("style");v.empty().removeAttr("style");if(i){i.hide()}h=0});return I};function y(C,E,D){var F=(parseInt(C.parent().css("z-index"))||0)+1;if(q){var e=D.getContext("2d");e.drawImage(C.get(0),0,0);if(!b(e,0,0,D.width,D.height,E)){return 0}return m(D)}}var o=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];var w=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b(ar,Z,X,C,D,ai){if(isNaN(ai)||ai<1){return}ai|=0;var am;try{am=ar.getImageData(Z,X,C,D)}catch(aq){console.log("error:unable to access image data: "+aq);return false}var H=am.data;var ag,af,ao,al,O,R,L,F,G,W,M,Y,U,ac,ah,P,K,Q,S,ab;var ap=ai+ai+1;var ad=C<<2;var N=C-1;var ak=D-1;var J=ai+1;var aj=J*(J+1)/2;var aa=new g();var V=aa;for(ao=1;ao<ap;ao++){V=V.next=new g();if(ao==J){var I=V}}V.next=aa;var an=null;var ae=null;L=R=0;var T=o[ai];var E=w[ai];for(af=0;af<D;af++){ac=ah=P=F=G=W=0;M=J*(K=H[R]);Y=J*(Q=H[R+1]);U=J*(S=H[R+2]);F+=aj*K;G+=aj*Q;W+=aj*S;V=aa;for(ao=0;ao<J;ao++){V.r=K;V.g=Q;V.b=S;V=V.next}for(ao=1;ao<J;ao++){al=R+((N<ao?N:ao)<<2);F+=(V.r=(K=H[al]))*(ab=J-ao);G+=(V.g=(Q=H[al+1]))*ab;W+=(V.b=(S=H[al+2]))*ab;ac+=K;ah+=Q;P+=S;V=V.next}an=aa;ae=I;for(ag=0;ag<C;ag++){H[R]=(F*T)>>E;H[R+1]=(G*T)>>E;H[R+2]=(W*T)>>E;F-=M;G-=Y;W-=U;M-=an.r;Y-=an.g;U-=an.b;al=(L+((al=ag+ai+1)<N?al:N))<<2;ac+=(an.r=H[al]);ah+=(an.g=H[al+1]);P+=(an.b=H[al+2]);F+=ac;G+=ah;W+=P;an=an.next;M+=(K=ae.r);Y+=(Q=ae.g);U+=(S=ae.b);ac-=K;ah-=Q;P-=S;ae=ae.next;R+=4}L+=C}for(ag=0;ag<C;ag++){ah=P=ac=G=W=F=0;R=ag<<2;M=J*(K=H[R]);Y=J*(Q=H[R+1]);U=J*(S=H[R+2]);F+=aj*K;G+=aj*Q;W+=aj*S;V=aa;for(ao=0;ao<J;ao++){V.r=K;V.g=Q;V.b=S;V=V.next}O=C;for(ao=1;ao<=ai;ao++){R=(O+ag)<<2;F+=(V.r=(K=H[R]))*(ab=J-ao);G+=(V.g=(Q=H[R+1]))*ab;W+=(V.b=(S=H[R+2]))*ab;ac+=K;ah+=Q;P+=S;V=V.next;if(ao<ak){O+=C}}R=ag;an=aa;ae=I;for(af=0;af<D;af++){al=R<<2;H[al]=(F*T)>>E;H[al+1]=(G*T)>>E;H[al+2]=(W*T)>>E;F-=M;G-=Y;W-=U;M-=an.r;Y-=an.g;U-=an.b;al=(ag+(((al=af+J)<ak?al:ak)*C))<<2;F+=(ac+=(an.r=H[al]));G+=(ah+=(an.g=H[al+1]));W+=(P+=(an.b=H[al+2]));an=an.next;M+=(K=ae.r);Y+=(Q=ae.g);U+=(S=ae.b);ac-=K;ah-=Q;P-=S;ae=ae.next;R+=C}}ar.putImageData(am,Z,X);return true}function g(){this.r=0;this.g=0;this.b=0;this.a=0;this.next=null}};

// extend wowslider for effect support
(function($){
	var effects = "seven|kenburns|cube|blur|blinds|book|rotate|page|domino|slices|squares|fly|stack".split("|");


	// create effects buttons
	// @callback = function(effect)
	function createEffects(effects,callback){
		if(!$(".effbutton").length && $('#effbuttons').length){
			var cont=$('#effbuttons');
			//wow.parent().append(cont);
			cont.html("<span class='effects-title'>Change effect: </span>");
			
			for (var e=0; e<effects.length; e++)
				(function(effect){
					var a = $('<a class="button effbutton" href="#">'+effect.replace("_"," ")+'</a>');
					cont.append(a);
					a.data("effect",effect);
					a.click(function(){ 
						callback(effect); 
						return false;
					});
					cont.append(' ');
				})(effects[e]);
		}	
	}
		
	function selectEffect(new_effect){
		$(".effbutton").each(function(){	
			$(this).css({'background-color': ($(this).data("effect") != new_effect)?'':'#63B4CA'});
		});
	};
	
	var cSlide, bkpCont, wowInstance;

	// rewrite slider
	// window.wowReInitor = function (wow,options){
	var default_wowSlider = $.fn.wowSlider;
	$.fn.wowSlider = function (options) {
		var wow = $(this);

		// add current effect if no in effects list
		if (options.effect && (effects.join("|").indexOf(options.effect)<0))
			effects[effects.length] = options.effect;
		
	
		// recreate html or init effects
		if (!bkpCont){//first start
			bkpCont = $(document.createElement("div")).append(wow.clone()).html();	
			$(function(){
				createEffects(effects,function(eff){
					var new_o = $.extend({},options);
					new_o.effect = eff;
					wowReInitor(wowInstance, new_o);
					//reinitSlider(new_o);
				});
				
				selectEffect(options.effect);
			});
		}
		else {
			wow.get(0).wsStop();
			wow = $(bkpCont).replaceAll(wow);
		}
		
		wowInstance = wow; // save instance for effect
		
		if (!options.effect)
			options.effect = (effects[Math.floor(Math.random()*effects.length)]) || "blinds";
		var new_opt = $.extend({
			startSlide:cSlide,
			onStep:function(num){cSlide=num}
		},options);
		
		// run slider
		//var result = wow.wowSlider(new_opt); 
		var result = default_wowSlider.apply(wow, [new_opt]); 
		
		if (isNaN(cSlide))
			cSlide = 0;
		else
			wow.get(0).wsStart(cSlide+1);
			
		selectEffect(new_opt.effect);
		
		return result;
	}
	
	// for old compability
	window.wowReInitor = function (wow,options){
		$(wow).wowSlider(options);
	};

})(jQuery);
