// ----------------------------------------------------------------------------------- // 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. // last updated: 2010-29-11 // function ws_seven(t,e,i){function a(t,e){return math.abs((e%2?1:0)+(e-e%2)/2-t)/e}function n(t,e,i,a){var n=e>=a?a/e:1,o=t>=i?i/t:1;return{l:o,t:n,m:math.min(o,n)}}function o(t,e,i,o,r){var s=m.width(),h=m.height(),c=l*s/f,w=l*h/g,u=p*(o?4:5)/(f*g),m=o?"easeinexpo":"easeoutquart",v=t.h+t.t-h/g,x=t.w+t.l-s/f,b=m.offset().top+m.height(),y=m.offset().left+m.width();return b>v&&(v=b),y>x&&(x=y),d(t).each(function(t){var e=t%f,r=math.floor(t/f),b=.2*p*(45*a(e,f)+4*r)/(f*g),y=m.offset().left+t.l+c*e-s*l/2+c,i=m.offset().top+t.t+w*r-h*l/2+w,z=n(y,i,x,v),c={opacity:1,left:s*e/f,top:h*r/g,width:s/f,height:h/g,zindex:math.ceil(100-100*a(e,f))},e={opacity:0,left:(c*e-s*l/2)*z.l,top:(w*r-h*l/2)*z.t,width:c*z.m,height:w*z.m},l={left:-(s*e/f)+i.marginleft,top:-(h*r/g)+i.margintop,width:i.width,height:i.height},q={left:-l*(s/f*e-i.marginleft)*z.m,top:-l*(h/g*r-i.margintop)*z.m,width:l*i.width*z.m,height:l*i.height*z.m};if(!o){var _=c;c=e,e=_,_=l,l=q,q=_}d(this).css(c).delay(b).animate(e,u,m,o?function(){d(this).hide()}:{}),d(this).find("img").css(l).delay(b).animate(q,u,m)}),o&&(d(e).each(function(t){var e=t%f,n=math.floor(t/f),o=.2*p+.15*p*(35*a(e,f)+4*n)/(f*g);d(this).css({left:s/2,top:h/2,width:0,height:0,zindex:math.ceil(100-100*a(e,f))}).delay(o).animate({left:s*e/f,top:h*n/g,width:s/f+1,height:h/g+1},4*p/(f*g),"easeoutback"),d(this).find("img").css({left:0,top:0,width:0,height:0}).delay(o).animate({left:-s*e/f+i.marginleft,top:-h*n/g+i.margintop,width:i.width,height:i.height},4*p/(f*g),"easeoutback")}),i.delay(.1*p).animate({opacity:1},.2*p,"easeincirc")),settimeout(r,o?.5*p:.4*p),{stop:function(){r()}}}function r(t,e,i,a){var n=(parseint(t.parent().css("z-index"))||0)+1;if(y){var o=a.getcontext("2d");return o.drawimage(t.get(0),0,0,e.width,e.height),s(o,0,0,a.width,a.height,i)?d(a):0}for(var r=d("
").css({position:"absolute","z-index":n,left:0,top:0,overflow:"hidden"}).css(e).appendto(x),h=(math.sqrt(5)+1)/2,c=1-h/2,l=0;i>c*l;l++){var f=math.pi*h*l,g=c*l+1,p=g*math.cos(f),w=g*math.sin(f);d(document.createelement("img")).attr("src",t.attr("src")).css({opacity:1/(l/1.8+1),position:"absolute","z-index":n,left:math.round(p)+"px",top:math.round(w)+"px",width:"100%",height:"100%"}).appendto(r)}return r}function s(t,e,i,a,n,o){if(!(isnan(o)||1>o)){o|=0;var r;try{r=t.getimagedata(e,i,a,n)}catch(s){return console.log("error:unable to access image data: "+s),!1}var d,c,l,f,g,p,w,u,m,v,x,b,y,m,i,t,z,l,q,_,o=r.data,j=o+o+1,d=a-1,k=n-1,q=o+1,a=q*(q+1)/2,b=new h,f=b;for(l=1;j>l;l++)if(f=f.next=new h,l==q)var n=f;f.next=b;var p=null,g=null;w=p=0;var h=c[o],j=e[o];for(c=0;n>c;c++){for(m=i=t=u=m=v=0,x=q*(z=o[p]),b=q*(l=o[p+1]),y=q*(q=o[p+2]),u+=a*z,m+=a*l,v+=a*q,f=b,l=0;q>l;l++)f.r=z,f.g=l,f.b=q,f=f.next;for(l=1;q>l;l++)f=p+((l>d?d:l)<<2),u+=(f.r=z=o[f])*(_=q-l),m+=(f.g=l=o[f+1])*_,v+=(f.b=q=o[f+2])*_,m+=z,i+=l,t+=q,f=f.next;for(p=b,g=n,d=0;a>d;d++)o[p]=u*h>>j,o[p+1]=m*h>>j,o[p+2]=v*h>>j,u-=x,m-=b,v-=y,x-=p.r,b-=p.g,y-=p.b,f=w+((f=d+o+1)d;d++){for(i=t=m=m=v=u=0,p=d<<2,x=q*(z=o[p]),b=q*(l=o[p+1]),y=q*(q=o[p+2]),u+=a*z,m+=a*l,v+=a*q,f=b,l=0;q>l;l++)f.r=z,f.g=l,f.b=q,f=f.next;for(g=a,l=1;o>=l;l++)p=g+d<<2,u+=(f.r=z=o[p])*(_=q-l),m+=(f.g=l=o[p+1])*_,v+=(f.b=q=o[p+2])*_,m+=z,i+=l,t+=q,f=f.next,k>l&&(g+=a);for(p=d,p=b,g=n,c=0;n>c;c++)f=p<<2,o[f]=u*h>>j,o[f+1]=m*h>>j,o[f+2]=v*h>>j,u-=x,m-=b,v-=y,x-=p.r,b-=p.g,y-=p.b,f=d+((f=c+q)").css({position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:t.responsive>1?"hidden":"visible"}),x=v.clone().css("overflow","hidden");v.addclass("ws_effect"),i=i.parent();var b,y=!t.nocanvas&&!window.opera&&!!document.createelement("canvas").getcontext,m=d("
").addclass("ws_parts"),i=d("
").addclass("ws_zoom");v.append(m,i,x).appendto(i);var t={t:d(window).scrolltop(),l:d(window).scrollleft(),w:d(window).width(),h:d(window).height()};jquery.extend(jquery.easing,{easeoutquart:function(t,e,i,a,n){return-a*((e=e/n-1)*e*e*e-1)+i},easeinexpo:function(t,e,i,a,n){return 0==e?i:a*math.pow(2,10*(e/n-1))+i},easeincirc:function(t,e,i,a,n){return-a*(math.sqrt(1-(e/=n)*e)-1)+i}});var z;this.go=function(a,n){if(z)return n;var s=0==n&&a!=n+1||a==n-1?!1:!0;t.t=d(window).scrolltop(),t.l=d(window).scrollleft(),t.w=d(window).width(),t.h=d(window).height();var h=math.max((t.width||m.width())/(t.height||m.height())||3,3);f=f||math.round(1>h?3:3*h),g=g||math.round(1>h?3/h:3);var l=d(e.get(n));l={width:l.width(),height:l.height(),margintop:parsefloat(l.css("margintop")),marginleft:parsefloat(l.css("marginleft"))},m.css({position:"absolute",width:i.width(),height:i.height(),left:0,top:0,zindex:8,transform:"translate3d(0,0,0)"}),i.css({position:"absolute",width:i.width(),height:i.height(),top:0,left:0,zindex:2,transform:"translate3d(0,0,0)"});for(var p=0;f*g>p;p++){{math.floor(p/f)}d(u[p]=document.createelement("div")).css({position:"absolute",overflow:"hidden",transform:"translate3d(0,0,0)"}).appendto(m).append(d("").css({position:"absolute",transform:"translate3d(0,0,0)"}).attr("src",e.get(s?n:a).src)),s&&d(m[p]=document.createelement("div")).css({position:"absolute",overflow:"hidden",transform:"translate3d(0,0,0)"}).appendto(i).append(d("").css({position:"absolute",transform:"translate3d(0,0,0)"}).attr("src",e.get(a).src))}u=d(u),s&&(m=d(m));var c=0;if(s){if(i.css("opacity",0),y){try{document.createelement("canvas").getcontext("2d").getimagedata(0,0,1,1)}catch(e){y=0}b='',b=d(b).css({"z-index":1,position:"absolute",left:0,top:0}).css(l).appendto(x),c=r(d(e.get(n)),l,w,b.get(0))}y&&c||(y=0,c=r(d(e.get(n)),l,8),b&&(b.remove(),b=0))}else i.append(d("").css({position:"absolute",top:0,left:0}).css(l).attr("src",e.get(n).src));z=new o(u,m,l,s,function(){c.trigger("effectend"),m.empty().removeattr("style"),i.empty().removeattr("style"),b?b.remove():c&&c.remove(),z=0})};var c=[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],e=[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 ws_cube(t,e,i){function s(t,e,i,s){return"inset "+-s*t*1.2/90+"px "+i*e*1.2/90+"px "+(t+e)/20+"px rgba("+(s>i?"0,0,0,.6":i>s?"255,255,255,0.8":"0,0,0,.0")+")"}var n=jquery,o=n(this),r=/iphone|ipod|ipad|android|blackberry/.test(navigator.useragent),a=n(".ws_list",i),d=t.perspective||2e3,h={position:"absolute",backgroundsize:"cover",left:0,top:0,width:"100%",height:"100%",backfacevisibility:"hidden"},c=n("
").addclass("ws_effect").css(h).css({transformstyle:"preserve-3d",perspective:g?"none":d,zindex:8,overflow:t.responsive>1?"hidden":"visible"});n("
").addclass("ws_effect").css(h).append(c).appendto(i.parent());var p={domprefixes:" webkit moz ms o khtml".split(" "),testdom:function(t){for(var e=this.domprefixes.length;e--;)if("undefined"!=typeof document.body.style[this.domprefixes[e]+t])return!0;return!1},csstransitions:function(){return this.testdom("transition")},csstransforms3d:function(){var t="undefined"!=typeof document.body.style.perspectiveproperty||this.testdom("perspective");if(t&&/applewebkit/.test(navigator.useragent)){var e=document.createelement("div"),i=document.createelement("style"),s="test3d"+math.round(99999*math.random());i.textcontent="@media (-webkit-transform-3d){#"+s+"{height:3px}}",document.getelementsbytagname("head")[0].appendchild(i),e.id=s,document.body.appendchild(e),t=3===e.offsetheight,i.parentnode.removechild(i),e.parentnode.removechild(e)}return t},webkit:function(){return/applewebkit/.test(navigator.useragent)&&!/chrome/.test(navigator.useragent)}},f=p.csstransitions()&&p.csstransforms3d(),g=p.webkit();if(!f&&t.fallback)return new t.fallback(t,e,i);var u;this.go=function(p,l){function m(e,i,o,a,c,p,f,u,l,m){e.parent().css("perspective",d);var v=e.width(),w=e.height();if(i.front.css({transform:"rotatey(0deg) rotatex(0deg)"}),i.back.css({opacity:1,transform:"rotatey("+f+"deg) rotatex("+p+"deg)"}),!r)var b=n("
").css(h).css("boxshadow",s(v,w,0,0)).appendto(i.front),x=n("
").css(h).css("boxshadow",s(v,w,p,f)).appendto(i.back);g&&e.css({transform:"translatez(-"+o+"px)"});var t=settimeout(function(){var e="all "+t.duration+"ms cubic-bezier(0.645, 0.045, 0.355, 1.000)";i.front.css({transition:e,boxshadow:r?"":s(v,w,u,l),transform:"rotatex("+u+"deg) rotatey("+l+"deg)",zindex:0}),i.back.css({transition:e,boxshadow:r?"":s(v,w,0,0),transform:"rotatey(0deg) rotatex(0deg)",zindex:20}),r||(b.css({transition:e,boxshadow:s(v,w,u,l)}),x.css({transition:e,boxshadow:s(v,w,0,0)})),t=settimeout(m,t.duration)},20);return{stop:function(){cleartimeout(t),m()}}}var v=n(e[l]);if(v={width:v.width(),height:v.height(),margintop:parsefloat(v.css("margintop")),marginleft:parsefloat(v.css("marginleft"))},f){u&&u.stop();var w=i.width(),b=i.height(),x={left:[w/2,w/2,0,0,90,0,-90],right:[w/2,-w/2,0,0,-90,0,90],down:[b/2,0,-b/2,90,0,-90,0],up:[b/2,0,b/2,-90,0,90,0]}[t.direction||["left","right","down","up"][math.floor(4*math.random())]],t=n("").css(v),y=n("").css(v).attr("src",e.get(p).src),k=n("
").css({overflow:"hidden",transformorigin:"50% 50% -"+x[0]+"px",zindex:20}).css(h).append(t).appendto(c),z=n("
").css({overflow:"hidden",transformorigin:"50% 50% -"+x[0]+"px",zindex:0}).css(h).append(y).appendto(c);t.on("load",function(){a.hide()}),t.attr("src",e.get(l).src).load(),c.parent().show(),u=new m(c,{front:k,back:z},x[0],x[1],x[2],x[3],x[4],x[5],x[6],function(){o.trigger("effectend"),c.empty().parent().hide(),u=0})}else{c.css({position:"absolute",display:"none",zindex:2,width:"100%",height:"100%"}),c.stop(1,1);var c=!!((p-l+1)%e.length)^t.revers?"left":"right",k=n("
").css({position:"absolute",left:"0%",right:"auto",top:0,width:"100%",height:"100%"}).css(c,0).append(n(e[l]).clone().css({width:100*v.width/i.width()+"%",height:100*v.height/i.height()+"%",marginleft:100*v.marginleft/i.width()+"%"})).appendto(c),i=n("
").css({position:"absolute",left:"100%",right:"auto",top:0,width:"0%",height:"100%"}).append(n(e[p]).clone().css({width:100*v.width/i.width()+"%",height:100*v.height/i.height()+"%",marginleft:100*v.marginleft/i.width()+"%"})).appendto(c);c.css({left:"auto",right:"auto",top:0}).css(c,0).show(),c.show(),a.hide(),i.animate({width:"100%",left:0},t.duration,"easeinoutexpo",function(){n(this).remove()}),k.animate({width:0},t.duration,"easeinoutexpo",function(){o.trigger("effectend"),c.empty().hide()})}}};// ----------------------------------------------------------------------------------- function ws_brick(t,e,a){function r(a){for(var r={},n=e.get(a),o=t.width/f,i=t.height/h,d=0;f*h>d;d++){var a=d%f,l=math.floor(d/f);r[d]=s(n,{x:a*o,y:l*i,w:o,h:i})}return r}function n(t,e,a,r,n){for(var o in e)e[o].topedge.css({width:r,height:t,background:a[o],transform:"rotatex(90deg) translate3d(0,-"+t/2+"px,"+t/2+"px)"}),e[o].bottomedge.css({width:r,height:t,background:a[o],transform:"rotatex(90deg) translate3d(0,-"+t/2+"px,"+(-n+t/2)+"px)"}),e[o].leftedge.css({width:t,height:n,background:a[o],transform:"rotatey(90deg) translate3d("+t/2+"px,0,-"+t/2+"px)"}),e[o].rightedge.css({width:t,height:n,background:a[o],transform:"rotatey(90deg) translate3d("+t/2+"px,0,"+(r-t/2)+"px)"})}function o(t,e){var a,r,n,o,i,s=(new date).gettime(),l=function(){var f=(new date).gettime();for(var h in t)if(!(s+t[h].animate.delay>f)){var c=(f-(s+t[h].animate.delay))/t[h].animate.duration;if(i={},o="",c>1){if(t[h].part[0].ws_delay[1])return cancelanimationframe(l),void e()}else{.5>=c?(a=d.easing.easeinback(1,2*c,0,1,1,1).tofixed(3),r=d.easing.easeinbackq(1,2*c,0,1,1,1).tofixed(3),n=d.easing.easeinbackq2(1,2*c,0,1,1,1).tofixed(3),t[h].back.css("backfacevisibility","hidden")):(a=d.easing.easeoutback(1,2*(c-.5),0,1,1,1).tofixed(3),r=d.easing.easeoutbackq(1,2*(c-.5),0,1,1,1).tofixed(3),n=d.easing.easeoutbackq2(1,2*(c-.5),0,1,1,1).tofixed(3),t[h].back.css("backfacevisibility","visible"));for(var p in t[h].animate[.5>=c?"half":"end"]){var g=t[h].animate[.5>=c?"begin":"half"][p]||0,m=t[h].animate[.5>=c?"half":"end"][p]||0;"object"!=typeof m&&(m="scale"===p||"rotatex"===p||"rotatey"===p?g+(m-g)*r:"left"===p||"top"===p?g+(m-g)*n:g+(m-g)*a),"rotatex"===p||"rotatey"===p||"rotatez"===p?o+=p+"("+m+"deg) ":"scale"===p?o+=p+"("+m+") ":"translate3d"===p?o+=p+"("+(g[0]+(m[0]-g[0])*a).tofixed(3)+"px,"+(g[1]+(m[1]-g[1])*a).tofixed(3)+"px,"+(g[2]+(m[2]-g[2])*a).tofixed(3)+"px) ":i[p]=m}t[h].wrapper.css({transform:"translate3d("+(i.left?i.left:0).tofixed(3)+"px,"+(i.top?i.top:0).tofixed(3)+"px,0)"}),delete i.left,delete i.top,o&&(i.transform=o),t[h].part.css(i)}}requestanimationframe(l)};l()}function i(e,r,i,s){var d=a.width(),l=a.height(),c=d/f,p=l/h,g=.4*t.duration>1e3?1e3:.4*t.duration,m=.6*t.duration,u=[0,0];n(w,e,v[r],c,p),x.css({transformorigin:d/2+"px "+l/2+"px 0",width:d,height:l});for(var b in e){var k=t[b].delay*g;u[1]<=k&&(u[0]=b,u[1]=k),e[b].part[0].ws_delay=[k,0]}e[u[0]].part[0].ws_delay[1]=1;for(var b in e){{var f=e[b];math.floor(b/f)}f.animate={delay:f.part[0].ws_delay[0],duration:m,begin:{left:0,top:0,width:c,height:p,scale:1,rotatex:0,rotatey:0,translate3d:[0,0,y?w:0]},half:{left:t[b].halfleft*c,top:t[b].halftop*p,scale:t[b].halfscale,rotatex:t[b].rotatex/2,rotatey:t[b].rotatey/2,translate3d:[0,0,(y?1:.5)*w]},end:{left:0,top:0,scale:1,rotatex:t[b].rotatex,rotatey:t[b].rotatey,translate3d:[0,0,w]}},f.front.find("img").css(i),f.back.css("backfacevisibility","hidden").find("img").css(i),f.part.css({width:f.animate.begin.width,height:f.animate.begin.height,left:f.animate.begin.left,top:f.animate.begin.top})}o(e,s)}function s(t,e){e=e||{};{var a,r=1,n=e.exclude||[],o=document.createelement("canvas"),i=o.getcontext("2d");o.width=t.naturalwidth,o.height=t.naturalheight}i.drawimage(t,0,0,t.naturalwidth,t.naturalheight);try{a=i.getimagedata(e.x?e.x:0,e.y?e.y:0,e.w?e.w:t.width,e.h?e.h:t.height).data}catch(s){return console.log("error:unable to access image data: "+s),"#ccc"}for(var d=(e.w?e.w:t.width*e.h?e.h:t.height)||a.length,l={},f="",h=[],c={dominant:{name:"",count:0}},p=0;d>p;){if(h[0]=a[p],h[1]=a[p+1],h[2]=a[p+2],f=h.join(","),l[f]=f in l?l[f]+1:1,-1===n.indexof(["rgb(",f,")"].join(""))){var g=l[f];g>c.dominant.count&&(c.dominant.name=f,c.dominant.count=g)}p+=4*r}return["rgb(",c.dominant.name,")"].join("")}var d=jquery,l=d(this),f=t.cols||4,h=t.rows||3,c=2.5,p=2,g=t.perspective||2e3,m=a.find(".ws_list"),u=[],w=30,v={},x=d("
").addclass("ws_effect").css("overflow",t.responsive>1?"hidden":"visible"),b=t.support.transform&&t.support.transition&&t.support.perspective,y=/safari/.test(navigator.useragent)&&!/chrome/.test(navigator.useragent),k=/firefox/.test(navigator.useragent);a=a.parent().append(x);var t=[{zindex:0,rotatex:360,rotatez:-360,rotatey:180,halfscale:.5,halfleft:.7,halftop:.7,delay:.36},{zindex:1,rotatex:-360,rotatez:360,rotatey:180,halfscale:.5,halfleft:.2,halftop:.4,delay:.81},{zindex:1,rotatex:360,rotatez:-360,rotatey:-180,halfscale:.5,halfleft:-.2,halftop:.4,delay:.45},{zindex:0,rotatex:-360,rotatez:360,rotatey:-180,halfscale:.5,halfleft:-.7,halftop:.7,delay:.63},{zindex:1,rotatex:-360,rotatez:360,rotatey:-180,halfscale:.5,halfleft:.7,halftop:0,delay:.54},{zindex:2,rotatex:360,rotatez:-360,rotatey:180,halfscale:.5,halfleft:.2,halftop:0,delay:.38},{zindex:2,rotatex:360,rotatez:-360,rotatey:-180,halfscale:.5,halfleft:-.2,halftop:0,delay:0},{zindex:1,rotatex:-360,rotatez:360,rotatey:180,halfscale:.5,halfleft:-.7,halftop:0,delay:.72},{zindex:0,rotatex:-360,rotatez:360,rotatey:180,halfscale:.5,halfleft:.7,halftop:-.7,delay:1},{zindex:1,rotatex:-360,rotatez:360,rotatey:-180,halfscale:.5,halfleft:.2,halftop:-.4,delay:.7},{zindex:1,rotatex:360,rotatez:-360,rotatey:180,halfscale:.5,halfleft:-.2,halftop:-.4,delay:.57},{zindex:0,rotatex:360,rotatez:-360,rotatey:-180,halfscale:.5,halfleft:-.7,halftop:-.7,delay:.9}];x.css({position:"absolute",top:0,left:0,width:a.width(),height:a.height(),transform:"translate3d(0,0,0)",transformorigin:t.width/2+"px "+t.height/2+"px 0",perspective:g}).hide(),function(){for(var t=0,e=["ms","moz","webkit","o"],a=0;ag;g++){var y=g%f,x=math.floor(g/f),i=d("
").css({position:"absolute",left:100*y/f+"%",top:100*x/h+"%",outline:"1px solid transparent",transformstyle:y||k?"flat":"preserve-3d",zindex:t[g].zindex,overflow:b?"visible":"hidden"}).appendto(x),_=d("
").css({transform:"scale(1) rotatex(0) rotatey(0) translate3d(0,0,0)",outline:"1px solid transparent",transformstyle:"preserve-3d"}).appendto(i),s=d("
").addclass("ws_front_image").appendto(_),z=b?d("
").addclass("ws_back_image").appendto(_):0;s.css({position:"absolute",width:"100%",height:"100%",overflow:"hidden",backfacevisibility:"hidden",transform:"translate3d(0,0,0)"}).append(d("").css({left:100*-y+"%",top:100*-x+"%",position:"absolute",outline:"1px solid transparent"})),b&&z.css({position:"absolute",width:"100%",height:"100%",overflow:"hidden",backfacevisibility:"hidden",transform:"rotatey(180deg) translate3d(0,0,"+w+"px)"}).append(d("").css({left:100*-y+"%",top:100*-x+"%",position:"absolute",outline:"1px solid transparent"}));var a={position:"absolute",outline:"1px solid transparent"};u[g]={part:_,front:s,back:z,wrapper:i,leftedge:b?d("
").addclass("ws_left_edge").css(a).appendto(_):0,rightedge:b?d("
").addclass("ws_right_edge").css(a).appendto(_):0,topedge:b?d("
").addclass("ws_top_edge").css(a).appendto(_):0,bottomedge:b?d("
").addclass("ws_bottom_edge").css(a).appendto(_):0}}x.show();var l=d(e.get(o));if(l={width:l.width(),height:l.height(),margintop:parsefloat(l.css("margintop")),marginleft:parsefloat(l.css("marginleft"))},b){u[0].front.find("img").on("load",function(){m.hide()});for(var z in u)u[z].front.find("img").attr("src",e.get(o).src),u[z].back.find("img").attr("src",e.get(n).src);v[o]||(v[o]=r(o)),f=new i(u,o,l,function(){m.show(),l.trigger("effectend"),x.hide().empty();for(var t in u)u[t].part.css({transition:"",transform:"rotatex(0) rotatey(0) translate3d(0,0,0)"});f=0})}else{f=!0;var b=a.width(),c=a.height(),e=b/f,q=c/h;x.css({width:b,height:c});var o=0;for(var z in u){var y=z%f,x=math.floor(z/f);u[z].front.find("img").attr("src",e.get(n).src).css(l);var j=t.duration*(1-math.abs((p*c-y*x)/(2*h*f))),q=s(-1,1)>0?1:-1,m=s(-1,1)>0?1:-1;u[z].wrapper.css({width:e,height:q}),u[z].part.css({position:"absolute",top:q*q,left:m*e,opacity:0,width:e,height:q}).animate({top:0,left:0,opacity:1},j,function(){o++,o==h*f&&(m.stop(1,1),f=!1,l.trigger("effectend"),x.empty())})}}}}jquery.extend(jquery.easing,{easeinback:function(t,e,a,r,n,o){return void 0==o&&(o=1.70158),r*(e/=n)*e*((o+1)*e-o)+a},easeoutback:function(t,e,a,r,n,o){return void 0==o&&(o=1.70158),r*((e=e/n-1)*e*((o+1)*e+o)+1)+a},easeinbackq:function(t,e,a,r,n){var o=(e/=n)*e;return a+r*o*(4*e*o-8*o+8*e-3)},easeoutbackq:function(t,e,a,r,n){var o=(e/=n)*e;return a+r*(4*o*e*o-12*o*o+16*o*e-13*o+6*e)},easeinbackq2:function(t,e,a,r,n){var o=(e/=n)*e;return a+r*o*(1.5*e*o-2.5*o+5*e-3)},easeoutbackq2:function(t,e,a,r,n){var o=(e/=n)*e;return a+r*(1.5*o*e*o-5*o*o+10*o*e-12*o+6.5*e)}}); function ws_blinds(t,i,e){function n(i,e,n,o,s){t.support.transform&&t.support.transition?(e.transform||(e.transform=""),e.left&&(e.transform+=" translate3d("+(e.left?e.left:0)+"px,0,0)"),delete e.left,(n||o)&&(e.transition=n+"ms all "+o+"ms ease-in-out"),i.css(e),s&&i.on("transitionend webkittransitionend otransitionend mstransitionend",s)):n?i.animate(e,n,"swing",s):i.css(e)}for(var o=jquery,s=o(this),d=t.parts||3,r=o("
").addclass("ws_effect").css({position:"absolute",width:"100%",height:"100%",left:0,top:0,"z-index":8}).hide().appendto(e.parent()),a=o("
").css({position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"hidden"}).appendto(r),f=[],l=0;d>l;l++)f[l]=o("
").css({position:"absolute",height:"100%",width:(100/d).tofixed(3)+"%",border:"none",margin:0,overflow:"hidden",top:0,left:(100*l/d).tofixed(3)+"%"}).appendto(r);this.go=function(l,h,p){var g=h>l?1:0;if(p)if(-1>=p)l=(h+1)%i.length,g=0;else{if(!(p>=1))return-1;l=(h-1+i.length)%i.length,g=1}r.find("img").stop(!0,!0),r.show();var u=o(".ws_list",e);t.fadeout&&u.fadeout((1-1/d)*t.duration);var w=o(i[h]),c={width:w.width()||t.width,height:w.height()||t.height},v=w.clone().css(c).appendto(a);n(v,{left:0}),n(v,{left:(g?-1:1)*v.width()*.5},t.duration,.1*t.duration);for(var m=0;m=(effects.length-1)?0:(cureffect+1)); new_o.effect = effects[cureffect] || 'blinds'; wowreinitor(wowinstance, new_o); } },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); return result; } // for old compability window.wowreinitor = function (wow,options){ $(wow).wowslider(options); }; */ var wowslider = $("#wowslider-container").wowslider({effect: effects || "blinds",prev:"",next:"",fallback:ws_blinds,duration:duration,delay:delay,width:960,height:350,fullscreen:true,autoplay:true,autoplayvideo:false,stoponhover:false,loop:false,bullets:true,caption:true,captioneffect:"move",controls:true}); // change slider size var slidercont = $('.slideshow > .holder'), curresponsive = 1; function resizewnd() { // apply after transition if(curresponsive > 1) slidercont.css('width', '100%'); $(window).resize(); } $('#devices').on('click', 'a', function(e) { var thisclass = this.classname; e.preventdefault(); if(/laptop|tablet|mobile/g.test(thisclass)) { $('#devices').find('.laptop, .tablet, .mobile').removeclass('checked'); if(curresponsive > 1) { wowslider[0].wsresponsive(1); curresponsive = 1; $('#devices').find('.boxed, .fullwidth, .fullscreen').removeclass('checked'); $('#devices .boxed').addclass('checked'); } wowslider[0].wshideeffect(); wowslider[0].wsrestart(); if(/laptop/g.test(thisclass)) { slidercont.css('maxwidth', slidercont.width()).animate({ maxwidth: curresponsive>1?$(window).width():960 }, resizewnd); } else if(/tablet/g.test(thisclass)) { slidercont.css('maxwidth', slidercont.width()).animate({ maxwidth: 700 }, resizewnd); } else if(/mobile/g.test(thisclass)) { slidercont.css('maxwidth', slidercont.width()).animate({ maxwidth: 500 }, resizewnd); } $(this).addclass('checked'); } else { wowslider[0].wshideeffect(); wowslider[0].wsrestart(); if(/boxed/g.test(thisclass)) { wowslider[0].wsresponsive(1); curresponsive = 1; } else if(/fullwidth/g.test(thisclass)) { slidercont.css('maxwidth', 'none'); wowslider[0].wsresponsive(2); curresponsive = 2; } else if(/fullscreen/g.test(thisclass)) { /* wowslider[0].wsresponsive(3); curresponsive = 3; */ slidercont.css('maxwidth', 'none'); if(wowslider[0].wstogglefs) wowslider[0].wstogglefs(); return; } $('#devices').find('.boxed, .fullwidth, .fullscreen').removeclass('checked'); if(curresponsive > 1) { $('#devices').find('.tablet, .mobile').removeclass('checked'); $('#devices .laptop').addclass('checked'); resizewnd(); } $(this).addclass('checked'); } }); })(jquery);