/* jCountdown Plugin for jQuery JavaScript Library v 1.1.1 02/12/2012 http://codecanyon.net/user/ufoufoufo Copyright (c) 2012 */ jQuery.fn.extend({jCountdown:function(){var B=function(b){this._target=b;this._width=50;this._height=64;this._frame=1;this._totalFrames=15;this._fps=24;this._intervalId=-1;this._value=0;this.stop=function(){clearInterval(this._intervalId)};this.update=function(a){if(a){this.frame(1);this.stop();var b=this;this._intervalId=setInterval(function(){b.frame()==b.totalFrames()?(clearInterval(b._intervalId),b.onFinish()):b.frame(b.frame()+1)},Math.ceil(1E3/this.fps()))}else this.frame(this.totalFrames())}; this.value=function(a,b){if(void 0==a)return this._value;this._value=a;this.update(b)};this.onFinish=function(){};this.destroy=function(){this.stop();this._target=null};this.width=function(a){if(void 0==a)return this._width;this._width=a};this.height=function(a){if(void 0==a)return this._height;this._height=a};this.frame=function(a){if(void 0==a)return this._frame;this._frame=a;var a=-(9-this.value())*this.width(),b=-(this.frame()-1)*this.height();this._target.children(".text").css("background-position", a+"px "+b+"px")};this.totalFrames=function(a){if(void 0==a)return this._totalFrames;this._totalFrames=a};this.fps=function(a){if(void 0==a)return this._fps;this._fps=a};this.update(!1)},C=function(b){this._target=b;this._width=50;this._height=64;this._frame=1;this._totalFrames=15;this._fps=24;this._intervalId=-1;this._value=0;this.stop=function(){clearInterval(this._intervalId)};this.update=function(a){if(a){this.frame(1);this.stop();var b=this;this._intervalId=setInterval(function(){b.frame()==b.totalFrames()? (clearInterval(b._intervalId),b.onFinish()):b.frame(b.frame()+1)},Math.ceil(1E3/this.fps()))}else this.frame(this.totalFrames())};this.value=function(a,b){if(void 0==a)return this._value;this._value=a;this.update(b)};this.onFinish=function(){};this.destroy=function(){this.stop();this._target=null};this.width=function(a){if(void 0==a)return this._width;this._width=a};this.height=function(a){if(void 0==a)return this._height;this._height=a};this.frame=function(a){if(void 0==a)return this._frame;this._frame= a;a=-((1+this.value())*this.height())+Math.sin((this.frame()-1)/(this.totalFrames()-1)*Math.PI/2)*this.height();this._target.children(".text").css("background-position","0px "+a+"px")};this.totalFrames=function(a){if(void 0==a)return this._totalFrames;this._totalFrames=a};this.fps=function(a){if(void 0==a)return this._fps;this._fps=a};this.update(!1)},D=function(b){this._target=b;this._height=this._width=60;this._frame=1;this._totalFrames=15;this._fps=24;this._intervalId=-1;this._value=0;this.stop= function(){clearInterval(this._intervalId)};this.update=function(a){if(a){this.frame(1);this.stop();var b=this;this._intervalId=setInterval(function(){b.frame()==b.totalFrames()?(clearInterval(b._intervalId),b.onFinish()):b.frame(b.frame()+1)},Math.ceil(1E3/this.fps()))}else this.frame(this.totalFrames())};this.value=function(a,b){if(void 0==a)return this._value;this._value=a;this.update(b)};this.onFinish=function(){};this.destroy=function(){this.stop();this._target=null};this.width=function(a){if(void 0== a)return this._width;this._width=a};this.height=function(a){if(void 0==a)return this._height;this._height=a};this.frame=function(a){if(void 0==a)return this._frame;this._frame=a;a=this.value()+1;9=b?c=0:0.4>=b?c=1-b/0.4:0.6<=b&&(c=(b-0.6)/0.4);a=-(0.5b?b=0:0>b&&-0.001a&&(b=b.substr(b.length-a,a));return b};this.timeFormat=function(b,a,c,d,e){var b=Math.floor(b/1E3),f=b%60,g=Math.floor(b%3600/60),h=Math.floor(b%86400/3600);return this.textFormat(Math.floor(b/86400),a,"0")+this.textFormat(h,c,"0")+this.textFormat(g,d,"0")+this.textFormat(f,e,"0")};this.start=function(){this.stop();for(var b=0;b';for(h=0;h';if("slide"==i||"crystal"==i||"metal"==i)c+='
'; c+='
';c+=""}w&&(c+='
');c+=""}if(A){c+='
';for(h=0;2>h;h++){f=" item"+(h+1);s=1==h?" lastItem":"";c+='
';if("slide"==i||"crystal"==i||"metal"==i)c+='
';c+='
';c+="
"}w&&(c+='
');c+="
"}if(z){c+='
';for(h=0;2>h;h++){f=" item"+(h+1);s= 1==h?" lastItem":"";c+='
';if("slide"==i||"crystal"==i||"metal"==i)c+='
';c+='
';c+="
"}w&&(c+='
');c+="
"}if(x){c+='
';for(h=0;2>h;h++){f=" item"+(h+1);s=1==h?" lastItem":"";c+='
';if("slide"==i||"crystal"==i||"metal"==i)c+='
';c+='
';c+="
"}w&&(c+='
'); c+="
"}q.html(c+"");g=q.children(".jCountdown");g.addClass(i);g.addClass(k);g.children(".group").css("margin-right",n+"px");g.children(".group.lastItem").css("margin-right","0px");g.children(".group").children(".container").css("margin-right",p+"px");g.children(".group").children(".container.lastItem").css("margin-right","0px");u&&!(jQuery.browser.msie&&10>j)&&(reflectionObject=g.clone(),reflectionObject.addClass("reflection"),w&&reflectionObject.addClass("displayLabel"),100!=r&&reflectionObject.css("opacity", r/100),0!=l&&reflectionObject.addClass("blur"+l),g=g.add(reflectionObject));f=jQuery('
');f.append(g);q.append(f);0!=d&&(k=jQuery('
'),k.append(g),f.append(k),n=k.width(),p=k.height(),d/=n,u=-(1-d)*n/2,r=-(1-d)*p/2,l="scale("+d+")",f.width(n*d),f.height(p*d),jQuery.browser.msie&&8>=j?k.css("zoom",d):(k.css("transform",l).css("-moz-transform",l).css("-webkit-transform",l).css("-o-transform",l).css("-ms-transform",l),k.css("left", u).css("top",r)));j="";d=0;k=[];n=[];p=[];u=[];f=function(){};switch(i){case "flip":f=B;break;case "slide":f=C;break;case "crystal":f=E;break;case "metal":f=D}d=1;for(j=".group.day>.container.item";g.find(j+d).length;)k.push(new f(g.find(j+d))),d++;d=1;for(j=".group.hour>.container.item";g.find(j+d).length;)n.push(new f(g.find(j+d))),d++;d=1;for(j=".group.minute>.container.item";g.find(j+d).length;)p.push(new f(g.find(j+d))),d++;d=1;for(j=".group.second>.container.item";g.find(j+d).length;)u.push(new f(g.find(j+ d))),d++;m.items(k,n,p,u);m.onFinish=e;m.time(y,t)}else if("string"==typeof arguments[0]&&void 0!=m)switch(arguments[0]){case "stop":m.stop();break;case "start":m.start();break;case "destroy":t(),q.children().remove()}}return this}});