(function(a,b){function u(c,d,e){var f=0;var g=e.find("#creative_layer_holder");c.find("div").each(function(c){var d=a(this);if(d.data("parent")==b)d.data("parent",d.parent());if(d.hasClass("creative_layer")){d.css({opacity:"0.0"});d.appendTo(g)}});e.find("#creative_layer_holder div").each(function(c){var e=a(this);if(e.hasClass("creative_layer")){e.css({opacity:"1.0"});if(a.browser.msie&&a.browser.version>=7&&a.browser.version<9){e.addClass("noFilterClass");e.css({display:"none"})}}if(e.attr("id")!="ext_ext_before"&&!e.hasClass("freshslice")&&!e.hasClass("freshbox")){e.stop(true,true)}if(e.data("_top")==b)e.data("_top",e.position().top);if(e.data("_left")==b)e.data("_left",e.position().left);if(e.data("_op")==b){e.data("_op",e.css("opacity"))}e.css({"z-index":1200});if(a.browser.msie&&a.browser.version>=7&&a.browser.version<9){if(e.hasClass("creative_layer")){e.css({display:"block"})}}else{if(e.hasClass("slideup")){e.animate({top:e.data("_top")+20+"px"},{duration:0,queue:false}).delay(d+(f+1)*200).animate({top:e.data("_top")-20+"px"},{duration:300,queue:true});f++}if(e.hasClass("slideright")){e.animate({left:e.data("_left")-20+"px"},{duration:0,queue:false}).delay(d+(f+1)*200).animate({left:e.data("_left")+20+"px"},{duration:300,queue:true});f++}if(e.hasClass("slidedown")){e.animate({top:e.data("_top")-20+"px"},{duration:0,queue:false}).delay(d+(f+1)*200).animate({top:e.data("_top")+20+"px"},{duration:300,queue:true});f++}if(e.hasClass("slideleft")){e.animate({left:e.data("_left")+20+"px"},{duration:0,queue:false}).delay(d+(f+1)*200).animate({left:e.data("_left")-20+"px"},{duration:300,queue:true});f++}if(e.hasClass("fadeup")){e.animate({top:e.data("_top")+20+"px",opacity:0},{duration:0,queue:false}).delay(d+(f+1)*200).animate({top:e.data("_top")-20+"px",opacity:e.data("_op")},{duration:300,queue:true});f++}if(e.hasClass("faderight")){e.animate({left:e.data("_left")-20+"px",opacity:0},{duration:0,queue:false}).delay(d+(f+1)*200).animate({left:e.data("_left")+20+"px",opacity:e.data("_op")},{duration:300,queue:true});f++}if(e.hasClass("fadedown")){e.animate({top:e.data("_top")-20+"px",opacity:0},{duration:0,queue:false}).delay(d+(f+1)*200).animate({top:e.data("_top")+20+"px",opacity:e.data("_op")},{duration:300,queue:true});f++}if(e.hasClass("fadeleft")){e.animate({left:e.data("_left")+20+"px",opacity:0},{duration:0,queue:false}).delay(d+(f+1)*200).animate({left:e.data("_left")-20+"px",opacity:e.data("_op")},{duration:300,queue:true});f++}if(e.hasClass("fade")){e.animate({opacity:0},{duration:0,queue:false}).delay(d+(f+1)*200).animate({opacity:e.data("_op")},{duration:300,queue:true});f++}}})}function t(a){jQuery(a.find("#drag")).animaDrag({speed:0,interval:0,easing:null,direction:"vertical",boundary:a.find("#mask"),boundary_offset:30,grip:null,overlay:false,afterDiv:a.data("currentSlide")})}function s(b,c){b.each(function(){$this=a(this);n($this,c)});b.find("li").each(function(b){$this=a(this);o($this,b,c)});b.find("ul").css({display:"block"});b.find("#toolbox").animate({opacity:"1.0"},1e3);if(a.browser.msie&&a.browser.version>=7&&a.browser.version<9){b.find("ul li").css({display:"block",opacity:"0.0"});b.find("ul li").animate({opacity:"1.0"},300)}else{b.find("ul li").css({display:"block"})}b.find("#mainloader").animate({opacity:"0.3"},{duration:500,complete:function(){var b=a(this);b.remove()}});u(b.data("currentSlide"),500,b)}function r(c,d){var e=a('<div id="toolbox" style="opacity:0"></div>');if(a.browser.msie&&a.browser.version>=7&&a.browser.version<9){e.css({"z-index":"4200"});e.addClass("noFilterClass")}else{e.css({"z-index":"4200"})}c.append(e);var f=a("<div id='previous'></div>");var g=a("<div id='next'></div>");var h=function(b){b.hover(function(){var b=a(this);if(b.attr("id")=="previous")b.css({"background-position":"bottom right"});else b.css({"background-position":"bottom left"})},function(){$this=a(this);if($this.attr("id")=="previous")$this.css({"background-position":"top right"});else $this.css({"background-position":"top left"})})};var i=function(b){b.click(function(){var b=a(this);var e=c.data("currentSlide").index();if(b.attr("id")=="previous")e++;else e--;if(e==c.data("currentSlide").parent().find("li").size())e=0;if(e==-1)e=c.data("currentSlide").parent().find("li").size()-1;var f=c.find("li").each(function(f){b=a(this);if(f==e){m(c.data("currentSlide"),b,c,d)}})})};h(f);i(f);h(g);i(g);e.append(f);e.append(g);var j=a("<div id='mini_divider'></div>");e.append(j);c.find("li").each(function(f){var g=a(this);var h=g.parent().find("li").size()-1;var i=a("<div id='"+(h-f)+"' class='mini_thumbnail_buttons'></div>");e.append(i);if(c.data("currentSlide").index()==h-f){i.data("on",true);i.css({"background-position":"bottom left"})}var j=a('<div id="cd" class="countdown" style="display:none;background-position:0px 0px"></div>');j.data("idNum",h-f);i.append(j);if(a.browser.msie&&a.browser.version>=7&&a.browser.version<9)j.addClass("noFilterClass");if(h-f==0){j.css({display:"block"})}i.hover(function(){var d=a(this);d.css({"background-position":"top right"});if(d.data().on==true)d.css({"background-position":"bottom right"});var e=a('<div id="image_thumbnail" style="opacity:0.0;left:'+d.position().left+"px;top:"+(d.position().top+10)+'px"></div>');d.parent().append(e);if(d.hasClass("wedding_mini_thumbnail_buttons")){e.addClass("wedding_image_thumbnail")}else{if(d.hasClass("fashion_mini_thumbnail_buttons")){e.addClass("fashion_image_thumbnail")}else{if(d.hasClass("custom_mini_thumbnail_buttons")){e.addClass("custom_image_thumbnail")}}}var f=a(this).attr("id");var g="";var h=0;var i=0;c.find("li").each(function(){var c=a(this);if(c.index()==f){var d=c.find("#before");g=d.attr("src");if(c.data("orgWidth")==b)c.data("orgWidth",d.width());if(c.data("orgHeight")==b)c.data("orgHeight",d.height());h=c.data("orgWidth");i=c.data("orgHeight")}});if(e.width()==0){h=h/5;i=i/5;e.css({width:h+"px",height:i+"px"})}else{h=e.width();i=e.height()}var j=h-6;var k=i-6;var l=parseInt(e.css("margin-top"),0);if(l==0)l=0-k-6;e.css({left:d.position().left+10+ -j/2+"px",width:j+6+"px",height:k+6+"px","margin-top":l+"px"});e.append('<div><div><img id="thimg" style="position:absolute;top:3px;left:3px;width:'+j+"px;height:"+k+'px" src="'+g+'"></div></div>');e.append('<div id="loader" style="loader"></div>');e.append('<div id="image_thumbnail_arrow" style="position:absolute;left:'+(h/2-4)+"px;top:"+(i-1)+'px"></div>');if(d.hasClass("wedding_mini_thumbnail_buttons")){e.find("#image_thumbnail_arrow").addClass("wedding_image_thumbnail_arrow")}else{if(d.hasClass("fashion_mini_thumbnail_buttons")){e.find("#image_thumbnail_arrow").addClass("fashion_image_thumbnail_arrow")}else{if(d.hasClass("custom_mini_thumbnail_buttons")){e.find("#image_thumbnail_arrow").addClass("custom_image_thumbnail_arrow")}}}e.animate({opacity:1,top:+1},{duration:200})},function(){var b=a(this);b.css({"background-position":"top left"});if(b.data().on==true)b.css({"background-position":"bottom left"});b.parent().find("#image_thumbnail").remove()});i.click(function(){var b=a(this);if(b.data().on!=true){var e=a(this).attr("id");var f=c.find("li").each(function(b){var f=a(this);if(b==e){m(c.data("currentSlide"),f,c,d)}})}})});c.find("#toolbox").css({width:c.find("#toolbox").width()+"px"})}function q(b,c){var d=b.data().dragH;b.each(function(){$this=a(this);n($this,c)});b.find("li").each(function(b){$this=a(this);o($this,b,c)});b.css({opacity:"0.0",display:"block"});b.animate({opacity:"1.0"},1500);r(b,c,b.data("currentSlide"))}function p(a,b){a.find("ul").wrap("<div id='mask'></div>");a.find("#mask").css({overflow:"hidden",width:b.width+"px",height:b.height+"px",position:"absolute"})}function o(b,c,d){a(b).css({width:d.width+"px",height:d.height+"px","z-index":"200",position:"relative",overflow:"hidden",left:0,top:0});if(c>0)a(b).css({opacity:0})}function n(a,b){a.find(".creative_layer").css({width:b.width+"px",height:b.height+"px",position:"absolute",top:"0px",left:"0px"});a.css({width:b.width+"px",height:b.height+"px",position:"relative"})}function m(c,d,e,f){var g=false;e.find("#creative_layer_holder div").each(function(b){var c=a(this);var d=c.data("parent");c.appendTo(d)});e.find("li").each(function(b){var e=a(this);if(e.index()!=c.index()&&e.index()!=d.index()){e.css({"z-index":"950",opacity:"0.0"});if(a.browser.msie&&a.browser.version>=7&&a.browser.version<9)e.addClass("noFilterClass")}});c.css({"z-index":"995"});d.css({"z-index":"1000"});if(c.data("orgWidth")==b){c.data("orgWidth",c.find("#before").width());c.find("#before").data("orgWidth",c.data("orgWidth"))}if(c.data("orgHeight")==b){c.data("orgHeight",c.find("#before").height());c.find("#before").data("orgHeight",c.data("orgHeight"))}if(d.data("orgWidth")==b){d.data("orgWidth",d.find("#before").width());d.find("#before").data("orgWidth",d.data("orgWidth"))}if(d.data("orgHeight")==b){d.data("orgHeight",d.find("#before").height());d.find("#before").data("orgHeight",d.data("orgHeight"))}var m=f.pt+f.height/2-d.data("orgHeight")/2;var n=f.pl+f.width/2-d.data("orgWidth")/2;var o=d.data("orgWidth");var p=d.data("orgHeight");if(o>f.width)o=f.width;if(p>f.height)p=f.height;if(m<f.pt)m=f.pt;if(n<f.pl)n=f.pl;e.find("#mask:first").css({top:m+"px",left:n+"px",width:o+"px",height:p+"px"});c.find("#before").css({width:c.data("orgWidth")+"px",height:c.data("orgHeight")+"px"});d.find("#before").css({width:d.data("orgWidth")+"px",height:d.data("orgHeight")+"px"});c.css({width:f.width+"px",height:f.height+"px"});d.css({width:f.width+"px",height:f.height+"px"});c.find("#before").stop(true,true);d.find("#before").stop(true,true);d.stop(true,true);d.find(".freshslice").each(function(b){var c=a(this);c.remove()});d.find(".freshbox").each(function(b){var c=a(this);c.remove()});if(!(a.browser.msie&&a.browser.version>=7&&a.browser.version<9)){if(d.data("transition")=="gradientfade"||d.data("transition")=="1"){g=true;k(d,d.width()/5);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});d.find(".freshslice").each(function(b){var c=a(this);c.css({height:d.height()+"px",top:"0px"});if(b==d.find(".freshslice").size()-1)c.delay(b).animate({opacity:"1.0"},{duration:b*30+40,queue:true,complete:l});else c.delay(b).animate({opacity:"1.0"},{duration:b*20+40,queue:true})})}if(d.data("transition")=="gradientfade2"||d.data("transition")=="2"){g=true;j(d,d.height()/5);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});d.find(".freshslice").each(function(b){var c=a(this);c.css({width:d.width()+"px",left:"0px"});if(b==d.find(".freshslice").size()-1)c.delay(b).animate({opacity:"1.0"},{duration:b*40+100,queue:true,ease:"linear",complete:l});else c.delay(b).animate({opacity:"1.0"},{duration:b*30+100,queue:true,ease:"linear"})})}if(d.data("transition")=="box-randomfade"||d.data("transition")=="3"){g=true;h(d,f.width/80,f.height/80);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});var q=[];d.find(".freshbox").each(function(a){q[a]=a});for(var r=0;r<q.length;r++){var s=Math.round(Math.random()*q.length);var t=q[s];q[s]=q[r];q[r]=t}d.find(".freshbox").each(function(b){var c=a(this);if(b==d.find(".freshbox").size()-1)c.delay(b*15+150).animate({opacity:"1.0"},{duration:Math.random()*1e3+300,ease:"linear",queue:true,complete:l});else c.delay(q[b]*12+120).animate({opacity:"1.0"},{duration:Math.random()*1e3+300,ease:"linear",queue:true})})}if(d.data("transition")=="box-randomzoom"||d.data("transition")=="4"){g=true;h(d,f.width/80,f.height/80);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});var q=[];d.find(".freshbox").each(function(a){q[a]=a});for(var r=0;r<q.length;r++){var s=Math.round(Math.random()*q.length);var t=q[s];q[s]=q[r];q[r]=t}d.find(".freshbox").each(function(b){var c=a(this);var e=c.width();var f=c.height();var e=c.width();var f=c.height();c.css({width:"0px",height:"0px",opacity:"1.0","-webkit-border-radius":"5px","-moz-border-radius":"5px","border-radius":"5px"});if(b==d.find(".freshbox").size()-1)c.delay(b*30+170).animate({width:e+10+"px",height:f+10+"px"},{duration:250,ease:"linear",queue:true,complete:l});else c.delay(q[b]*28+120).animate({width:10+e+"px",height:f+10+"px"},{duration:250,ease:"linear",queue:true})})}if(d.data("transition")=="box-diagonalzoom"||d.data("transition")=="5"){g=true;h(d,f.width/80,f.height/80);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0.0"});var v=false;var w=1;var x=0;var y=1;var z=Math.round(f.width/80);var A=Math.round(f.height/80);var B=d.find(".freshbox").size();for(var C=0;C<B;C++){var D=d.find(".freshbox:eq("+(w-1)+")");if(w-(z-1)>x*z){w=w-(z-1)}else{w=y;w=w+z;y=w}if(w-z*(x+1)==0)x++;if(w>B){v=true;w=y-z+1;y=w}var E=D.width();var F=D.height();D.css({width:"0px",height:"0px",opacity:"1.0","-webkit-border-radius":"5px","-moz-border-radius":"5px","border-radius":"5px"});if(C==d.find(".freshbox").size()-1)D.delay(C*30).animate({width:E+10+"px",height:F+10+"px"},{duration:660,ease:"linear",queue:true,complete:l});else D.delay(C*30).animate({width:10+E+"px",height:F+10+"px"},{duration:660,ease:"linear",queue:true})}}if(d.data("transition")=="box-diagonalfade"||d.data("transition")=="6"){g=true;h(d,f.width/80,f.height/80);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0.0"});var v=false;var w=1;var x=0;var y=1;var z=Math.round(f.width/80);var A=Math.round(f.height/80);var B=d.find(".freshbox").size();for(var C=0;C<B;C++){var D=d.find(".freshbox:eq("+(w-1)+")");if(w-(z-1)>x*z){w=w-(z-1)}else{w=y;w=w+z;y=w}if(w-z*(x+1)==0)x++;if(w>B){v=true;w=y-z+1;y=w}var E=D.width();var F=D.height();D.css({opacity:"0.0"});if(C==d.find(".freshbox").size()-1)D.delay(C*30).animate({opacity:"1.0"},{duration:660,ease:"linear",queue:true,complete:l});else D.delay(C*30).animate({opacity:"1.0"},{duration:660,ease:"linear",queue:true})}}if(d.data("transition")=="box-leftfade"||d.data("transition")=="7"){g=true;h(d,f.width/80,f.height/80);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0.0"});var v=false;var w=1;var x=2;var y=1;var z=Math.round(f.width/80);var A=Math.round(f.height/80);var B=d.find(".freshbox").size();for(var C=0;C<B;C++){var D=d.find(".freshbox:eq("+(w-1)+")");w=w+z;if(w>B){w=x;x++}D.css({opacity:"0.0"});if(C==d.find(".freshbox").size()-1)D.delay(C*30).animate({opacity:"1.0"},{duration:660,ease:"linear",queue:true,complete:l});else D.delay(C*30).animate({opacity:"1.0"},{duration:660,ease:"linear",queue:true})}}if(d.data("transition")=="box-leftzoom"||d.data("transition")=="8"){g=true;h(d,f.width/80,f.height/80);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0.0"});var v=false;var w=1;var x=2;var y=1;var z=Math.round(f.width/80);var A=Math.round(f.height/80);var B=d.find(".freshbox").size();for(var C=0;C<B;C++){var D=d.find(".freshbox:eq("+(w-1)+")");w=w+z;if(w>B){w=x;x++}var E=D.width();var F=D.height();D.css({width:"0px",height:"0px",opacity:"1.0","-webkit-border-radius":"5px","-moz-border-radius":"5px","border-radius":"5px"});if(C==d.find(".freshbox").size()-1)D.delay(C*30).animate({width:E+10+"px",height:F+10+"px"},{duration:660,ease:"linear",queue:true,complete:l});else D.delay(C*30).animate({width:E+10+"px",height:F+10+"px"},{duration:660,ease:"linear",queue:true})}}if(d.data("transition")=="ghost"||d.data("transition")=="9"){g=true;i(d,3);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});d.find(".freshslice").each(function(b){var c=a(this);var e=140;if(b==1)e=80;if(b==2)e=20;c.css({opacity:"0",top:"0px",left:e+"px"});if(b==d.find(".freshslice").size()-1)c.delay(b*290).animate({opacity:"1.0",left:"0px"},{duration:800,queue:true,complete:l});else c.delay(b*290).animate({opacity:"1.0",left:"0px"},{duration:800,queue:true})})}if(d.data("transition")=="camfocus"||d.data("transition")=="10"){g=true;i(d,15);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});d.find(".freshslice").each(function(b){var c=a(this);c.css({opacity:"0.0"});c.animate({opacity:Math.random()*.7,top:Math.random()*20-10+"px",left:Math.random()*20-10+"px"},{duration:600});if(b==d.find(".freshslice").size()-1)c.animate({opacity:"1.0",left:"0px",top:"0px"},{duration:600,queue:true,complete:l});else c.animate({opacity:"1.0",left:"0px",top:"0px"},{duration:600,queue:true})})}if(d.data("transition")=="rollo2"||d.data("transition")=="11"){g=true;j(d,5);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});d.find(".freshslice").each(function(b){var c=a(this);c.css({width:d.width()+"px",left:"0px",top:parseInt(c.css("top"),0)+100+"px"});if(b==d.find(".freshslice").size()-1)c.delay(b*125).animate({opacity:"1.0",top:parseInt(c.css("top"),0)-100+"px"},{duration:310,queue:true,complete:l});else c.delay(b*125).animate({opacity:"1.0",top:parseInt(c.css("top"),0)-100+"px"},{duration:310,queue:true})})}if(d.data("transition")=="curtain2"||d.data("transition")=="12"){g=true;k(d,5);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});d.find(".freshslice").each(function(b){var c=a(this);c.css({height:d.height()+"px",top:"0px",left:parseInt(c.css("left"),0)+100+"px"});if(b==d.find(".freshslice").size()-1)c.delay(b*165).animate({opacity:"1.0",left:parseInt(c.css("left"),0)-100+"px"},{duration:260,queue:true,complete:l});else c.delay(b*165).animate({opacity:"1.0",left:parseInt(c.css("left"),0)-100+"px"},{duration:260,queue:true})})}if(d.data("transition")=="rain"||d.data("transition")=="13"){g=true;k(d,f.width/30);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});d.find(".freshslice").each(function(b){var c=a(this);var e=f.width/32;c.css({height:d.height()+"px",top:0-f.height+"px"});if(b==d.find(".freshslice").size()-1)c.delay(b*(80-b)+50).animate({opacity:"1.0",top:"0px"},{duration:680,queue:true,complete:l});else c.delay(Math.random()*b*(80-b)+50).animate({opacity:"1.0",top:"0px"},{duration:680,queue:true})})}if(d.data("transition")=="fountain"||d.data("transition")=="14"){g=true;k(d,f.width/30);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});var G=f.width/30;var H=100+70*G/2;d.find(".freshslice").each(function(b){var c=a(this);c.css({height:d.height()+"px",top:0-f.height+"px"});if(b<G/2)H=H-70;else H=H+70;if(b==d.find(".freshslice").size()-1)c.delay(H).animate({opacity:"1.0",top:"0px"},{duration:690,queue:true,complete:l});else c.delay(H).animate({opacity:"1.0",top:"0px"},{duration:690,queue:true})})}if(d.data("transition")=="wave"||d.data("transition")=="15"){g=true;k(d,f.width/30);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});d.find(".freshslice").each(function(b){var c=a(this);var e=f.width/32;c.css({height:d.height()+"px",top:0-f.height+"px"});if(b==d.find(".freshslice").size()-1)c.delay(b*(90-b)).animate({opacity:"1.0",top:"0px"},{duration:670,queue:true,complete:l});else c.delay(b*(90-b)).animate({opacity:"1.0",top:"0px"},{duration:670,queue:true})})}if(d.data("transition")=="zipper"||d.data("transition")=="16"){g=true;k(d,f.width/30);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});var I=0;d.find(".freshslice").each(function(b){var c=a(this);var e=f.width/32;if(I==0){c.css({height:d.height()+"px",top:0-f.height+"px"});I=1}else{c.css({height:d.height()+"px",top:f.height+"px"});I=0}if(b==d.find(".freshslice").size()-1)c.delay(b*70).animate({opacity:"1.0",top:"0px"},{duration:560,easing:"easeOutSine",queue:true,complete:l});else c.delay(b*70).animate({opacity:"1.0",top:"0px"},{duration:560,easing:"easeOutSine",queue:true})})}if(d.data("transition")=="curtain"||d.data("transition")=="17"){g=true;k(d,f.width/30);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});d.find(".freshslice").each(function(b){var c=a(this);var e=f.width/30;c.css({height:d.height()+"px",top:"0px",left:parseInt(c.css("left"),0)+e+"px"});if(b==d.find(".freshslice").size()-1)c.delay(b*(80-b)).animate({opacity:"1.0",left:parseInt(c.css("left"),0)-e+"px"},{duration:610,queue:true,complete:l});else c.delay(b*(80-b)).animate({opacity:"1.0",left:parseInt(c.css("left"),0)-e+"px"},{duration:610,queue:true})})}if(d.data("transition")=="rollo"||d.data("transition")=="18"){g=true;j(d,f.height/30);d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});d.find(".freshslice").each(function(b){var c=a(this);var e=f.height/30;c.css({width:d.width()+"px",left:"0px",top:parseInt(c.css("top"),0)+e+"px"});if(b==d.find(".freshslice").size()-1)c.delay(b*(80-b)).animate({opacity:"1.0",top:parseInt(c.css("top"),0)-e+"px"},{duration:610,queue:true,complete:l});else c.delay(b*(80-b)).animate({opacity:"1.0",top:parseInt(c.css("top"),0)-e+"px"},{duration:610,queue:true})})}if(d.data("transition")=="zoomme"||d.data("transition")=="19"){g=true;c.css({"z-index":"1000"});d.css({"z-index":"995"});c.stop(true,true);d.stop(true,true);c.find("#before").css({width:c.data("orgWidth")+"px",height:c.data("orgHeight")+"px"});d.find("#before").css({width:d.data("orgWidth")+"px",height:d.data("orgHeight")+"px"});c.animate({width:2*f.width+"px",height:2*f.height+"px",left:0-f.width/2+"px",top:0-f.height/2+"px",opacity:"0.0"},{duration:800,queue:false});c.find("#before").animate({width:2*f.width+"px",height:2*f.height+"px"},{duration:800,queue:false});d.css({position:"absolute",top:"0px",left:"0px",opacity:"1.0"});d.find("#before").css({opacity:"0"});d.find("#before").animate({opacity:"1.0"},{duration:600})}}if(d.data("transition")=="slide-updown"||d.data("transition")=="20"){g=true;var J=true;e.find("li").each(function(){D=a(this);if(D.index()!=c.index()&&D.index()!=d.index())D.css({opacity:0})});if(c.index()>d.index())J=false;if(c.index()==0&&d.index()!=1)J=false;if(c.index()==c.parent().find("li").size()-1&&d.index()==0)J=true;if(J){c.animate({top:0-f.height},{duration:650,queue:false});d.css({opacity:"1.0",position:"absolute",top:f.height,left:"0px",width:f.width,height:f.height});d.animate({left:"0px",top:"0px",opacity:"1.0"},{duration:650,queue:false})}else{c.animate({top:f.height},{duration:650,queue:false});d.css({opacity:"1.0",position:"absolute",top:0-f.height+"px",left:"0px",width:f.width,height:f.height});d.animate({left:"0px",top:"0px",opacity:"1.0"},{duration:650,queue:false})}}if(g==false){var J=true;e.find("li").each(function(){D=a(this);if(D.index()!=c.index()&&D.index()!=d.index())D.css({opacity:0})});if(c.index()>d.index())J=false;if(c.index()==0&&d.index()!=1)J=false;if(c.index()==c.parent().find("li").size()-1&&d.index()==0)J=true;if(J){c.animate({left:0-f.width},{duration:650,queue:false});d.css({opacity:"1.0",position:"absolute",top:"0px",left:f.width,width:f.width,height:f.height});d.animate({left:"0px",top:"0px",opacity:"1.0"},{duration:650,queue:false})}else{c.animate({left:f.width},{duration:650,queue:false});d.css({opacity:"1.0",position:"absolute",top:"0px",left:0-f.width,width:f.width,height:f.height});d.animate({left:"0px",top:"0px",opacity:"1.0"},{duration:650,queue:false})}}c.parent().parent().parent().find(".mini_thumbnail_buttons").each(function(b){var c=a(this);c.css({"background-position":"top left"});c.data("on",false);c.find("#cd").css({display:"none"});if(b==d.parent().find("li").size()-d.index()-1){c.data("on",true);c.find("#cd").data("t",0);c.find("#cd").css({display:"block"});c.css({"background-position":"bottom left"})}});e.data("currentSlide",d);u(d,1500,e)}function l(){var b=a(this).parent();b.find("#before").css({opacity:"1"});b.find(".freshslice").each(function(b){var c=a(this);c.remove()});b.find(".freshsbox").each(function(b){var c=a(this);c.remove()})}function k(b,c){for(var d=0;d<c;d++){var e=Math.round(b.width()/c);var f=b.find("#before").attr("src");if(d==c-1){b.append(a('<div class="freshslice"></div>').css({left:e*d+"px",width:b.width()-e*d+"px",position:"absolute",height:"0px",opacity:"0",background:"url("+f+") no-repeat -"+(e+d*e-e)+"px 0%"}))}else{b.append(a('<div class="freshslice"></div>').css({left:e*d+"px",width:e+"px",position:"absolute",height:"0px",opacity:"0",background:"url("+f+") no-repeat -"+(e+d*e-e)+"px 0%"}))}}}function j(b,c){for(var d=0;d<c;d++){var e=Math.round(b.height()/c);var f=b.find("#before").attr("src");if(d==c-1){b.append(a('<div class="freshslice"></div>').css({top:e*d+"px",height:b.height()-e*d+"px",position:"absolute",width:b.width()+"px",opacity:"0",background:"url("+f+") no-repeat -0px "+(0-d*e)+"px"}))}else{b.append(a('<div class="freshslice"></div>').css({top:e*d+"px",height:e+"px",position:"absolute",width:b.width()+"px",opacity:"0",background:"url("+f+") no-repeat -0px "+(0-d*e)+"px"}))}}}function i(b,c){for(var d=0;d<c;d++){var e=b.find("#before").attr("src");b.append(a('<div class="freshslice"></div>').css({left:"0px",position:"absolute",height:b.height()+"px",width:b.width()+"px",opacity:"0",background:"url("+e+") no-repeat"}))}}function h(b,c,d){var e=Math.round(b.width()/c);var f=Math.round(b.height()/d);var g=b.find("#before").attr("src");for(var h=0;h<d;h++){for(var i=0;i<c;i++){if(i==c-1){b.append(a('<div class="freshbox"></div>').css({position:"absolute",opacity:0,left:e*i+"px",top:f*h+"px",width:b.width()-e*i+"px",height:f+"px",background:"url("+g+") no-repeat -"+(e+i*e-e)+"px -"+(f+h*f-f)+"px"}))}else{b.append(a('<div class="freshbox"></div>').css({position:"absolute",opacity:0,left:e*i+"px",top:f*h+"px",width:e+"px",height:f+"px",background:"url("+g+") no-repeat -"+(e+i*e-e)+"px -"+(f+h*f-f)+"px"}))}}}}function g(b){b.find("li >img").each(function(){var b=a(this);b.attr({id:"before"});b.parent().find("#before").wrapAll("<div id='ba_images'></div>");b.parent().find("#before").wrap("<div id='ext_ext_before'><div id='ext_before'></div></div>");var c=b.parent().parent().parent().find("#before").parent().parent();var d=c.find("#before").parent();var e=d.find("#before");c.css({position:"absolute","z-index":"1",top:"0px",left:"0px"});d.css({position:"absolute","z-index":"1",top:"0px",left:"0px"})})}function f(b,c){var d=b.data("ba_images");var e=b.data("ba_imagesLoaded");var g=new Image;a(g).css("display","none");a(g).attr("src",d[e]);if(g.complete||g.readyState===4){e++;if(e==d.length){b.data("loaded","true");s(b,c)}else{b.data("ba_imagesLoaded",e);f(b,c)}}else{a(g).load(function(){e++;if(e==d.length){b.data("loaded","true");s(b,c)}else{b.data("ba_imagesLoaded",e);f(b,c)}})}}function e(b){var c=new Array;var d=0;b.find("ul li img").each(function(b){var e=a(this);c[d]=e.attr("src");d++});b.data("ba_images",c)}function d(b,d){if(d.theme=="none"){}if(d.theme=="custom"){b.addClass("custom_frame_basic");b.addClass("custom_frame_bg");c(d,b);b.append('<div id="screw_lt" class="custom_topleftscrew" style="top:'+d.t+"px;left:"+d.l+'px"></div>');b.append('<div id="screw_rt" class="custom_toprightscrew" style="top:'+d.t+"px;left:"+d.r+'px"></div>');b.append('<div id="screw_lb" class="custom_bottomleftscrew" style="top:'+d.b+"px;left:"+d.l+'px"></div>');b.append('<div id="screw_rb" class="custom_bottomrightscrew" style="top:'+d.b+"px;left:"+d.r+'px"></div>');b.find("#toolbox").addClass("custom_toolbox");b.find("#cd").addClass("custom_countdown");b.find("#mini_divider").addClass("custom_mini_divider");b.find("#previous").addClass("custom_previous");b.find("#next").addClass("custom_next");b.find("#mask").addClass("custom_mask");b.find(".mini_thumbnail_buttons").each(function(b){var c=a(this);c.addClass("custom_mini_thumbnail_buttons")});b.append('<div id="frame_innershadow" class="frame_custom_innershadow" style="top:'+2*d.t+"px;z-index:1002;position:absolute;width:"+d.width+"px;height:"+d.height+'px"></div>');b.append('<div id="reflection" class="frame_custom_reflection" style="top:'+2*d.t+"px;z-index:1005;position:absolute;width:"+d.width+"px;height:"+d.height+'px"></div>');if(b.find("#creative_layer_holder").size()==0)b.append('<div id="creative_layer_holder" class="creative_layer"  style="z-index:1007;position:absolute;width:'+d.width+"px;height:"+d.height+'px"></div>')}else{if(d.theme=="sport"){b.addClass("sport_frame_basic");b.addClass("sport_frame_bg");c(d,b);d.r=-8+d.r;d.b=-8+d.b;d.m=2*d.l+d.width/2;d.w=290;d.off=d.m-145;if(d.off<2*d.l){d.off=2*d.l;d.w=d.r-d.pr/2-d.off}d.e=d.r+d.pr/2;b.append('<div id="top_decor" class="sport_decor" style="top:0px;left:'+d.off+"px;width:"+d.w+'px"></div>');b.append('<div id="right_decor" class="sport_right_decor_button" style="top:'+2*d.t+"px;left:"+(5+d.e)+'px"></div>');b.append('<div id="screw_lt" class="sport_topscrew" style="top:'+d.t+"px;left:"+d.l+'px"></div>');b.append('<div id="screw_rt" class="sport_topscrew" style="top:'+d.t+"px;left:"+d.r+'px"></div>');b.append('<div id="screw_lb" class="sport_bottomscrew" style="top:'+d.b+"px;left:"+d.l+'px"></div>');b.append('<div id="screw_rb" class="sport_bottomscrew" style="top:'+d.b+"px;left:"+d.r+'px"></div>');var e=b.find("#toolbox");e.addClass("sport_toolbox");b.find("#cd").addClass("sport_countdown");b.find("#mini_divider").addClass("sport_mini_divider");b.find("#previous").addClass("sport_previous");b.find("#next").addClass("sport_next");b.find("#mask").addClass("sport_mask");b.find(".mini_thumbnail_buttons").each(function(b){var c=a(this);c.addClass("sport_mini_thumbnail_buttons")});e.css({top:d.height-10+"px"});b.append('<div id="frame_innershadow" class="frame_sport_innershadow" style="top:'+2*d.t+"px;z-index:1002;position:absolute;width:"+d.width+"px;height:"+d.height+'px"></div>');b.append('<div id="reflection" class="frame_sport_reflection" style="top:'+2*d.t+"px;z-index:1005;position:absolute;width:"+d.width+"px;height:"+d.height+'px"></div>');if(b.find("#creative_layer_holder").size()==0)b.append('<div id="creative_layer_holder" class="creative_layer"  style="z-index:1007;position:absolute;width:'+d.width+"px;height:"+d.height+'px"></div>')}else{if(d.theme=="wedding"){b.addClass("wedding_frame_basic");b.addClass("wedding_frame_bg");c(d,b);d.r=-8+d.r;d.b=d.pt+d.height+d.pb-57;d.m=2*d.l+d.width/2;d.w=d.width;d.e=d.r+d.pr/2;d.off=d.tl;b.append('<div id="top_decor" class="wedding_decor_top" style="top:'+(d.pt/2-24)+"px;left:"+d.off+"px;width:"+d.w+'px"></div>');b.append('<div id="bottom_decor" class="wedding_decor_top" style="top:'+d.b+"px;left:"+d.off+"px;width:"+d.w+'px"></div>');b.append('<div id="frame_innershadow" class="frame_wedding_innershadow" style="top:'+2*d.t+"px;z-index:1002;position:absolute;width:"+d.width+"px;height:"+d.height+'px"></div>');b.append('<div id="reflection" class="frame_wedding_reflection" style="top:'+2*d.t+"px;z-index:1005;position:absolute;width:"+d.width+"px;height:"+d.height+'px"></div>');if(b.find("#creative_layer_holder").size()==0)b.append('<div id="creative_layer_holder" class="creative_layer" style="z-index:1007;position:absolute;width:'+d.width+"px;height:"+d.height+'px"></div>');b.append('<div id="fineborder" class="wedding_fine_border" style="top:'+(2*d.t-5)+"px;left:"+(2*d.l-5)+"px;z-index:1005;width:"+(d.width+8)+"px;height:"+(d.height+8)+'px;"></div>');var e=b.find("#toolbox");e.addClass("wedding_toolbox");b.find("#cd").addClass("wedding_countdown");b.find("#mini_divider").addClass("wedding_mini_divider");b.find("#previous").addClass("wedding_previous");b.find("#next").addClass("wedding_next");b.find(".mini_thumbnail_buttons").each(function(b){var c=a(this);c.addClass("wedding_mini_thumbnail_buttons")});e.css({top:d.height+10+"px"})}else{if(d.theme=="fashion"){b.addClass("fashion_frame_basic");b.addClass("fashion_frame_bg");c(d,b);d.r=d.r-8;d.b=d.pt+d.height+d.pb-57;d.m=2*d.l+d.width/2;d.w=d.width+2*d.l+d.pr+26;d.e=d.r+d.pr/2;var f=35;var g=2*d.t+d.height;b.append('<div id="toolbox2" class="fashion_toolbox_background" style="top:'+g+"px;height:"+f+"px;left:"+(0-13)+"px;width:"+d.w+'px"></div>');b.append('<div id="toolbox_turnback_left" class="fashion_toolbox_background_turnback_left" style="top:'+(g-6)+"px;left:"+(0-13)+'px"></div>');b.append('<div id="toolbox_turnback_right" class="fashion_toolbox_background_turnback_right" style="top:'+(g-6)+"px;left:"+(d.w-26)+'px"></div>');b.find("#toolbox").addClass("fashion_toolbox");b.find("#cd").addClass("fashion_countdown");b.find("#mini_divider").addClass("fashion_mini_divider");b.find("#previous").addClass("fashion_previous");b.find("#next").addClass("fashion_next");b.find(".mini_thumbnail_buttons").each(function(b){var c=a(this);c.addClass("fashion_mini_thumbnail_buttons")});b.find("#toolbox").css({top:g-15+"px"});b.append('<div id="frame_innershadow" class="frame_fashion_innershadow" style="top:'+2*d.t+"px;z-index:1002;position:absolute;width:"+d.width+"px;height:"+d.height+'px"></div>');b.append('<div id="reflection" class="frame_fashion_reflection" style="top:'+2*d.t+"px;z-index:1005;position:absolute;width:"+d.width+"px;height:"+d.height+'px"></div>');if(b.find("#creative_layer_holder").size()==0)b.append('<div id="creative_layer_holder" class="creative_layer" style="z-index:1007;position:absolute;width:'+d.width+"px;height:"+d.height+'px"></div>')}}}}var h=b.find("#creative_layer_holder");h.css({position:"absolute","margin-top":d.pt+"px","margin-left":d.pl+"px"})}function c(a,b){a.pt=parseInt(b.css("padding-top"),0);a.pl=parseInt(b.css("padding-left"),0);a.pr=parseInt(b.css("padding-right"),0);a.pb=parseInt(b.css("padding-bottom"),0);a.l=a.pl/2;a.t=a.pt/2;a.r=a.pl+a.width+a.pr/2;a.b=a.pt+a.height+a.pb/2}a.fn.extend({frames_slider:function(c){var h={width:876,height:300,theme:"none",timer:2e3,hidetoolbar:0};var c=a.extend({},a.fn.frames_slider.defaults,c);return this.each(function(){var h=new Array;var i=0;var j=a(this);j.css({display:"none"});var k=c;k.ie=a.browser.msie&&a.browser.version>=7&&a.browser.version<9;if(k.timer==b)k.timer=2e3;if(k.hidetoolbar==b)k.hidetoolbar=0;j.data("off",parseInt(j.css("padding-top"),0));j.data("ba_imagesLoaded",0);var l=j.find("li").first();j.data("currentSlide",l);p(j,k);g(j);var n=a("<div id='mainloader' class='loader'></div>");j.append(n);j.find("ul").css({display:"none"});j.find("ul li").css({display:"none"});q(j,k);d(j,k);e(j);f(j,k);j.hover(function(){var b=a(this);b.data("mouseOver","0");b.data("hideT",0);b.find("#toolbox").stop(true,true);if(a.browser.msie&&a.browser.version>=7&&a.browser.version<9){b.find("#toolbox").css({display:"block"})}else{b.find("#toolbox").animate({opacity:"1.0"},{duration:100})}if(k.ie)var c=a('<div id="fh_pause" class="pause_sign" style="left:'+(k.width+k.pl-45)+"px;top:"+(k.pt+10)+'px"></div>');else var c=a('<div id="fh_pause" class="pause_sign" style="opacity:0.0;left:'+(k.width+k.pl-55)+"px;top:"+(k.pt+10)+'px"></div>');b.append(c);if(!k.ie)c.animate({opacity:"1.0",left:k.width+k.pl-45+"px"},{duration:300})},function(){var b=a(this);b.data("mouseOver","1");b.data("hideT",0);b.find("#fh_pause").remove()});j.data("hideT",0);if(k.hidetoolbar!=0){setInterval(function(){if(j.data("loaded")=="true"){if(j.data("mouseOver")!="0")j.data("hideT",j.data("hideT")+100);if(j.data("hideT")>=k.hidetoolbar){if(a.browser.msie&&a.browser.version>=7&&a.browser.version<9){j.find("#toolbox").css({display:"none"})}else{j.find("#toolbox").animate({opacity:"0.0"},{duration:400})}}}},100)}setInterval(function(){if(j.data("loaded")=="true"){j.find("#cd").each(function(){var c=a(this);if(c.data("idNum")==j.data("currentSlide").index()){if(k.timer!=0){if(c.data("t")==b)c.data("t",0);var d=c.data("t");c.css({"background-position":"0px "+(d-10)+"px"});if(d<=-1e3){var e=j.data("currentSlide").index();e++;if(e==j.data("currentSlide").parent().find("li").size())e=0;if(e==-1)e=j.data("currentSlide").parent().find("li").size()-1;d=0;var f=j.find("li").each(function(b){c=a(this);if(b==e){m(j.data("currentSlide"),c,j,k)}})}if(j.data("mouseOver")!="0")c.data("t",d-10)}else{};}})}},k.timer/100)})}});})(jQuery)

jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});

(function($){function Countdown(){this.regional=[];this.regional['']={labels:['Years','Months','Weeks','Days','Hours','Minutes','Seconds'],labels1:['Year','Month','Week','Day','Hour','Minute','Second'],compactLabels:['y','m','w','d'],whichLabels:null,timeSeparator:':',isRTL:false};this._defaults={until:null,since:null,timezone:null,serverSync:null,format:'dHMS',layout:'',compact:false,significant:0,description:'',expiryUrl:'',expiryText:'',alwaysExpire:false,onExpiry:null,onTick:null,tickInterval:1};$.extend(this._defaults,this.regional['']);this._serverSyncs=[];function timerCallBack(a){var b=(a||new Date().getTime());if(b-d>=1000){$.countdown._updateTargets();d=b}c(timerCallBack)}var c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null;var d=0;if(!c){setInterval(function(){$.countdown._updateTargets()},980)}else{d=window.mozAnimationStartTime||new Date().getTime();c(timerCallBack)}}var w='countdown';var Y=0;var O=1;var W=2;var D=3;var H=4;var M=5;var S=6;$.extend(Countdown.prototype,{markerClassName:'hasCountdown',_timerTargets:[],setDefaults:function(a){this._resetExtraLabels(this._defaults,a);extendRemove(this._defaults,a||{})},UTCDate:function(a,b,c,e,f,g,h,i){if(typeof b=='object'&&b.constructor==Date){i=b.getMilliseconds();h=b.getSeconds();g=b.getMinutes();f=b.getHours();e=b.getDate();c=b.getMonth();b=b.getFullYear()}var d=new Date();d.setUTCFullYear(b);d.setUTCDate(1);d.setUTCMonth(c||0);d.setUTCDate(e||1);d.setUTCHours(f||0);d.setUTCMinutes((g||0)-(Math.abs(a)<30?a*60:a));d.setUTCSeconds(h||0);d.setUTCMilliseconds(i||0);return d},periodsToSeconds:function(a){return a[0]*31557600+a[1]*2629800+a[2]*604800+a[3]*86400+a[4]*3600+a[5]*60+a[6]},_settingsCountdown:function(a,b){if(!b){return $.countdown._defaults}var c=$.data(a,w);return(b=='all'?c.options:c.options[b])},_attachCountdown:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName)){return}c.addClass(this.markerClassName);var d={options:$.extend({},b),_periods:[0,0,0,0,0,0,0]};$.data(a,w,d);this._changeCountdown(a)},_addTarget:function(a){if(!this._hasTarget(a)){this._timerTargets.push(a)}},_hasTarget:function(a){return($.inArray(a,this._timerTargets)>-1)},_removeTarget:function(b){this._timerTargets=$.map(this._timerTargets,function(a){return(a==b?null:a)})},_updateTargets:function(){for(var i=this._timerTargets.length-1;i>=0;i--){this._updateCountdown(this._timerTargets[i])}},_updateCountdown:function(a,b){var c=$(a);b=b||$.data(a,w);if(!b){return}c.html(this._generateHTML(b));c[(this._get(b,'isRTL')?'add':'remove')+'Class']('countdown_rtl');var d=this._get(b,'onTick');if(d){var e=b._hold!='lap'?b._periods:this._calculatePeriods(b,b._show,this._get(b,'significant'),new Date());var f=this._get(b,'tickInterval');if(f==1||this.periodsToSeconds(e)%f==0){d.apply(a,[e])}}var g=b._hold!='pause'&&(b._since?b._now.getTime()<b._since.getTime():b._now.getTime()>=b._until.getTime());if(g&&!b._expiring){b._expiring=true;if(this._hasTarget(a)||this._get(b,'alwaysExpire')){this._removeTarget(a);var h=this._get(b,'onExpiry');if(h){h.apply(a,[])}var i=this._get(b,'expiryText');if(i){var j=this._get(b,'layout');b.options.layout=i;this._updateCountdown(a,b);b.options.layout=j}var k=this._get(b,'expiryUrl');if(k){window.location=k}}b._expiring=false}else if(b._hold=='pause'){this._removeTarget(a)}$.data(a,w,b)},_changeCountdown:function(a,b,c){b=b||{};if(typeof b=='string'){var d=b;b={};b[d]=c}var e=$.data(a,w);if(e){this._resetExtraLabels(e.options,b);extendRemove(e.options,b);this._adjustSettings(a,e);$.data(a,w,e);var f=new Date();if((e._since&&e._since<f)||(e._until&&e._until>f)){this._addTarget(a)}this._updateCountdown(a,e)}},_resetExtraLabels:function(a,b){var c=false;for(var n in b){if(n!='whichLabels'&&n.match(/[Ll]abels/)){c=true;break}}if(c){for(var n in a){if(n.match(/[Ll]abels[0-9]/)){a[n]=null}}}},_adjustSettings:function(a,b){var c;var d=this._get(b,'serverSync');var e=0;var f=null;for(var i=0;i<this._serverSyncs.length;i++){if(this._serverSyncs[i][0]==d){f=this._serverSyncs[i][1];break}}if(f!=null){e=(d?f:0);c=new Date()}else{var g=(d?d.apply(a,[]):null);c=new Date();e=(g?c.getTime()-g.getTime():0);this._serverSyncs.push([d,e])}var h=this._get(b,'timezone');h=(h==null?-c.getTimezoneOffset():h);b._since=this._get(b,'since');if(b._since!=null){b._since=this.UTCDate(h,this._determineTime(b._since,null));if(b._since&&e){b._since.setMilliseconds(b._since.getMilliseconds()+e)}}b._until=this.UTCDate(h,this._determineTime(this._get(b,'until'),c));if(e){b._until.setMilliseconds(b._until.getMilliseconds()+e)}b._show=this._determineShow(b)},_destroyCountdown:function(a){var b=$(a);if(!b.hasClass(this.markerClassName)){return}this._removeTarget(a);b.removeClass(this.markerClassName).empty();$.removeData(a,w)},_pauseCountdown:function(a){this._hold(a,'pause')},_lapCountdown:function(a){this._hold(a,'lap')},_resumeCountdown:function(a){this._hold(a,null)},_hold:function(a,b){var c=$.data(a,w);if(c){if(c._hold=='pause'&&!b){c._periods=c._savePeriods;var d=(c._since?'-':'+');c[c._since?'_since':'_until']=this._determineTime(d+c._periods[0]+'y'+d+c._periods[1]+'o'+d+c._periods[2]+'w'+d+c._periods[3]+'d'+d+c._periods[4]+'h'+d+c._periods[5]+'m'+d+c._periods[6]+'s');this._addTarget(a)}c._hold=b;c._savePeriods=(b=='pause'?c._periods:null);$.data(a,w,c);this._updateCountdown(a,c)}},_getTimesCountdown:function(a){var b=$.data(a,w);return(!b?null:(!b._hold?b._periods:this._calculatePeriods(b,b._show,this._get(b,'significant'),new Date())))},_get:function(a,b){return(a.options[b]!=null?a.options[b]:$.countdown._defaults[b])},_determineTime:function(k,l){var m=function(a){var b=new Date();b.setTime(b.getTime()+a*1000);return b};var n=function(a){a=a.toLowerCase();var b=new Date();var c=b.getFullYear();var d=b.getMonth();var e=b.getDate();var f=b.getHours();var g=b.getMinutes();var h=b.getSeconds();var i=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g;var j=i.exec(a);while(j){switch(j[2]||'s'){case's':h+=parseInt(j[1],10);break;case'm':g+=parseInt(j[1],10);break;case'h':f+=parseInt(j[1],10);break;case'd':e+=parseInt(j[1],10);break;case'w':e+=parseInt(j[1],10)*7;break;case'o':d+=parseInt(j[1],10);e=Math.min(e,$.countdown._getDaysInMonth(c,d));break;case'y':c+=parseInt(j[1],10);e=Math.min(e,$.countdown._getDaysInMonth(c,d));break}j=i.exec(a)}return new Date(c,d,e,f,g,h,0)};var o=(k==null?l:(typeof k=='string'?n(k):(typeof k=='number'?m(k):k)));if(o)o.setMilliseconds(0);return o},_getDaysInMonth:function(a,b){return 32-new Date(a,b,32).getDate()},_normalLabels:function(a){return a},_generateHTML:function(c){var d=this._get(c,'significant');c._periods=(c._hold?c._periods:this._calculatePeriods(c,c._show,d,new Date()));var e=false;var f=0;var g=d;var h=$.extend({},c._show);for(var i=Y;i<=S;i++){e|=(c._show[i]=='?'&&c._periods[i]>0);h[i]=(c._show[i]=='?'&&!e?null:c._show[i]);f+=(h[i]?1:0);g-=(c._periods[i]>0?1:0)}var j=[false,false,false,false,false,false,false];for(var i=S;i>=Y;i--){if(c._show[i]){if(c._periods[i]){j[i]=true}else{j[i]=g>0;g--}}}var k=this._get(c,'compact');var l=this._get(c,'layout');var m=(k?this._get(c,'compactLabels'):this._get(c,'labels'));var n=this._get(c,'whichLabels')||this._normalLabels;var o=this._get(c,'timeSeparator');var p=this._get(c,'description')||'';var q=function(a){var b=$.countdown._get(c,'compactLabels'+n(c._periods[a]));return(h[a]?c._periods[a]+(b?b[a]:m[a])+' ':'')};var r=function(a){var b=$.countdown._get(c,'labels'+n(c._periods[a]));return((!d&&h[a])||(d&&j[a])?'<span class="countdown_section"><span class="countdown_amount">'+c._periods[a]+'</span><br/>'+(b?b[a]:m[a])+'</span>':'')};return(l?this._buildLayout(c,h,l,k,d,j):((k?'<span class="countdown_row countdown_amount'+(c._hold?' countdown_holding':'')+'">'+q(Y)+q(O)+q(W)+q(D)+(h[H]?this._minDigits(c._periods[H],2):'')+(h[M]?(h[H]?o:'')+this._minDigits(c._periods[M],2):'')+(h[S]?(h[H]||h[M]?o:'')+this._minDigits(c._periods[S],2):''):'<span class="countdown_row countdown_show'+(d||f)+(c._hold?' countdown_holding':'')+'">'+r(Y)+r(O)+r(W)+r(D)+r(H)+r(M)+r(S))+'</span>'+(p?'<span class="countdown_row countdown_descr">'+p+'</span>':'')))},_buildLayout:function(c,d,e,f,g,h){var j=this._get(c,(f?'compactLabels':'labels'));var k=this._get(c,'whichLabels')||this._normalLabels;var l=function(a){return($.countdown._get(c,(f?'compactLabels':'labels')+k(c._periods[a]))||j)[a]};var m=function(a,b){return Math.floor(a/b)%10};var o={desc:this._get(c,'description'),sep:this._get(c,'timeSeparator'),yl:l(Y),yn:c._periods[Y],ynn:this._minDigits(c._periods[Y],2),ynnn:this._minDigits(c._periods[Y],3),y1:m(c._periods[Y],1),y10:m(c._periods[Y],10),y100:m(c._periods[Y],100),y1000:m(c._periods[Y],1000),ol:l(O),on:c._periods[O],onn:this._minDigits(c._periods[O],2),onnn:this._minDigits(c._periods[O],3),o1:m(c._periods[O],1),o10:m(c._periods[O],10),o100:m(c._periods[O],100),o1000:m(c._periods[O],1000),wl:l(W),wn:c._periods[W],wnn:this._minDigits(c._periods[W],2),wnnn:this._minDigits(c._periods[W],3),w1:m(c._periods[W],1),w10:m(c._periods[W],10),w100:m(c._periods[W],100),w1000:m(c._periods[W],1000),dl:l(D),dn:c._periods[D],dnn:this._minDigits(c._periods[D],2),dnnn:this._minDigits(c._periods[D],3),d1:m(c._periods[D],1),d10:m(c._periods[D],10),d100:m(c._periods[D],100),d1000:m(c._periods[D],1000),hl:l(H),hn:c._periods[H],hnn:this._minDigits(c._periods[H],2),hnnn:this._minDigits(c._periods[H],3),h1:m(c._periods[H],1),h10:m(c._periods[H],10),h100:m(c._periods[H],100),h1000:m(c._periods[H],1000),ml:l(M),mn:c._periods[M],mnn:this._minDigits(c._periods[M],2),mnnn:this._minDigits(c._periods[M],3),m1:m(c._periods[M],1),m10:m(c._periods[M],10),m100:m(c._periods[M],100),m1000:m(c._periods[M],1000),sl:l(S),sn:c._periods[S],snn:this._minDigits(c._periods[S],2),snnn:this._minDigits(c._periods[S],3),s1:m(c._periods[S],1),s10:m(c._periods[S],10),s100:m(c._periods[S],100),s1000:m(c._periods[S],1000)};var p=e;for(var i=Y;i<=S;i++){var q='yowdhms'.charAt(i);var r=new RegExp('\\{'+q+'<\\}(.*)\\{'+q+'>\\}','g');p=p.replace(r,((!g&&d[i])||(g&&h[i])?'$1':''))}$.each(o,function(n,v){var a=new RegExp('\\{'+n+'\\}','g');p=p.replace(a,v)});return p},_minDigits:function(a,b){a=''+a;if(a.length>=b){return a}a='0000000000'+a;return a.substr(a.length-b)},_determineShow:function(a){var b=this._get(a,'format');var c=[];c[Y]=(b.match('y')?'?':(b.match('Y')?'!':null));c[O]=(b.match('o')?'?':(b.match('O')?'!':null));c[W]=(b.match('w')?'?':(b.match('W')?'!':null));c[D]=(b.match('d')?'?':(b.match('D')?'!':null));c[H]=(b.match('h')?'?':(b.match('H')?'!':null));c[M]=(b.match('m')?'?':(b.match('M')?'!':null));c[S]=(b.match('s')?'?':(b.match('S')?'!':null));return c},_calculatePeriods:function(c,d,e,f){c._now=f;c._now.setMilliseconds(0);var g=new Date(c._now.getTime());if(c._since){if(f.getTime()<c._since.getTime()){c._now=f=g}else{f=c._since}}else{g.setTime(c._until.getTime());if(f.getTime()>c._until.getTime()){c._now=f=g}}var h=[0,0,0,0,0,0,0];if(d[Y]||d[O]){var i=$.countdown._getDaysInMonth(f.getFullYear(),f.getMonth());var j=$.countdown._getDaysInMonth(g.getFullYear(),g.getMonth());var k=(g.getDate()==f.getDate()||(g.getDate()>=Math.min(i,j)&&f.getDate()>=Math.min(i,j)));var l=function(a){return(a.getHours()*60+a.getMinutes())*60+a.getSeconds()};var m=Math.max(0,(g.getFullYear()-f.getFullYear())*12+g.getMonth()-f.getMonth()+((g.getDate()<f.getDate()&&!k)||(k&&l(g)<l(f))?-1:0));h[Y]=(d[Y]?Math.floor(m/12):0);h[O]=(d[O]?m-h[Y]*12:0);f=new Date(f.getTime());var n=(f.getDate()==i);var o=$.countdown._getDaysInMonth(f.getFullYear()+h[Y],f.getMonth()+h[O]);if(f.getDate()>o){f.setDate(o)}f.setFullYear(f.getFullYear()+h[Y]);f.setMonth(f.getMonth()+h[O]);if(n){f.setDate(o)}}var p=Math.floor((g.getTime()-f.getTime())/1000);var q=function(a,b){h[a]=(d[a]?Math.floor(p/b):0);p-=h[a]*b};q(W,604800);q(D,86400);q(H,3600);q(M,60);q(S,1);if(p>0&&!c._since){var r=[1,12,4.3482,7,24,60,60];var s=S;var t=1;for(var u=S;u>=Y;u--){if(d[u]){if(h[s]>=t){h[s]=0;p=1}if(p>0){h[u]++;p=0;s=u;t=1}}t*=r[u]}}if(e){for(var u=Y;u<=S;u++){if(e&&h[u]){e--}else if(!e){h[u]=0}}}return h}});function extendRemove(a,b){$.extend(a,b);for(var c in b){if(b[c]==null){a[c]=null}}return a}$.fn.countdown=function(a){var b=Array.prototype.slice.call(arguments,1);if(a=='getTimes'||a=='settings'){return $.countdown['_'+a+'Countdown'].apply($.countdown,[this[0]].concat(b))}return this.each(function(){if(typeof a=='string'){$.countdown['_'+a+'Countdown'].apply($.countdown,[this].concat(b))}else{$.countdown._attachCountdown(this,a)}})};$.countdown=new Countdown()})(jQuery);
