function ws_basic_linear(options,images,container){var $=jQuery;var movingDiv=$("<div></div>").css({position:"absolute",display:"none",'z-index':2,width:options.width*2+"px",height:options.height+"px"}).appendTo(container);images.each(function(Index){$(this).css({'z-index':0});if(!Index){$(this).show();}else{$(this).hide();}});this.go=function(new_index,curIdx){movingDiv.stop(1,1);var dir=(new_index-curIdx+1)%images.length?"left":"right";$(images[curIdx]).clone().css({position:"absolute",left:"auto",right:"auto",top:0}).appendTo(movingDiv).css(dir,0);$(images[new_index]).clone().css({position:"absolute",left:"auto",right:"auto",top:0}).appendTo(movingDiv).css(dir,options.width+"px").show();movingDiv.css({left:"auto",right:"auto",top:0}).css(dir,0).show();$(images[curIdx]).hide();var an={};an[dir]=-options.width+"px";movingDiv.animate(an,options.duration,"easeInOutExpo",function(){$(images[new_index]).show();$(this).hide().html("");});return new_index;};}

function ws_basic(options,images,$container){var $=jQuery;var $Elements=$container.children();var $innerCont=$("<div style=\"position:relative;\"></div>");$container.append($innerCont);$innerCont.append($Elements);$container.css({position:"relative",overflow:"hidden"});$innerCont.css({position:"relative",width:options.outWidth*images.length*1.1+"px",left:0,top:0});images.css({position:"static"});this.go=function(index){$innerCont.stop(true).animate({left:-$(images.get(index)).position().left},options.duration,"easeInOutExpo");return index;};}

function ws_blast(options,images,aCont){var $=jQuery;var boxSize=Math.min(options.width,options.height)/3;var distance=1;var columns=Math.round(options.width/boxSize);var rows=Math.round(options.height/boxSize);var $partCont=$("<div></div>");aCont.css({overflow:"visible"}).append($partCont);$partCont.css({position:"absolute",left:(options.outWidth-options.width)/2+"px",top:(options.outHeight-options.height)/2+"px",width:options.width+"px",height:options.height+"px"});var partsOut=[];var partsIn=[];for(var index=0;index<columns*rows;index++){var i=index%columns;var j=Math.floor(index/columns);var left0=Math.round(options.width*i/columns);var top0=Math.round(options.height*j/rows);var left1=Math.round(options.width*(i+1)/columns);var top1=Math.round(options.height*(j+1)/rows);$([partsIn[index]=document.createElement("div"),partsOut[index]=document.createElement("div")]).css({position:"absolute",width:left1-left0,height:top1-top0,'background-position':-left0+"px -"+top0+"px"}).appendTo($partCont);}partsOut=$(partsOut);partsIn=$(partsIn);function setPos(parts,random,animate){var pWidth=options.width/columns;var pHeight=options.width/rows;var wpos={left:$(window).scrollLeft(),top:$(window).scrollTop(),width:$(window).width(),height:$(window).height()};$(parts).each(function(index){if(random){var left0=distance*options.width*(2*Math.random()-1)+options.width/2;var top0=distance*options.height*(2*Math.random()-1)+options.height/2;var gpos=$partCont.offset();gpos.left+=left0;gpos.top+=top0;if(gpos.left<wpos.left){left0-=gpos.left+wpos.left;}if(gpos.top<wpos.top){top0-=gpos.top+wpos.top;}if(gpos.left>wpos.left+wpos.width-pWidth){left0-=gpos.left-(wpos.left+wpos.width)+pWidth;}if(gpos.top>wpos.top+wpos.height-pHeight){top0-=gpos.top-(wpos.top+wpos.height)+pHeight;}}else{var left0=Math.round(options.width*(index%columns)/columns);var top0=Math.round(options.height*Math.floor(index/columns)/rows);}if(animate){$(this).animate({left:left0,top:top0},{queue:false,duration:options.duration});}else{$(this).css({left:left0,top:top0});}});}setPos(partsOut);setPos(partsIn,true);this.go=function(new_index,curIdx){$partCont.show();$(partsOut).stop(1).css({opacity:1,'z-index':3,'background-image':"url(\""+images.get(curIdx).src+"\")"});$(partsIn).stop(1).css({opacity:0,'z-index':2,'background-image':"url(\""+images.get(new_index).src+"\")"});setPos(partsIn,false,true);$(partsIn).animate({opacity:1},{queue:false,easing:"easeInOutExpo",duration:options.duration,complete:function(){$(images.get(curIdx)).hide();}});setPos(partsOut,true,true);$(partsOut).animate({opacity:0},{queue:false,easing:"easeInOutExpo",duration:options.duration,complete:function(){$(images.get(new_index)).show();for(var i=0;i<images.length;i++){if(new_index!=i){$(images.get(i)).hide();}}$partCont.hide();}});var tmp=partsIn;partsIn=partsOut;partsOut=tmp;return new_index;};}

function ws_blinds(options,$IMGs,$container){var $=jQuery;var cnt=3;$IMGs.each(function(index){if(index){$(this).hide();}});var $partscont=$("<div></div>");$partscont.css({position:"absolute",width:options.width+"px",height:options.height+"px",left:(options.outWidth-options.width)/2+"px",top:(options.outHeight-options.height)/2+"px"});$container.append($partscont);var parts=[];for(var i=0;i<cnt;i++){parts[i]=$("<div></div>");}$(parts).each(function(index){$(this).css({position:"absolute",'z-index':2,'background-repeat':"no-repeat",height:"100%",border:"none",margin:0,top:0,left:Math.round(100/cnt)*index+"%",width:(index<cnt-1?Math.round(100/cnt):100-Math.round(100/cnt)*(cnt-1))+"%"});$partscont.append(this);$partscont.hide();});this.go=function(index,prevIndex,dx){var dir=prevIndex>index?1:0;if(dx){if(dx<=-1){index=(prevIndex+1)%$IMGs.length;dir=0;}else if(dx>=1){index=(prevIndex-1+$IMGs.length)%$IMGs.length;dir=1;}else{return-1;}}for(var i=0;i<parts.length;i++){parts[i].stop(true,true);}function startPart(part_i,func){var $part=parts[part_i];var w=$part.width();var img=$IMGs.get(index);$part.css({'background-position':(!dir?-$(img).width():$(img).width()-$part.position().left)+"px 0",'background-image':"url("+img.src+")"});$part.animate({'background-position':-$part.position().left+"px 0"},options.duration/(parts.length+1)*(dir?parts.length-part_i+1:part_i+2),func);}function applyImage(){$IMGs.hide();$($IMGs.get(index)).show();$partscont.hide();$(parts).each(function(){$(this).css({'background-image':"none"});});}$partscont.show();for(var i=0;i<parts.length;i++){startPart(i,!dir&&i==parts.length-1||dir&&!i?applyImage:null);}return index;};}(function($){if(!document.defaultView||!document.defaultView.getComputedStyle){var oldCurCSS=$.curCSS;$.curCSS=function(elem,name,force){if(name==="background-position"){name="backgroundPosition";}if(name!=="backgroundPosition"||!elem.currentStyle||elem.currentStyle[name]){return oldCurCSS.apply(this,arguments);}var style=elem.style;if(!force&&style&&style[name]){return style[name];}return oldCurCSS(elem,"backgroundPositionX",force)+" "+oldCurCSS(elem,"backgroundPositionY",force);};}var oldAnim=$.fn.animate;$.fn.animate=function(prop){if("background-position"in prop){prop.backgroundPosition=prop['background-position'];delete prop['background-position'];}if("backgroundPosition"in prop){prop.backgroundPosition="("+prop.backgroundPosition;}return oldAnim.apply(this,arguments);};function toArray(strg){strg=strg.replace(/left|top/g,"0px");strg=strg.replace(/right|bottom/g,"100%");strg=strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var res=strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];}$.fx.step.backgroundPosition=function(fx){if(!fx.bgPosReady){var start=$.curCSS(fx.elem,"backgroundPosition");if(!start){start="0px 0px";}start=toArray(start);fx.start=[start[0],start[2]];var end=toArray(fx.end);fx.end=[end[0],end[2]];fx.unit=[end[1],end[3]];fx.bgPosReady=true;}var nowPosX=[];nowPosX[0]=(fx.end[0]-fx.start[0])*fx.pos+fx.start[0]+fx.unit[0];nowPosX[1]=(fx.end[1]-fx.start[1])*fx.pos+fx.start[1]+fx.unit[1];fx.elem.style.backgroundPosition=nowPosX[0]+" "+nowPosX[1];};})(jQuery);

function ws_blur(options,images){var $=jQuery;function blur(img,depth){var cont=$("<div></div>").css({position:"absolute",'z-index':(parseInt(img.css("z-index"))||0)+1,left:img.position().left,top:img.position().top,width:img.width()+"px",height:img.height()+"px",display:"none"}).appendTo(img.parent());var fi=(Math.sqrt(5)+1)/2;var dr=1-fi/2;for(var i=0;dr*i<depth;i++){var al=Math.PI*fi*i;var r=dr*i+1;var x=r*Math.cos(al);var y=r*Math.sin(al);$("<div></div>").css({opacity:1/(i+1),position:"absolute",'z-index':(parseInt(img.css("z-index"))||0)+1,left:0,top:0,background:"url(\""+img.attr("src")+"\") no-repeat "+Math.round(x)+"px "+Math.round(y)+"px",width:"100%",height:"100%"}).appendTo(cont);}return cont;}this.go=function(new_index,curIdx){var curImg=$(images.get(curIdx)),newImg=$(images.get(new_index)),curBlur=blur(curImg,5),newBlur=blur(newImg,5);curBlur.fadeIn(options.duration/3,function(){newBlur.css("z-index",3).fadeIn(options.duration/3,function(){curImg.css("z-index",0);curBlur.remove();newImg.css("z-index",1);newBlur.fadeOut(options.duration/3,function(){newBlur.remove();});});});return new_index;};}

function ws_fade(options,images){var $=jQuery;images.each(function(Index){if(!Index){$(this).show();}else{$(this).hide();}});this.go=function(new_index,curIdx){$(images.get(new_index)).fadeIn(options.duration);$(images.get(curIdx)).fadeOut(options.duration);return new_index;};}

function ws_fly(options,images,container){var $=jQuery;container.css("overflow","visible");images.each(function(Index){if(!Index){$(this).show();}else{$(this).hide();}});this.go=function(new_index,curIdx,dx){var dir=0;if(dx){if(dx>=1){dir=1;}if(dx<=-1){dir=0;}}var start=(dir?1:-1)*options.width/4;var $new=$(images.get(new_index));$new.stop(1,1);$new.css({opacity:"hide",left:start,'z-index':3});$new.animate({opacity:"show"},{duration:options.duration,queue:false});$new.animate({left:0},{duration:2*options.duration/3,queue:false});var $current=$(images.get(curIdx));setTimeout(function(){$current.animate({left:-start,opacity:"hide"},2*options.duration/3,function(){$current.css("left",0);$new.css({'z-index':"",opacity:1});});},options.duration/3);return new_index;};}

function ws_kenburns(options,images,container){var $=jQuery;var w=options.width,h=options.height;var useCanvas=document.createElement("canvas").getContext;var paths=[{from:[0,0,1.2],to:[1,0,1.2]},{from:[0,0,1.3],to:[0,1,1]},{from:[1,0,1.3],to:[0,1,1.3]},{from:[1,0,1.3],to:[1,1,1.3]},{from:[0,1,1.3],to:[0,0,1]},{from:[0,1,1.2],to:[1,1,1.2]},{from:[1,0,1.2],to:[1,1,1.2]}];var paths2=[{from:[0.5,1,1],to:[0.5,0,1.15]},{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:[1,0.5,1],to:[1,0.5,1.3]},{from:[0,0.5,1.2],to:[0,0.5,1]},{from:[1,0.5,1],to:[1,0.5,1.2]},{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,1,1],to:[0.5,1,1.3]}];function getPath(ind){var path=paths[Math.floor(Math.random()*paths.length)];if(useCanvas){path=paths2[Math.floor(Math.random()*paths2.length)];}return path;}function process(func,delay){var busy,a=0,da=40/delay;var timer=setInterval(function(){if(a<1){if(!busy){busy=1;func(a);busy=0;}a+=da;}else{stop(1);}},40);function stop(end){clearInterval(timer);if(end){func(1);}}return{stop:stop};}var ctx;var proc;if(useCanvas){var canvas=$("<canvas width=\""+w+"\" height=\""+h+"\"/>");canvas.appendTo(container);canvas.css({'z-index':8,position:"absolute",left:0,top:0});ctx=canvas.get(0).getContext("2d");}function calcPos(path,hProp,vProp){var an={width:w*path[2]+"px"};an[hProp?"right":"left"]=-w*(path[2]-1)*(hProp?1-path[0]:path[0])+"px";an[vProp?"bottom":"top"]=-h*(path[2]-1)*(vProp?1-path[1]:path[1])+"px";return an;}function setAnimate(img,path,needFade){if(ctx){if(proc){proc.stop();}proc=process(function(a){var p=[path.from[0]*(1-a)+a*path.to[0],path.from[1]*(1-a)+a*path.to[1],path.from[2]*(1-a)+a*path.to[2]];ctx.globalAlpha=needFade?Math.min(a*(1+options.delay/options.duration),1):1;ctx.drawImage(img,-w*(p[2]-1)*p[0],-h*(p[2]-1)*p[1],w*p[2],h*p[2]);},options.duration+options.delay);}else{img=$(img);with(path){img.css({left:"auto",right:"auto",top:"auto",bottom:"auto"}).css(calcPos(from,from[0]>0.5,from[1]>0.5)).stop(1,1).animate(calcPos(to,from[0]>0.5,from[1]>0.5),{easing:"linear",queue:false,duration:options.duration+options.delay});if(needFade){img.fadeIn(options.duration);}}}}images.each(function(Index){$(this).css({left:"auto",top:"auto",right:"auto",bottom:"auto"});if(!Index){setAnimate(this,getPath(0),0);}else{$(this).hide();}});this.go=function(new_index,curIdx){setAnimate(images.get(new_index),getPath(new_index),1);if(!ctx){$(images.get(curIdx)).fadeOut(options.duration);}return new_index;};}

var ws_slices=function(options,images,$container){var $=jQuery;var $new_cont;var $Imgs;var $As=$container.children();$new_cont=$("<div></div>");$container.append($new_cont);$new_cont.css({left:(options.outWidth-options.width)/2+"px",top:(options.outHeight-options.height)/2+"px",width:options.width+"px",height:options.height+"px",'background-color':"#FFF",position:"absolute"});$new_cont.append($As);slider=$new_cont.nivoSlider({directionNav:false,keyboardNav:false,controlNav:false,manualAdvance:true,caption:0,effect:"sliceDownRight,sliceDownLeft,sliceUpRight,sliceUpLeft,sliceUpDownRight,sliceUpDownLeft,sliceUpDownRight,sliceUpDownLeft,fold,fold,fold",animSpeed:options.duration});images.css({border:"none"});images.show();$As.css({'z-index':3,position:"absolute",left:0,top:0});this.go=function(index,cur_index){var res=$new_cont.data("nivoslider").nivoRun(index);if(res){$(images.get(cur_index)).hide();$(images.get(index)).show();return index;}else{return-1;}};};

function ws_squares(options,images,container){var $=jQuery;var $new_cont;var As=container.children();$new_cont=$("<div id=\"wowslider_tmp"+Math.round(Math.random()*99999)+"\"></div>");container.append($new_cont);$new_cont.css({left:(options.outWidth-options.width)/2+"px",top:(options.outHeight-options.height)/2+"px",width:options.width+"px",height:options.height+"px",'background-color':"#FFF",'z-index':2,position:"absolute"});$new_cont.append(As);$(As.get(0)).clone().css({position:"absolute",left:0,top:0}).prependTo(container);$new_cont.coinslider({hoverPause:false,navigation:0,delay:-1,width:options.width,height:options.height});this.go=function(index){$.transition($new_cont.get(0),index);return index;};}

function ws_stack(options,images,container){var $=jQuery;this.go=function(new_index,curIdx,dx,dy){var dir=images.length>2?(new_index-curIdx+1)%images.length:1;if(Math.abs(dx)>=1){dir=dx>0?0:1;}dir=dir^!!options.revers;var loImg=$(images.get(dir?curIdx:new_index));var hiImg=$(images.get(dir?new_index:curIdx));images.each(function(Index){if(dir&&Index!=curIdx){this.style.zIndex=Math.max(0,this.style.zIndex-1);}});var outPos=(options.revers?-1:1)*options.width;var newLeft=dir?0:outPos;hiImg.stop(1,1).css({'z-index':4,left:outPos-newLeft+"px"});if(!dir){loImg.stop(1,1).css({left:0});}loImg.css({'z-index':3});hiImg.animate({left:newLeft+"px"},options.duration,"easeInOutExpo");return new_index;};}

function ws_stack_vertical(options,images,container){var $=jQuery;this.go=function(new_index,curIdx,dx,dy){var dir=(new_index-curIdx+1)%images.length;if(Math.abs(dy)>=1){dir=dy>0?0:1;}var loImg=$(images.get(dir?curIdx:new_index));var hiImg=$(images.get(dir?new_index:curIdx));images.each(function(Index){if(dir&&Index!=curIdx){this.style.zIndex=Math.max(0,this.style.zIndex-1);}});var newTop=dir?0:-options.height;hiImg.stop(1,1).css({'z-index':4,top:-options.height-newTop+"px"});if(!dir){loImg.stop(1,1).css({top:0});}loImg.css({'z-index':3});hiImg.animate({top:newTop+"px"},options.duration,"easeInOutExpo");return new_index;};}

