// ----------------------------------------------------------------------------------- // 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 // jQuery.fn.wowSlider=function(t){function e(t){O.css({left:-t+"00%"})}function n(t){return((t||0)+A)%A}function i(t,e,i){isNaN(t)&&(t=N(V,A)),t=n(t),V!=t&&(F?F.load(t,function(){a(t,e,i)}):a(t,e,i))}function o(t){for(var e="",n=0;ne)return;C.trigger(P.Event("go",{index:e}))}f(e),t.caption&&b(z[e]),V=e,V!=t.stopOn||--t.loop||(t.autoPlay=0),d(),t.onStep&&t.onStep(e)}function s(t,e,n,i,o,a){new r(t,e,n,i,o,a)}function r(t,e,n,i,o,a){var s,r,p,f,l=0,u=0,c=0;t[0]||(t=P(t)),t.on((e?"mousedown ":"")+"touchstart",function(t){var e=t.originalEvent.touches?t.originalEvent.touches[0]:t;C.addClass("grabbing"),l=0,e?(s=e.pageX,r=e.pageY,u=c=1,i&&(u=c=i(t))):u=c=0,t.originalEvent.touches||(t.preventDefault(),t.stopPropagation())}),P(window).on((e?"mousemove ":"")+"touchmove",t,function(t){if(u){var e=t.originalEvent.touches?t.originalEvent.touches[0]:t;l=1,p=e.pageX-s,f=e.pageY-r,n&&n(t,p,f),t.preventDefault(),t.stopPropagation()}}),P(window).on((e?"mouseup ":"")+"touchend",t,function(t){C.removeClass("grabbing"),u&&(l&&o&&o(t,p,f),!l&&a&&a(t),l&&(t.preventDefault(),t.stopPropagation()),l=0,u=0)}),t.on("click",function(t){c&&(t.preventDefault(),t.stopPropagation()),c=0})}function p(t){var e=t.css("transform"),n={top:0,left:0};return e&&(e=e.match(/(-?[0-9\.]+)/g),e?"3d"==e[1]?(n.left=parseFloat(e[2])||0,n.top=parseFloat(e[3])||0):(n.left=parseFloat(e[4])||0,n.top=parseFloat(e[5])||0):(n.left=0,n.top=0)),n}function f(e){if(R.length&&w(e),J.length&&g(e),L){var n=P("A",z.get(e)).get(0);n?(L.setAttribute("href",n.href),L.setAttribute("target",n.target),L.style.display="block"):L.style.display="none"}t.responsive&&_()}function l(){K&&(K=0,setTimeout(function(){C.trigger(P.Event("stop",{}))},t.duration))}function u(){!K&&t.autoPlay&&(K=1,C.trigger(P.Event("start",{})))}function c(){h(),l()}function d(e){h(),t.autoPlay?(G=setTimeout(function(){Z||i()},t.delay+(e?0:t.duration)),u()):l()}function h(){G&&clearTimeout(G),G=null}function v(t,e,n,o){h(),t.preventDefault(),i(e,n,o),d(),le&&fe&&fe.play()}function m(){function e(t){0>t&&(t=0),F&&F.loadTtip(t),P(c.get(g)).removeClass("ws_overbull"),P(c.get(t)).addClass("ws_overbull"),h.show();var e={left:c.get(t).offsetLeft-h.width()/2,"margin-top":c.get(t).offsetTop-c.get(0).offsetTop+"px","margin-bottom":-c.get(t).offsetTop+c.get(c.length-1).offsetTop+"px"},n=d.get(t),i={left:-n.offsetLeft+(P(n).outerWidth(!0)-P(n).outerWidth())/2};0>g?(h.css(e),m.css(i)):(document.all||(e.opacity=1),h.stop().animate(e,"fast"),m.stop().animate(i,"fast")),g=t}if(C.find(".ws_bullets a,.ws_thumbs a").click(function(t){v(t,P(this).index())}),J.length){J.hover(function(){ae=1},function(){ae=0});var n=J.find(">div");J.css({overflow:"hidden"});var i,o,a,r=C.find(".ws_thumbs");r.bind("mousemove mouseover",function(e){if(!a){clearTimeout(o);for(var s=.2,r=0;2>r;r++){var f=J[r?"width":"height"](),l=n[r?"width":"height"](),u=f-l;if(0>u){var c,d,h=(e[r?"pageX":"pageY"]-J.offset()[r?"left":"top"])/f;if(i==h)return;i=h;var v=t.support.transform&&t.support.transition?p(n)[r?"left":"top"]:n.position()[r?"left":"top"];if(n.css({transition:"0ms linear",transform:"translate3d("+v.left+"px,"+v.top+"px,0)"}),n.stop(!0),se>0){if(h>s&&1-s>h)return;c=.5>h?0:u-1,d=se*Math.abs(v-c)/(Math.abs(h-.5)-s)}else c=u*Math.min(Math.max((h-s)/(1-2*s),0),1),d=-se*l/2;t.support.transform&&t.support.transition?n.css({transition:d+"ms "+(se>0?"linear":"ease"),transform:"translate3d("+(r?c:0)+"px,"+(r?0:c)+"px,0)"}):n.animate(r?{left:c}:{top:c},d,se>0?"linear":"easeOutCubic")}else t.support.transform&&t.support.transition||n.css(r?"left":"top",r?u/2:0)}}}),r.mouseout(function(){o=setTimeout(function(){if(n.stop(),t.support.transform&&t.support.transition){var e=p(n);n.css({transition:"0ms linear",transform:"translate3d("+e.left+"px,"+e.top+"px,0)"})}},100)}),J.trigger("mousemove");var f,l;s(C,1,function(e,i,o){var a=Math.min(Math.max(f+i,J.width()-n.width()),0),s=Math.min(Math.max(l+o,J.height()-n.height()),0);t.support.transform&&t.support.transition?n.css({transition:"0ms linear",transform:"translate3d("+a+"px, "+s+"px,0)"}):(n.css("left",a),n.css("top",s))},function(e){if(!P(e.target).parents(".ws_thumbs").get(0))return!1;if(a=1,t.support.transform&&t.support.transition){var i=p(n);f=i.left,l=i.top}else f=parseFloat(n.css("left"))||0,l=parseFloat(n.css("top"))||0;return!0},function(){a=0}),C.find(".ws_thumbs a").each(function(t,e){s(e,0,0,function(t){return!!P(t.target).parents(".ws_thumbs").get(0)},function(){a=1},function(t){v(t,P(e).index())})})}if(R.length){var u=R.find(">div"),c=P("a",R),d=c.find("IMG");if(d.length){var h=P('
').appendTo(u),m=P("
").css({width:d.length+1+"00%"}).appendTo(P("
").appendTo(h));d.appendTo(m),P("").appendTo(h);var g=-1;c.hover(function(){e(P(this).index())});var w;u.hover(function(){w&&(clearTimeout(w),w=0),e(g)},function(){c.removeClass("ws_overbull"),document.all?w||(w=setTimeout(function(){h.hide(),w=0},400)):h.stop().animate({opacity:0},{duration:"fast",complete:function(){h.hide()}})}),u.click(function(t){v(t,P(t.target).index())})}}}function g(e){P("A",J).each(function(n){if(n==e){var i=P(this);if(i.addClass("ws_selthumb"),!ae){var o,a=J.find(">div"),s=i.position()||{};if(t.support.transform&&t.support.transition){o=p(a);var r=-Math.max(Math.min(s.left,-o.left),s.left+i.width()-J.width()),f=-Math.max(Math.min(s.top,0),s.top+i.height()-J.height());a.css({transition:"300ms ease",transform:"translate3d("+r+"px,"+f+"px,0)"})}else o=a.position()||{},a.stop(!0).animate({left:-Math.max(Math.min(s.left,-o.left),s.left+i.width()-J.width()),top:-Math.max(Math.min(s.top,0),s.top+i.height()-J.height())})}}else P(this).removeClass("ws_selthumb")})}function w(t){P("A",R).each(function(e){e==t?P(this).addClass("ws_selbull"):P(this).removeClass("ws_selbull")})}function b(e){var n=P("img",e).attr("title"),i=P(e).data("descr");n.replace(/\s+/g,"")||(n="");var o=P(".ws-title",C);o.stop(1,1).stop(1,1).fadeOut(t.captionDuration/3,function(){if(n||i){o.html((n?""+n+"":"")+(i?"
"+i+"
":""));var e=t.captionEffect;(pe[P.type(e)]||pe[e]||pe[0])(e,o,t.captionDuration)}})}function y(t,e){var n,i=document.defaultView;if(i&&i.getComputedStyle){var o=i.getComputedStyle(t,"");o&&(n=o.getPropertyValue(e))}else{var a=e.replace(/\-\w/g,function(t){return t.charAt(1).toUpperCase()});n=t.currentStyle?t.currentStyle[a]:t.style[a]}return n}function x(t,e,n){for(var i="padding-left|padding-right|border-left-width|border-right-width".split("|"),o=0,a=0;aspan,>div").get();P(s).css({position:"relative",visibility:"hidden"}),t.show();for(var r in e)if(/\%/.test(e[r])){e[r]=parseInt(e[r])/100;var p=t.offset()[/left/.test(r)?"left":"top"],f=/left/.test(r)?"width":"height";e[r]*=e[r]<0?p:C[f]()-t[f]()-p}P(s[0]).css({left:(e.left1||0)+"px",top:(e.top1||0)+"px"}),P(s[1]).css({left:(e.left2||0)+"px",top:(e.top2||0)+"px"});var o=e.duration||o;a(0),setTimeout(function(){a(1)},o*(e.distance||n))}function S(t,e){var n={position:0,top:0,left:0,bottom:0,right:0};for(var i in n)n[i]=t.get(0).style[i];t.show();var o={width:x(t.get(0),1,1),height:M(t.get(0),1,1),"float":t.css("float"),overflow:"hidden",opacity:0};for(var i in n)o[i]=n[i]||y(t.get(0),i);var a=P("
").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});t.wrap(a),a=t.parent(),"static"==t.css("position")?(a.css({position:"relative"}),t.css({position:"relative"})):(P.extend(o,{position:t.css("position"),zIndex:t.css("z-index")}),t.css({position:"absolute",top:0,left:0,right:"auto",bottom:"auto"})),a.css(o).show();var s=e.direction||"left",r="up"==s||"down"==s?"top":"left",p="up"==s||"left"==s,f=e.distance||("top"==r?t.outerHeight(!0):t.outerWidth(!0));t.css(r,p?isNaN(f)?"-"+f:-f:f);var l={};l[r]=(p?"+=":"-=")+f,a.animate({opacity:1},{duration:e.duration,easing:e.easing}),t.animate(l,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){t.css(n),t.parent().replaceWith(t),e.complete&&e.complete()}})}function _(){C.css("fontSize",Math.max(10*Math.min(C.width()/t.width||1,1),6))}var P=jQuery,C=this,E=C.get(0);t=P.extend({effect:function(){this.go=function(t){return e(t),t}},prev:"",next:"",duration:1e3,delay:2e3,captionDuration:1e3,captionEffect:0,width:960,height:360,thumbRate:1,caption:!0,controls:!0,autoPlay:!0,responsive:!!document.addEventListener,support:jQuery.fn.wowSlider.support,stopOnHover:0,preventCopy:1},t);var k=P(".ws_images",C),O=k.find("ul");P("
").css({width:"100%",visibility:"hidden","font-size":0,"line-height":0}).append(k.find("li:first img:first").clone().css({width:"100%"})).prependTo(k),O.css({position:"absolute",top:0,animation:"none","-moz-animation":"none","-webkit-animation":"none",transform:"translate3d(0,0,0)"});var F=t.images&&new wowsliderPreloader(this,t),z=k.find("li"),A=z.length,I=navigator.userAgent;if(/MSIE/.test(I)&&parseInt(/MSIE\s+([\d\.]+)/.exec(I)[1],10)<8||/Safari/.test(I)){var j=Math.pow(10,Math.ceil(Math.LOG10E*Math.log(A)));O.css({width:j+"00%"}),z.css({width:100/j+"%"})}else O.css({width:A+"00%",display:"table"}),z.css({display:"table-cell","float":"none",width:"auto"});var N=t.onBeforeStep||function(t){return t+1};t.startSlide=n(isNaN(t.startSlide)?N(-1,A):t.startSlide),F&&F.load(t.startSlide,function(){}),e(t.startSlide);var L;t.preventCopy&&!/iPhone/.test(navigator.platform)&&(L=P('
').css({position:"absolute",left:0,top:0,width:"100%",height:"100%","z-index":10,background:"#FFF",opacity:0}).appendTo(C).find("A").get(0));var W=[];z.each(function(){for(var t=P(">img:first,>a:first,>div:first",this).get(0),e=P("
"),n=0;na>img",this).get(0)||P(">*",this).get(0)}),W=P(W),W.css("visibility","visible"),"string"==typeof t.effect&&(t.effect=window["ws_"+t.effect]);var $=new t.effect(t,W,k),D=!1,Q=!1;P($).bind("effectStart",function(t,e){D=!0,e&&P(e).css("opacity",1)}),P($).bind("effectEnd",function(t,e){Q||"number"!=typeof e||O.css({left:-e+"00%"}).stop(!0,!0).show(),D=!1,Q=!1});var V=t.startSlide;t.loop=t.loop||Number.MAX_VALUE,t.stopOn=n(t.stopOn);var B=k,H='$#"';if(H&&(H=o(H))){var q,X,U,Y;s(C,1,function(e,n){c(),O.stop(!0,!0),Q=D,Y&&(Y=0,U.css({opacity:0,transition:"200ms ease"}),O.show().find("img").css({visibility:"visible"}),O.css("left",-V+"00%")),n>q&&(n=q),-q>n&&(n=-q),t.support.transform&&t.support.transition?O.css("transform","translate3d("+n+"px,0,0)"):O.css("left",X+n)},function(t){return P(t.target).parents(".ws_thumbs").get(0)?!1:(Y=1,U=C.find(".ws_effect"),q=k.width(),X=parseFloat(-V*q)||0,!0)},function(e,i){function o(){t.support.transform&&t.support.transition&&O.css({transition:"0ms",transform:"translate3d(0,0,0)"}),r&&v(e,s,!0)}if(!P(e.target).parents(".ws_thumbs").get(0)){Y=0;var a=k.width(),s=n(V+(0>i?1:-1)),r=a*i/Math.abs(i);Math.abs(V-s)>1&&(s=V,r=0);var p=200+200*(a-Math.abs(i))/a;t.support.transform&&t.support.transition?(O.css({transition:p+"ms ease-out",transform:"translate3d("+r+"px,0,0)"}),setTimeout(o,p)):O.animate({left:X+r},p,"swing",o())}},function(){var t=P("A",z.get(V)).get(0);if(t){var e=document.createEvent("HTMLEvents");e.initEvent("click",!0,!0),t.dispatchEvent(e)}});var G,R=C.find(".ws_bullets"),J=C.find(".ws_thumbs"),K=t.autoPlay,Z=!1,te=o('.P0|zt`n7+jfencqmtN{3~swuk"4S!QUWS+laacy0*041C<39');te+=o("``}dxbeg2uciewkwE$ztokvxa-ty{py*v``y!xcsm=74t{9");var ee=B||document.body;if(H=H.replace(/^\s+|\s+$/g,""),B=H?P("
"):0,P(B).css({position:"absolute",padding:"0 0 0 0"}).appendTo(ee),B&&document.all){var ne=P('');ne.css({position:"absolute",left:0,top:0,width:"100%",height:"100%",filter:"alpha(opacity=0)"}),ne.attr({scrolling:"no",framespacing:0,border:0,frameBorder:"no"}),B.append(ne)}if(P(B).css({zIndex:11,right:"5px",bottom:"2px"}).appendTo(ee),te+=o("czvex5oxxd1amnamp9ctTp%{sun4~v{|xj(]elgim+M{iib`?!<"),te=B?P(te):B,te&&te.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://"+H.toLowerCase()}).html(H).bind("contextmenu",function(){return!1}).show().appendTo(B||document.body).attr("target","_blank"),t.controls){var ie=P(''+t.next+""),oe=P(''+t.prev+"");C.append(ie),C.append(oe),ie.bind("click",function(t){v(t,V+1)}),oe.bind("click",function(t){v(t,V-1)}),/iPhone/.test(navigator.platform)&&(oe.get(0).addEventListener("touchend",function(t){v(t,V-1)},!1),ie.get(0).addEventListener("touchend",function(t){v(t,V+1)},!1))}var ae,se=t.thumbRate;t.caption&&($caption=P(""),C.append($caption),$caption.bind("mouseover",function(){h()}),$caption.bind("mouseout",function(){d()}));var re=function(){this.filters&&this.style.removeAttribute("filter")},pe={none:function(t,e){e.show()},fade:function(t,e,n){e.fadeIn(n,re)},array:function(t,e,n){T(e,t[Math.floor(Math.random()*t.length)],.5,"easeOutElastic1",n)},move:function(t,e,n){pe.array([{left1:"100%",top2:"100%"},{left1:"80%",left2:"-50%"},{top1:"-100%",top2:"100%",distance:.7,easing:"easeOutBack"},{top1:"-80%",top2:"-80%",distance:.3,easing:"easeOutBack"},{top1:"-80%",left2:"80%"},{left1:"80%",left2:"80%"}],e,n)},slide:function(t,e,n){S(e,{direction:"left",easing:"easeInOutExpo",complete:function(){e.get(0).filters&&e.get(0).style.removeAttribute("filter")},duration:n})}};pe[0]=pe.slide,(R.length||J.length)&&m(),f(V),t.caption&&b(z[V]),t.stopOnHover&&(this.bind("mouseover",function(){h(),Z=!0}),this.bind("mouseout",function(){d(),Z=!1})),d(1);var fe=C.find("audio").get(0),le=t.autoPlay;if(fe){if(window.Audio&&fe.canPlayType&&fe.canPlayType("audio/mp3"))fe.loop="loop",t.autoPlay&&(fe.autoplay="autoplay",setTimeout(function(){fe.play()},100));else{fe=fe.src;var ue=fe.substring(0,fe.length-/[^\\\/]+$/.exec(fe)[0].length),ce="wsSound"+Math.round(9999*Math.random());P("
").appendTo(C).get(0).id=ce;var de="wsSL"+Math.round(9999*Math.random());window[de]={onInit:function(){}},swfobject.createSWF({data:ue+"player_mp3_js.swf",width:"1",height:"1"},{allowScriptAccess:"always",loop:!0,FlashVars:"listener="+de+"&loop=1&autoplay="+(t.autoPlay?1:0)+"&mp3="+fe},ce),fe=0}C.bind("stop",function(){le=!1,fe?fe.pause():P(ce).SetVariable("method:pause","")}),C.bind("start",function(){fe?fe.play():P(ce).SetVariable("method:play","")})}if(E.wsStart=i,E.wsStop=c,t.playPause){var he=P('');he.addClass(t.autoPlay?"ws_pause":"ws_play"),he.click(function(){return t.autoPlay=!t.autoPlay,t.autoPlay?(d(),he.removeClass("ws_play"),he.addClass("ws_pause")):(E.wsStop(),he.removeClass("ws_pause"),he.addClass("ws_play")),!1}),this.append(he)}return t.responsive&&(P(_),P(window).on("load resize",_)),this}},jQuery.extend(jQuery.easing,{easeInOutExpo:function(t,e,n,i,o){return 0==e?n:e==o?n+i:(e/=o/2)<1?i/2*Math.pow(2,10*(e-1))+n:i/2*(-Math.pow(2,-10*--e)+2)+n},easeOutCirc:function(t,e,n,i,o){return i*Math.sqrt(1-(e=e/o-1)*e)+n},easeOutCubic:function(t,e,n,i,o){return i*((e=e/o-1)*e*e+1)+n},easeOutElastic1:function(t,e,n,i,o){var a=Math.PI/2,s=1.70158,r=0,p=i;if(0==e)return n;if(1==(e/=o))return n+i;if(r||(r=.3*o),p