﻿/* jGrowl Plugin 1.2.4 (minified)
PQ: Modified to display in middle of page */
(function($){$.jGrowl=function(m,o){if($('#jGrowl').size()==0)
$('<div id="jGrowl"></div>').addClass($.jGrowl.defaults.position).appendTo('body');$('#jGrowl').jGrowl(m,o);};$.fn.jGrowl=function(m,o){if($.isFunction(this.each)){var args=arguments;return this.each(function(){var self=this;if($(this).data('jGrowl.instance')==undefined){$(this).data('jGrowl.instance',$.extend(new $.fn.jGrowl(),{notifications:[],element:null,interval:null}));$(this).data('jGrowl.instance').startup(this);}
if($.isFunction($(this).data('jGrowl.instance')[m])){$(this).data('jGrowl.instance')[m].apply($(this).data('jGrowl.instance'),$.makeArray(args).slice(1));}else{$(this).data('jGrowl.instance').create(m,o);}});};};$.extend($.fn.jGrowl.prototype,{defaults:{pool:0,header:'',group:'',sticky:false,position:'center',glue:'after',theme:'default',corners:'10px',check:250,life:5000,speed:'normal',easing:'swing',closer:true,closeTemplate:'×',closerTemplate:'<div>[ close all ]</div>',log:function(e,m,o){},beforeOpen:function(e,m,o){},open:function(e,m,o){},beforeClose:function(e,m,o){},close:function(e,m,o){},animateOpen:{opacity:'show'},animateClose:{opacity:'hide'}},notifications:[],element:null,interval:null,create:function(message,o){var o=$.extend({},this.defaults,o);this.notifications.push({message:message,options:o});o.log.apply(this.element,[this.element,message,o]);},render:function(notification){var self=this;var message=notification.message;var o=notification.options;var notification=$('<div class="jGrowl-notification ui-state-highlight ui-corner-all'+
((o.group!=undefined&&o.group!='')?' '+o.group:'')+'">'+'<div class="close">'+o.closeTemplate+'</div>'+'<div class="header">'+o.header+'</div>'+'<div class="message">'+message+'</div></div>').data("jGrowl",o).addClass(o.theme).children('div.close').bind("click.jGrowl",function(){$(this).parent().trigger('jGrowl.close');}).parent();$(notification).bind("mouseover.jGrowl",function(){$('div.jGrowl-notification',self.element).data("jGrowl.pause",true);}).bind("mouseout.jGrowl",function(){$('div.jGrowl-notification',self.element).data("jGrowl.pause",false);}).bind('jGrowl.beforeOpen',function(){if(o.beforeOpen.apply(notification,[notification,message,o,self.element])!=false){$(this).trigger('jGrowl.open');}}).bind('jGrowl.open',function(){if(o.open.apply(notification,[notification,message,o,self.element])!=false){if(o.glue=='after'){$('div.jGrowl-notification:last',self.element).after(notification);}else{$('div.jGrowl-notification:first',self.element).before(notification);}
$(this).animate(o.animateOpen,o.speed,o.easing,function(){if($.browser.msie&&(parseInt($(this).css('opacity'),10)===1||parseInt($(this).css('opacity'),10)===0))
this.style.removeAttribute('filter');$(this).data("jGrowl").created=new Date();});}}).bind('jGrowl.beforeClose',function(){if(o.beforeClose.apply(notification,[notification,message,o,self.element])!=false)
$(this).trigger('jGrowl.close');}).bind('jGrowl.close',function(){$(this).data('jGrowl.pause',true);$(this).animate(o.animateClose,o.speed,o.easing,function(){$(this).remove();var close=o.close.apply(notification,[notification,message,o,self.element]);if($.isFunction(close))
close.apply(notification,[notification,message,o,self.element]);});}).trigger('jGrowl.beforeOpen');if($.fn.corner!=undefined)$(notification).corner(o.corners);if($('div.jGrowl-notification:parent',self.element).size()>1&&$('div.jGrowl-closer',self.element).size()==0&&this.defaults.closer!=false){$(this.defaults.closerTemplate).addClass('jGrowl-closer ui-state-highlight ui-corner-all').addClass(this.defaults.theme).appendTo(self.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){$(this).siblings().children('div.close').trigger("click.jGrowl");if($.isFunction(self.defaults.closer)){self.defaults.closer.apply($(this).parent()[0],[$(this).parent()[0]]);}});};},update:function(){$(this.element).find('div.jGrowl-notification:parent').each(function(){if($(this).data("jGrowl")!=undefined&&$(this).data("jGrowl").created!=undefined&&($(this).data("jGrowl").created.getTime()+$(this).data("jGrowl").life)<(new Date()).getTime()&&$(this).data("jGrowl").sticky!=true&&($(this).data("jGrowl.pause")==undefined||$(this).data("jGrowl.pause")!=true)){$(this).trigger('jGrowl.beforeClose');}});if(this.notifications.length>0&&(this.defaults.pool==0||$(this.element).find('div.jGrowl-notification:parent').size()<this.defaults.pool))
this.render(this.notifications.shift());if($(this.element).find('div.jGrowl-notification:parent').size()<2){$(this.element).find('div.jGrowl-closer').animate(this.defaults.animateClose,this.defaults.speed,this.defaults.easing,function(){$(this).remove();});}},startup:function(e){this.element=$(e).addClass('jGrowl').append('<div class="jGrowl-notification"></div>');this.interval=setInterval(function(){$(e).data('jGrowl.instance').update();},this.defaults.check);if($.browser.msie&&parseInt($.browser.version)<7&&!window["XMLHttpRequest"]){$(this.element).addClass('ie6');}},shutdown:function(){$(this.element).removeClass('jGrowl').find('div.jGrowl-notification').remove();clearInterval(this.interval);},close:function(){$(this.element).find('div.jGrowl-notification').each(function(){$(this).trigger('jGrowl.beforeClose');});}});$.jGrowl.defaults=$.fn.jGrowl.prototype.defaults;})(jQuery);

/*jQuery Tooltip plugin 1.3
* http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
* http://docs.jquery.com/Plugins/Tooltip
* Copyright (c) 2006 - 2008 JÃ¶rn Zaefferer
* $Id: jquery.tooltip.js 5741 2008-06-21 15:22:16Z joern.zaefferer $
* Dual licensed under the MIT and GPL licenses:
*   http://www.opensource.org/licenses/mit-license.php
*   http://www.gnu.org/licenses/gpl.html*/
;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else
show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)helper.body.append("<br/>");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else
helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else
helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))helper.parent.stop().fadeTo(tsettings.fade,0,complete);else
helper.parent.stop().fadeOut(tsettings.fade,complete);}else
complete();if(settings(this).fixPNG)helper.parent.unfixPNG();}})(jQuery);

// jQuery Ticker (minified)
jQuery.fn.bxSlider=function(options){var defaults={mode:'slide',speed:500,auto:false,auto_direction:'left',pause:2500,controls:true,prev_text:'prev',next_text:'next',width:$(this).children().width(),prev_img:'',next_img:'',ticker_direction:'left',wrapper_class:'container'};options=$.extend(defaults,options);if(options.mode=='ticker'){options.auto=true;}
var $this=$(this);var $parent_width=options.width;var current=0;var is_working=false;var child_count=$this.children().size();var i=0;var j=0;var k=0;function animate_next(){is_working=true;$this.animate({'left':'-'+$parent_width*2+'px'},options.speed,function(){$this.css({'left':'-'+$parent_width+'px'}).children(':first').appendTo($this);is_working=false;});}
function animate_prev(){is_working=true;$this.animate({'left':0},options.speed,function(){$this.css({'left':'-'+$parent_width+'px'}).children(':last').insertBefore($this.children(':first'));is_working=false;});}
function fade(direction){if(direction=='next'){var last_before_switch=child_count-1;var start_over=0;var incr=k+1;}else if(direction=='prev'){var last_before_switch=0;var start_over=child_count-1;var incr=k-1;}
is_working=true;if(k==last_before_switch){$this.children().eq(k).fadeTo(options.speed,0,function(){$(this).hide();});$this.children().eq(start_over).show().fadeTo(options.speed,1,function(){is_working=false;k=start_over;});}else{$this.children().eq(k).fadeTo(options.speed,0,function(){$(this).hide();});$this.children().eq(incr).show().fadeTo(options.speed,1,function(){is_working=false;k=incr;});}}
function add_controls(){if(options.prev_img!=''||options.next_img!=''){$this.parent().append('<a class="slider_prev" href="javascript:;"><img src="'+options.prev_img+'" alt="Previous"/></a><a class="slider_next" href="javascript:;"><img src="'+options.next_img+'" alt="Next" /></a>');}else{$this.parent().append('<a class="slider_prev" href="javascript:;">'+options.prev_text+'</a><a class="slider_next" href="javascript:;">'+options.next_text+'</a>');}
$this.parent().find('.slider_prev').css({'outline':'0'});$this.parent().find('.slider_next').css({'outline':'0'});if(options.mode=='fade'){$this.parent().find('.slider_prev').css({'paddingTop':$this.children().height()})
$this.parent().find('.slider_next').css({'paddingTop':$this.children().height()})}
$this.parent().find('.slider_next').click(function(){if(!is_working){if(options.mode=='slide'){animate_next();if(options.auto){clearInterval($.t);$.t=setInterval(function(){animate_next();},options.pause);}}else if(options.mode=='fade'){fade('next');if(options.auto){clearInterval($.t);$.t=setInterval(function(){fade('next');},options.pause);}}}
return false;});$this.parent().find('.slider_prev').click(function(){if(!is_working){if(options.mode=='slide'){animate_prev();if(options.auto){clearInterval($.t);$.t=setInterval(function(){animate_prev();},options.pause);}}else if(options.mode=='fade'){fade('prev');if(options.auto){clearInterval($.t);$.t=setInterval(function(){fade('prev');},options.pause);}}}
return false;});}
function ticker(){if(options.ticker_direction=='left'){$this.animate({'left':'-'+$parent_width*2+'px'},options.speed,'linear',function(){$this.css({'left':'-'+$parent_width+'px'}).children(':first').appendTo($this);ticker();});}else if(options.ticker_direction=='right'){$this.animate({'left':0},options.speed,'linear',function(){$this.css({'left':'-'+$parent_width+'px'}).children(':last').insertBefore($this.children(':first'));ticker();});}}
$this.wrap('<div class="'+options.wrapper_class+'"></div>');if(options.mode=='slide'||options.mode=='ticker'){$this.parent().css({'overflow':'hidden','position':'relative','width':options.width+'px'});$this.css({'width':'999999px','position':'relative','left':'-'+$parent_width+'px'});$this.children().css({'float':'left','width':$parent_width});$this.children(':last').insertBefore($this.children(':first'));}else if(options.mode=='fade'){$this.parent().css({'overflow':'hidden','position':'relative','width':options.width+'px'});if(!options.controls){$this.parent().css({'height':$this.children().height()});}
$this.children().css({'position':'absolute','width':$parent_width,'listStyle':'none','opacity':0,'display':'none'});$this.children(':first').css({'opacity':1,'display':'block'});}
if(!options.auto){add_controls();}else{if(options.mode=='ticker'){ticker();}else{if(options.mode=='slide'){if(options.auto_direction=='left'){$.t=setInterval(function(){animate_next();},options.pause);}else if(options.auto_direction=='right'){$.t=setInterval(function(){animate_prev();},options.pause);}}else if(options.mode=='fade'){if(options.auto_direction=='left'){$.t=setInterval(function(){fade('next');},options.pause);}else if(options.auto_direction=='right'){$.t=setInterval(function(){fade('prev');},options.pause);}}
if(options.controls){add_controls();}}}};

/* http://keith-wood.name/countdown.html
Countdown for jQuery v1.5.5.
Written by Keith Wood (kbwood{at}iinet.com.au) January 2008.
Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and 
MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(A($){A 1i(){8.1B=[];8.1B[\'\']={1j:[\'2t\',\'2u\',\'2v\',\'2w\',\'2x\',\'2y\',\'2z\'],2A:[\'2B\',\'2C\',\'2D\',\'2E\',\'2F\',\'2G\',\'2H\'],1k:[\'y\',\'m\',\'w\',\'d\'],1C:\':\',1R:1e};8.1f={1S:E,1T:E,1U:E,1V:E,1W:\'2I\',1l:\'\',1X:1e,1D:\'\',1Y:\'\',1Z:\'\',20:1e,21:E,22:E};$.1t(8.1f,8.1B[\'\'])}x w=\'G\';x Y=0;x O=1;x W=2;x D=3;x H=4;x M=5;x S=6;$.1t(1i.23,{1m:\'2J\',2K:2L(A(){$.G.25()},2M),18:[],2N:A(a){8.1E(8.1f,a);1F(8.1f,a||{})},1G:A(a,b,c,e,f,g,h,i){B(1n b==\'2O\'&&b.2P==Q){i=b.1H();h=b.1I();g=b.1J();f=b.1K();e=b.T();c=b.15();b=b.16()}x d=P Q();d.2Q(b);d.26(1);d.2R(c||0);d.26(e||1);d.2S(f||0);d.2T((g||0)-(U.2U(a)<30?a*1g:a));d.2V(h||0);d.2W(i||0);C d},2X:A(a,b){B(!b){C $.G.1f}x c=$.V(a,w);C(b==\'2Y\'?c.X:c.X[b])},27:A(a,b){x c=$(a);B(c.28(8.1m)){C}c.2Z(8.1m);x d={X:$.1t({},b),z:[0,0,0,0,0,0,0]};$.V(a,w,d);8.29(a)},1L:A(a){B(!8.1M(a)){8.18.31(a)}},1M:A(a){C($.33(a,8.18)>-1)},1u:A(b){8.18=$.34(8.18,A(a){C(a==b?E:a)})},25:A(){19(x i=0;i<8.18.1v;i++){8.1o(8.18[i])}},1o:A(a,b){x c=$(a);b=b||$.V(a,w);B(!b){C}c.35(8.2a(b));c[(8.F(b,\'1R\')?\'36\':\'37\')+\'38\'](\'39\');x d=8.F(b,\'22\');B(d){d.1p(a,[b.R!=\'2b\'?b.z:8.1w(b,b.I,P Q())])}x e=b.R!=\'1q\'&&(b.J?b.1a.K()<=b.J.K():b.1a.K()>=b.Z.K());B(e&&!b.1N){b.1N=2c;B(8.1M(a)||8.F(b,\'20\')){8.1u(a);x f=8.F(b,\'21\');B(f){f.1p(a,[])}x g=8.F(b,\'1Z\');B(g){x h=8.F(b,\'1l\');b.X.1l=g;8.1o(a,b);b.X.1l=h}x i=8.F(b,\'1Y\');B(i){3a.3b=i}}b.1N=1e}1r B(b.R==\'1q\'){8.1u(a)}$.V(a,w,b)},29:A(a,b,c){b=b||{};B(1n b==\'1O\'){x d=b;b={};b[d]=c}x e=$.V(a,w);B(e){8.1E(e.X,b);1F(e.X,b);8.2d(a,e);$.V(a,w,e);x f=P Q();B((e.J&&e.J<f)||(e.Z&&e.Z>f)){8.1L(a)}8.1o(a,e)}},1E:A(a,b){x c=1e;19(x n 1P b){B(n.N(/[2e]2f/)){c=2c;17}}B(c){19(x n 1P a){B(n.N(/[2e]2f[0-9]/)){a[n]=E}}}},2d:A(a,b){x c=8.F(b,\'1V\');c=(c?c.1p(a,[]):E);x d=P Q();x e=8.F(b,\'1U\');e=(e==E?-d.3c():e);b.J=8.F(b,\'1T\');B(b.J){b.J=8.1G(e,8.1x(b.J,E));B(b.J&&c){b.J.1y(b.J.1H()+d.K()-c.K())}}b.Z=8.1G(e,8.1x(8.F(b,\'1S\'),d));B(c){b.Z.1y(b.Z.1H()+d.K()-c.K())}b.I=8.2g(b)},3d:A(a){x b=$(a);B(!b.28(8.1m)){C}8.1u(a);b.3e(8.1m).3f();$.3g(a,w)},3h:A(a){8.R(a,\'1q\')},3i:A(a){8.R(a,\'2b\')},3j:A(a){8.R(a,E)},R:A(a,b){x c=$.V(a,w);B(c){B(c.R==\'1q\'&&!b){c.z=c.2h;x d=(c.J?\'-\':\'+\');c[c.J?\'J\':\'Z\']=8.1x(d+c.z[0]+\'y\'+d+c.z[1]+\'o\'+d+c.z[2]+\'w\'+d+c.z[3]+\'d\'+d+c.z[4]+\'h\'+d+c.z[5]+\'m\'+d+c.z[6]+\'s\');8.1L(a)}c.R=b;c.2h=(b==\'1q\'?c.z:E);$.V(a,w,c);8.1o(a,c)}},3k:A(a){x b=$.V(a,w);C(!b?E:(!b.R?b.z:8.1w(b,b.I,P Q())))},F:A(a,b){C(a.X[b]!=E?a.X[b]:$.G.1f[b])},1x:A(k,l){x m=A(a){x b=P Q();b.2i(b.K()+a*11);C b};x n=A(a){a=a.3l();x b=P Q();x c=b.16();x d=b.15();x e=b.T();x f=b.1K();x g=b.1J();x h=b.1I();x i=/([+-]?[0-9]+)\\s*(s|m|h|d|w|o|y)?/g;x j=i.2j(a);3m(j){3n(j[2]||\'s\'){1b\'s\':h+=1c(j[1],10);17;1b\'m\':g+=1c(j[1],10);17;1b\'h\':f+=1c(j[1],10);17;1b\'d\':e+=1c(j[1],10);17;1b\'w\':e+=1c(j[1],10)*7;17;1b\'o\':d+=1c(j[1],10);e=U.1z(e,$.G.1h(c,d));17;1b\'y\':c+=1c(j[1],10);e=U.1z(e,$.G.1h(c,d));17}j=i.2j(a)}C P Q(c,d,e,f,g,h,0)};x o=(k==E?l:(1n k==\'1O\'?n(k):(1n k==\'3o\'?m(k):k)));B(o)o.1y(0);C o},1h:A(a,b){C 32-P Q(a,b,32).T()},2a:A(c){c.z=13=(c.R?c.z:8.1w(c,c.I,P Q()));x d=1e;x e=0;19(x f=0;f<c.I.1v;f++){d|=(c.I[f]==\'?\'&&13[f]>0);c.I[f]=(c.I[f]==\'?\'&&!d?E:c.I[f]);e+=(c.I[f]?1:0)}x g=8.F(c,\'1X\');x h=8.F(c,\'1l\');x i=(g?8.F(c,\'1k\'):8.F(c,\'1j\'));x j=8.F(c,\'1C\');x k=8.F(c,\'1D\')||\'\';x l=A(a){x b=$.G.F(c,\'1k\'+13[a]);C(c.I[a]?13[a]+(b?b[a]:i[a])+\' \':\'\')};x m=A(a){x b=$.G.F(c,\'1j\'+13[a]);C(c.I[a]?\'<14 1s="3p"><14 1s="2k">\'+13[a]+\'</14><3q/>\'+(b?b[a]:i[a])+\'</14>\':\'\')};C(h?8.2l(c,h,g):((g?\'<14 1s="1Q 2k\'+(c.R?\' 2m\':\'\')+\'">\'+l(Y)+l(O)+l(W)+l(D)+(c.I[H]?8.L(13[H],2):\'\')+(c.I[M]?(c.I[H]?j:\'\')+8.L(13[M],2):\'\')+(c.I[S]?(c.I[H]||c.I[M]?j:\'\')+8.L(13[S],2):\'\'):\'<14 1s="1Q 3r\'+e+(c.R?\' 2m\':\'\')+\'">\'+m(Y)+m(O)+m(W)+m(D)+m(H)+m(M)+m(S))+\'</14>\'+(k?\'<14 1s="1Q 3s">\'+k+\'</14>\':\'\')))},2l:A(c,d,e){x f=8.F(c,(e?\'1k\':\'1j\'));x g=A(a){C($.G.F(c,(e?\'1k\':\'1j\')+c.z[a])||f)[a]};x h=A(a,b){C U.1A(a/b)%10};x j={3t:8.F(c,\'1D\'),3u:8.F(c,\'1C\'),3v:g(Y),3w:c.z[Y],3x:8.L(c.z[Y],2),3y:8.L(c.z[Y],3),3z:h(c.z[Y],1),3A:h(c.z[Y],10),3B:h(c.z[Y],1d),3C:h(c.z[Y],11),3D:g(O),3E:c.z[O],3F:8.L(c.z[O],2),3G:8.L(c.z[O],3),3H:h(c.z[O],1),3I:h(c.z[O],10),3J:h(c.z[O],1d),3K:h(c.z[O],11),3L:g(W),3M:c.z[W],3N:8.L(c.z[W],2),3O:8.L(c.z[W],3),3P:h(c.z[W],1),3Q:h(c.z[W],10),3R:h(c.z[W],1d),3S:h(c.z[W],11),3T:g(D),3U:c.z[D],3V:8.L(c.z[D],2),3W:8.L(c.z[D],3),3X:h(c.z[D],1),3Y:h(c.z[D],10),3Z:h(c.z[D],1d),40:h(c.z[D],11),41:g(H),42:c.z[H],43:8.L(c.z[H],2),44:8.L(c.z[H],3),45:h(c.z[H],1),46:h(c.z[H],10),47:h(c.z[H],1d),48:h(c.z[H],11),49:g(M),4a:c.z[M],4b:8.L(c.z[M],2),4c:8.L(c.z[M],3),4d:h(c.z[M],1),4e:h(c.z[M],10),4f:h(c.z[M],1d),4g:h(c.z[M],11),4h:g(S),4i:c.z[S],4j:8.L(c.z[S],2),4k:8.L(c.z[S],3),4l:h(c.z[S],1),4m:h(c.z[S],10),4n:h(c.z[S],1d),4o:h(c.z[S],11)};x k=d;19(x i=0;i<7;i++){x l=\'4p\'.4q(i);x m=P 2n(\'\\\\{\'+l+\'<\\\\}(.*)\\\\{\'+l+\'>\\\\}\',\'g\');k=k.2o(m,(c.I[i]?\'$1\':\'\'))}$.2p(j,A(n,v){x a=P 2n(\'\\\\{\'+n+\'\\\\}\',\'g\');k=k.2o(a,v)});C k},L:A(a,b){a=\'\'+a;B(a.1v>=b){C a}a=\'4r\'+a;C a.4s(a.1v-b)},2g:A(a){x b=8.F(a,\'1W\');x c=[];c[Y]=(b.N(\'y\')?\'?\':(b.N(\'Y\')?\'!\':E));c[O]=(b.N(\'o\')?\'?\':(b.N(\'O\')?\'!\':E));c[W]=(b.N(\'w\')?\'?\':(b.N(\'W\')?\'!\':E));c[D]=(b.N(\'d\')?\'?\':(b.N(\'D\')?\'!\':E));c[H]=(b.N(\'h\')?\'?\':(b.N(\'H\')?\'!\':E));c[M]=(b.N(\'m\')?\'?\':(b.N(\'M\')?\'!\':E));c[S]=(b.N(\'s\')?\'?\':(b.N(\'S\')?\'!\':E));C c},1w:A(f,g,h){f.1a=h;f.1a.1y(0);x i=P Q(f.1a.K());B(f.J){B(h.K()<f.J.K()){f.1a=h=i}1r{h=f.J}}1r{i.2i(f.Z.K());B(h.K()>f.Z.K()){f.1a=h=i}}x j=[0,0,0,0,0,0,0];B(g[Y]||g[O]){x k=$.G.1h(h.16(),h.15());x l=$.G.1h(i.16(),i.15());x m=(i.T()==h.T()||(i.T()>=U.1z(k,l)&&h.T()>=U.1z(k,l)));x n=A(a){C(a.1K()*1g+a.1J())*1g+a.1I()};x o=U.4t(0,(i.16()-h.16())*12+i.15()-h.15()+((i.T()<h.T()&&!m)||(m&&n(i)<n(h))?-1:0));j[Y]=(g[Y]?U.1A(o/12):0);j[O]=(g[O]?o-j[Y]*12:0);x p=A(a,b,c){x d=(a.T()==c);x e=$.G.1h(a.16()+b*j[Y],a.15()+b*j[O]);B(a.T()>e){a.2q(e)}a.4u(a.16()+b*j[Y]);a.4v(a.15()+b*j[O]);B(d){a.2q(e)}C a};B(f.J){i=p(i,-1,l)}1r{h=p(P Q(h.K()),+1,k)}}x q=U.1A((i.K()-h.K())/11);x r=A(a,b){j[a]=(g[a]?U.1A(q/b):0);q-=j[a]*b};r(W,4w);r(D,4x);r(H,4y);r(M,1g);r(S,1);B(q>0&&!f.J){x s=[1,12,4.4z,7,24,1g,1g];x t=S;x u=1;19(x v=S;v>=Y;v--){B(g[v]){B(j[t]>=u){j[t]=0;q=1}B(q>0){j[v]++;q=0;t=v;u=1}}u*=s[v]}}C j}});A 1F(a,b){$.1t(a,b);19(x c 1P b){B(b[c]==E){a[c]=E}}C a}$.4A.G=A(a){x b=4B.23.4C.4D(4E,1);B(a==\'4F\'||a==\'4G\'){C $.G[\'2r\'+a+\'1i\'].1p($.G,[8[0]].2s(b))}C 8.2p(A(){B(1n a==\'1O\'){$.G[\'2r\'+a+\'1i\'].1p($.G,[8].2s(b))}1r{$.G.27(8,a)}})};$.G=P 1i()})(4H);',62,292,'||||||||this|||||||||||||||||||||||||var||_periods|function|if|return||null|_get|countdown||_show|_since|getTime|_minDigits||match||new|Date|_hold||getDate|Math|data||options||_until||1000||periods|span|getMonth|getFullYear|break|_timerTargets|for|_now|case|parseInt|100|false|_defaults|60|_getDaysInMonth|Countdown|labels|compactLabels|layout|markerClassName|typeof|_updateCountdown|apply|pause|else|class|extend|_removeTarget|length|_calculatePeriods|_determineTime|setMilliseconds|min|floor|regional|timeSeparator|description|_resetExtraLabels|extendRemove|UTCDate|getMilliseconds|getSeconds|getMinutes|getHours|_addTarget|_hasTarget|_expiring|string|in|countdown_row|isRTL|until|since|timezone|serverSync|format|compact|expiryUrl|expiryText|alwaysExpire|onExpiry|onTick|prototype||_updateTargets|setUTCDate|_attachCountdown|hasClass|_changeCountdown|_generateHTML|lap|true|_adjustSettings|Ll|abels|_determineShow|_savePeriods|setTime|exec|countdown_amount|_buildLayout|countdown_holding|RegExp|replace|each|setDate|_|concat|Years|Months|Weeks|Days|Hours|Minutes|Seconds|labels1|Year|Month|Week|Day|Hour|Minute|Second|dHMS|hasCountdown|_timer|setInterval|980|setDefaults|object|constructor|setUTCFullYear|setUTCMonth|setUTCHours|setUTCMinutes|abs|setUTCSeconds|setUTCMilliseconds|_settingsCountdown|all|addClass||push||inArray|map|html|add|remove|Class|countdown_rtl|window|location|getTimezoneOffset|_destroyCountdown|removeClass|empty|removeData|_pauseCountdown|_lapCountdown|_resumeCountdown|_getTimesCountdown|toLowerCase|while|switch|number|countdown_section|br|countdown_show|countdown_descr|desc|sep|yl|yn|ynn|ynnn|y1|y10|y100|y1000|ol|on|onn|onnn|o1|o10|o100|o1000|wl|wn|wnn|wnnn|w1|w10|w100|w1000|dl|dn|dnn|dnnn|d1|d10|d100|d1000|hl|hn|hnn|hnnn|h1|h10|h100|h1000|ml|mn|mnn|mnnn|m1|m10|m100|m1000|sl|sn|snn|snnn|s1|s10|s100|s1000|yowdhms|charAt|0000000000|substr|max|setFullYear|setMonth|604800|86400|3600|3482|fn|Array|slice|call|arguments|getTimes|settings|jQuery'.split('|'),0,{}));

// jQuery-effects-core minified
jQuery.effects||(function(g){g.effects={};g.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(l,k){g.fx.step[k]=function(m){if(!m.colorInit){m.start=j(m.elem,k);m.end=i(m.end);m.colorInit=true}m.elem.style[k]="rgb("+Math.max(Math.min(parseInt((m.pos*(m.end[0]-m.start[0]))+m.start[0],10),255),0)+","+Math.max(Math.min(parseInt((m.pos*(m.end[1]-m.start[1]))+m.start[1],10),255),0)+","+Math.max(Math.min(parseInt((m.pos*(m.end[2]-m.start[2]))+m.start[2],10),255),0)+")"}});function i(l){var k;if(l&&l.constructor==Array&&l.length==3){return l}if(k=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(l)){return[parseInt(k[1],10),parseInt(k[2],10),parseInt(k[3],10)]}if(k=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(l)){return[parseFloat(k[1])*2.55,parseFloat(k[2])*2.55,parseFloat(k[3])*2.55]}if(k=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(l)){return[parseInt(k[1],16),parseInt(k[2],16),parseInt(k[3],16)]}if(k=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(l)){return[parseInt(k[1]+k[1],16),parseInt(k[2]+k[2],16),parseInt(k[3]+k[3],16)]}if(k=/rgba\(0, 0, 0, 0\)/.exec(l)){return a.transparent}return a[g.trim(l).toLowerCase()]}function j(m,k){var l;do{l=g.curCSS(m,k);if(l!=""&&l!="transparent"||g.nodeName(m,"body")){break}k="backgroundColor"}while(m=m.parentNode);return i(l)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};var e=["add","remove","toggle"],c={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function f(){var n=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,o={},l,m;if(n&&n.length&&n[0]&&n[n[0]]){var k=n.length;while(k--){l=n[k];if(typeof n[l]=="string"){m=l.replace(/\-(\w)/g,function(p,q){return q.toUpperCase()});o[m]=n[l]}}}else{for(l in n){if(typeof n[l]==="string"){o[l]=n[l]}}}return o}function b(l){var k,m;for(k in l){m=l[k];if(m==null||g.isFunction(m)||k in c||(/scrollbar/).test(k)||(!(/color/i).test(k)&&isNaN(parseFloat(m)))){delete l[k]}}return l}function h(k,m){var n={_:0},l;for(l in m){if(k[l]!=m[l]){n[l]=m[l]}}return n}g.effects.animateClass=function(k,l,n,m){if(g.isFunction(n)){m=n;n=null}return this.each(function(){var r=g(this),o=r.attr("style")||" ",s=b(f.call(this)),q,p=r.attr("className");g.each(e,function(t,u){if(k[u]){r[u+"Class"](k[u])}});q=b(f.call(this));r.attr("className",p);r.animate(h(s,q),l,n,function(){g.each(e,function(t,u){if(k[u]){r[u+"Class"](k[u])}});if(typeof r.attr("style")=="object"){r.attr("style").cssText="";r.attr("style").cssText=o}else{r.attr("style",o)}if(m){m.apply(this,arguments)}})})};g.fn.extend({_addClass:g.fn.addClass,addClass:function(l,k,n,m){return k?g.effects.animateClass.apply(this,[{add:l},k,n,m]):this._addClass(l)},_removeClass:g.fn.removeClass,removeClass:function(l,k,n,m){return k?g.effects.animateClass.apply(this,[{remove:l},k,n,m]):this._removeClass(l)},_toggleClass:g.fn.toggleClass,toggleClass:function(m,l,k,o,n){if(typeof l=="boolean"||l===undefined){if(!k){return this._toggleClass(m,l)}else{return g.effects.animateClass.apply(this,[(l?{add:m}:{remove:m}),k,o,n])}}else{return g.effects.animateClass.apply(this,[{toggle:m},l,k,o])}},switchClass:function(k,m,l,o,n){return g.effects.animateClass.apply(this,[{add:m,remove:k},l,o,n])}});g.extend(g.effects,{version:"1.8a2",save:function(l,m){for(var k=0;k<m.length;k++){if(m[k]!==null){l.data("ec.storage."+m[k],l[0].style[m[k]])}}},restore:function(l,m){for(var k=0;k<m.length;k++){if(m[k]!==null){l.css(m[k],l.data("ec.storage."+m[k]))}}},setMode:function(k,l){if(l=="toggle"){l=k.is(":hidden")?"show":"hide"}return l},getBaseline:function(l,m){var n,k;switch(l[0]){case"top":n=0;break;case"middle":n=0.5;break;case"bottom":n=1;break;default:n=l[0]/m.height}switch(l[1]){case"left":k=0;break;case"center":k=0.5;break;case"right":k=1;break;default:k=l[1]/m.width}return{x:k,y:n}},createWrapper:function(k){if(k.parent().is(".ui-effects-wrapper")){return k.parent()}var l={width:k.outerWidth(true),height:k.outerHeight(true),"float":k.css("float")},m=g("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});k.wrap(m);if(k.css("position")=="static"){m.css({position:"relative"});k.css({position:"relative"})}else{g.extend(l,{position:k.css("position"),zIndex:k.css("z-index")});g.each(["top","left","bottom","right"],function(n,o){l[o]=k.css(o);if(isNaN(parseInt(l[o],10))){l[o]="auto"}});k.css({position:"relative",top:0,left:0})}return m.css(l).show()},removeWrapper:function(k){if(k.parent().is(".ui-effects-wrapper")){return k.parent().replaceWith(k)}return k},setTransition:function(l,n,k,m){m=m||{};g.each(n,function(p,o){unit=l.cssUnit(o);if(unit[0]>0){m[o]=unit[0]*k+unit[1]}});return m}});function d(l,k,m,n){if(typeof l=="object"){n=k;m=null;k=l;l=k.effect}if(g.isFunction(k)){n=k;m=null;k={}}if(typeof k=="number"){n=m;m=k;k={}}k=k||{};m=m||k.duration;m=g.fx.off?0:typeof m=="number"?m:g.fx.speeds[m]||g.fx.speeds._default;n=n||k.complete;return[l,k,m,n]}g.fn.extend({effect:function(n,m,p,q){var l=d.apply(this,arguments),o={options:l[1],duration:l[2],callback:l[3]},k=g.effects[n];return k&&!g.fx.off?k.call(this,o):this},_show:g.fn.show,show:function(l){if(!l||typeof l=="number"||g.fx.speeds[l]){return this._show.apply(this,arguments)}else{var k=d.apply(this,arguments);k[1].mode="show";return this.effect.apply(this,k)}},_hide:g.fn.hide,hide:function(l){if(!l||typeof l=="number"||g.fx.speeds[l]){return this._hide.apply(this,arguments)}else{var k=d.apply(this,arguments);k[1].mode="hide";return this.effect.apply(this,k)}},__toggle:g.fn.toggle,toggle:function(l){if(!l||typeof l=="number"||g.fx.speeds[l]||typeof l=="boolean"||g.isFunction(l)){return this.__toggle.apply(this,arguments)}else{var k=d.apply(this,arguments);k[1].mode="toggle";return this.effect.apply(this,k)}},cssUnit:function(k){var l=this.css(k),m=[];g.each(["em","px","%","pt"],function(n,o){if(l.indexOf(o)>0){m=[parseFloat(l),o]}});return m}});g.easing.jswing=g.easing.swing;g.extend(g.easing,{def:"easeOutQuad",swing:function(l,m,k,o,n){return g.easing[g.easing.def](l,m,k,o,n)},easeInQuad:function(l,m,k,o,n){return o*(m/=n)*m+k},easeOutQuad:function(l,m,k,o,n){return-o*(m/=n)*(m-2)+k},easeInOutQuad:function(l,m,k,o,n){if((m/=n/2)<1){return o/2*m*m+k}return-o/2*((--m)*(m-2)-1)+k},easeInCubic:function(l,m,k,o,n){return o*(m/=n)*m*m+k},easeOutCubic:function(l,m,k,o,n){return o*((m=m/n-1)*m*m+1)+k},easeInOutCubic:function(l,m,k,o,n){if((m/=n/2)<1){return o/2*m*m*m+k}return o/2*((m-=2)*m*m+2)+k},easeInQuart:function(l,m,k,o,n){return o*(m/=n)*m*m*m+k},easeOutQuart:function(l,m,k,o,n){return-o*((m=m/n-1)*m*m*m-1)+k},easeInOutQuart:function(l,m,k,o,n){if((m/=n/2)<1){return o/2*m*m*m*m+k}return-o/2*((m-=2)*m*m*m-2)+k},easeInQuint:function(l,m,k,o,n){return o*(m/=n)*m*m*m*m+k},easeOutQuint:function(l,m,k,o,n){return o*((m=m/n-1)*m*m*m*m+1)+k},easeInOutQuint:function(l,m,k,o,n){if((m/=n/2)<1){return o/2*m*m*m*m*m+k}return o/2*((m-=2)*m*m*m*m+2)+k},easeInSine:function(l,m,k,o,n){return-o*Math.cos(m/n*(Math.PI/2))+o+k},easeOutSine:function(l,m,k,o,n){return o*Math.sin(m/n*(Math.PI/2))+k},easeInOutSine:function(l,m,k,o,n){return-o/2*(Math.cos(Math.PI*m/n)-1)+k},easeInExpo:function(l,m,k,o,n){return(m==0)?k:o*Math.pow(2,10*(m/n-1))+k},easeOutExpo:function(l,m,k,o,n){return(m==n)?k+o:o*(-Math.pow(2,-10*m/n)+1)+k},easeInOutExpo:function(l,m,k,o,n){if(m==0){return k}if(m==n){return k+o}if((m/=n/2)<1){return o/2*Math.pow(2,10*(m-1))+k}return o/2*(-Math.pow(2,-10*--m)+2)+k},easeInCirc:function(l,m,k,o,n){return-o*(Math.sqrt(1-(m/=n)*m)-1)+k},easeOutCirc:function(l,m,k,o,n){return o*Math.sqrt(1-(m=m/n-1)*m)+k},easeInOutCirc:function(l,m,k,o,n){if((m/=n/2)<1){return-o/2*(Math.sqrt(1-m*m)-1)+k}return o/2*(Math.sqrt(1-(m-=2)*m)+1)+k},easeInElastic:function(l,n,k,u,r){var o=1.70158;var q=0;var m=u;if(n==0){return k}if((n/=r)==1){return k+u}if(!q){q=r*0.3}if(m<Math.abs(u)){m=u;var o=q/4}else{var o=q/(2*Math.PI)*Math.asin(u/m)}return-(m*Math.pow(2,10*(n-=1))*Math.sin((n*r-o)*(2*Math.PI)/q))+k},easeOutElastic:function(l,n,k,u,r){var o=1.70158;var q=0;var m=u;if(n==0){return k}if((n/=r)==1){return k+u}if(!q){q=r*0.3}if(m<Math.abs(u)){m=u;var o=q/4}else{var o=q/(2*Math.PI)*Math.asin(u/m)}return m*Math.pow(2,-10*n)*Math.sin((n*r-o)*(2*Math.PI)/q)+u+k},easeInOutElastic:function(l,n,k,u,r){var o=1.70158;var q=0;var m=u;if(n==0){return k}if((n/=r/2)==2){return k+u}if(!q){q=r*(0.3*1.5)}if(m<Math.abs(u)){m=u;var o=q/4}else{var o=q/(2*Math.PI)*Math.asin(u/m)}if(n<1){return-0.5*(m*Math.pow(2,10*(n-=1))*Math.sin((n*r-o)*(2*Math.PI)/q))+k}return m*Math.pow(2,-10*(n-=1))*Math.sin((n*r-o)*(2*Math.PI)/q)*0.5+u+k},easeInBack:function(l,m,k,p,o,n){if(n==undefined){n=1.70158}return p*(m/=o)*m*((n+1)*m-n)+k},easeOutBack:function(l,m,k,p,o,n){if(n==undefined){n=1.70158}return p*((m=m/o-1)*m*((n+1)*m+n)+1)+k},easeInOutBack:function(l,m,k,p,o,n){if(n==undefined){n=1.70158}if((m/=o/2)<1){return p/2*(m*m*(((n*=(1.525))+1)*m-n))+k}return p/2*((m-=2)*m*(((n*=(1.525))+1)*m+n)+2)+k},easeInBounce:function(l,m,k,o,n){return o-g.easing.easeOutBounce(l,n-m,0,o,n)+k},easeOutBounce:function(l,m,k,o,n){if((m/=n)<(1/2.75)){return o*(7.5625*m*m)+k}else{if(m<(2/2.75)){return o*(7.5625*(m-=(1.5/2.75))*m+0.75)+k}else{if(m<(2.5/2.75)){return o*(7.5625*(m-=(2.25/2.75))*m+0.9375)+k}else{return o*(7.5625*(m-=(2.625/2.75))*m+0.984375)+k}}}},easeInOutBounce:function(l,m,k,o,n){if(m<n/2){return g.easing.easeInBounce(l,m*2,0,o,n)*0.5+k}return g.easing.easeOutBounce(l,m*2-n,0,o,n)*0.5+o*0.5+k}})})(jQuery);

// jQuery-effects-transfer minified
(function(A){A.effects.transfer=function(B){return this.queue(function(){var E=A(this);var G=A.effects.setMode(E,B.options.mode||"effect");var F=A(B.options.to);var C=E.offset();var D=A('<div class="ui-effects-transfer"></div>').appendTo(document.body);if(B.options.className){D.addClass(B.options.className)}D.addClass(B.options.className);D.css({top:C.top,left:C.left,height:E.outerHeight()-parseInt(D.css("borderTopWidth"))-parseInt(D.css("borderBottomWidth")),width:E.outerWidth()-parseInt(D.css("borderLeftWidth"))-parseInt(D.css("borderRightWidth")),position:"absolute"});C=F.offset();animation={top:C.top,left:C.left,height:F.outerHeight()-parseInt(D.css("borderTopWidth"))-parseInt(D.css("borderBottomWidth")),width:F.outerWidth()-parseInt(D.css("borderLeftWidth"))-parseInt(D.css("borderRightWidth"))};D.animate(animation,B.duration,B.options.easing,function(){D.remove();if(B.callback){B.callback.apply(E[0],arguments)}E.dequeue()})})}})(jQuery);

function AddToCartSucceeded(result, id) {
    var returned = result.d.split('|');
    $("#orderTotal").text(returned[1]);
    $("#numItemsInOrder").text(returned[0]);
    $(id).addClass("buttonTick");
    $(id).text("Added");
}

function AddToCartFailed(result) {
    //alert(result.status + ' ' + result.statusText);
    alert("Sorry, there was a problem adding this product to your cart.\n" + result.statusText);
}
function callback() {
    setTimeout(function() {
        $("#yourOrder:hidden").removeAttr('style').hide().fadeIn();
    }, 1000);
};

jQuery(document).ready(function($) {
    // Add to cart
    $(".addBtn").click(function() {

        var prod = $(this).parent('.pro');
        var prodId = prod.attr('id').split('_')[1];
        var qty = prod.children(".qty").val();
        var options = prod.children("#opt_" + prodId).val();
        var username = $(".username").val();
        var addId = $(this).attr('id');
        var nId = prod.children(".n").attr('id');
        $(this).effect("transfer", { to: $("#yourOrder") }, 900);

        //does this product have options?
        if (options != "-1") {
            //now check that quantity is between 1 and 99
            if (qty > 0 && qty < 100) {
                $(this).text("Adding...");
                $("#" + nId).addClass("n1");
                $("#" + nId).html("<img src=/images/mini-loader.gif align=left style=float:left /><br/>");
                $(this).removeClass("buttonTick");
                $("#orderTotal").text("Adding...");
                $.ajax({
                    type: "POST",
                    url: "/AddToCart.aspx/Add",
                    contentType: "application/json; charset=utf-8",
                    data: "{ productId: " + prodId + ", quantity: " + qty + ", username: '" + username + "', options: '" + options + "' }",
                    dataType: "json",
                    success: function(data) {
                        var returned = data.d.split('|');
                        if (returned[0] != "Sorry, this product is not in stock.") {
                            $("#orderTotal").text(returned[1]);
                            $("#numItemsInOrder").text(returned[0]);
                            $("#" + addId).addClass("buttonTick");
                            $("#" + addId).text("Added");
                            $(".n").html("<a href=\"/my-order.aspx\" class=\"checkout\">Checkout</a>&nbsp;" + returned[0]);
                            $("#n_" + prodId).addClass("n1");
                            $("#fn_" + prodId).addClass("n1");
                            //$("#fn_" + prodId).html("<a href=\"/my-order.aspx\" class=\"checkout\">Checkout</a>&nbsp;" + returned[0]);
                            $("#" + addId).tooltip({
                                bodyHandler: function() {
                                    return 'This item is in your order.  Click the button again to add more of this to your order.';
                                },
                                showURL: false,
                                fade: 250,
                                track: true,
                                delay: 0
                            });


                            $("#yourOrder").css("background-image", "none")
                            .animate({
                                backgroundColor: "#ffff80"
                            }, 500)
                            .animate({ backgroundColor: "#e5e3e4" }, 1000);
                            $(".n1").css("background-image", "none")
                            .animate({
                                backgroundColor: "#ffff80"
                            }, 500)
                            .animate({ backgroundColor: "#ffffff" }, 1000);
                            var options = { to: "#yourOrder", className: 'ui-effects-transfer' };
                            //$(this).effect("transfer", options, 500, callback);
                            //$(this).effect("transfer", { to: $("#yourOrder") }, 1000);
                            //$(this).effect("transfer", { to: $(".red") }, 1000);
                        }
                        else {
                            $("#" + addId).addClass("buttonBlack");
                            $("#" + addId).text("Out of Stock");
                            $("#n_" + prodId).html(returned[0]);
                            $("#fn_" + prodId).html(returned[0]);
                            $("#n_" + prodId).addClass("n1");
                            $("#fn_" + prodId).addClass("n1");
                            //$("#fn_" + prodId).html("<a href=\"/my-order.aspx\" class=\"checkout\">Checkout</a>&nbsp;" + returned[0]);
                            $("#" + addId).tooltip({
                                bodyHandler: function() {
                                    return 'This item is NOT IN STOCK - sorry, you cannot add it to your order.';
                                },
                                showURL: false,
                                fade: 250,
                                track: true,
                                delay: 0
                            });
                            $(".n1").css("background-image", "none")
                            .animate({
                                backgroundColor: "#ffff80"
                            }, 500)
                            .animate({ backgroundColor: "#ffffff" }, 1000);
                            $("#orderTotal").text(returned[1]);
                        }


                    },
                    error: AddToCartFailed
                });
            }
            else {
                alert("Quantity must be a number between 1 and 99\nPlease contact us for bulk orders.");
            }
        }
        else {
            alert("Please select a " + ($("#opt_" + prodId + " option:first-child").text()).toUpperCase().replace("...", "") + " option from the dropdown menu!");
        }
    });

    $("a.popupHelp").fancybox(
    {
        // Change as necessary
        frameHeight: 200,
        padding: 0
    });
    $("a.addButton").tooltip({
        bodyHandler: function() {
            return 'Click to add this item to your order and continue shopping';
        },
        showURL: false,
        fade: 250,
        track: true,
        delay: 0
    });

    $(".addBtn").tooltip({
        bodyHandler: function() {
            return 'Click to add this item to your order and continue shopping';
        },
        showURL: false,
        fade: 250,
        track: true,
        delay: 0
    });
    $(".buttonTick").tooltip({
        bodyHandler: function() {
            return 'This item is in your order.  Click the button again to add more of this to your order.';
        },
        showURL: false,
        fade: 250,
        track: true,
        delay: 0
    });
    $("a#checkoutButton").tooltip({
        bodyHandler: function() {
            return 'Click to check out';
        },
        showURL: false,
        fade: 250,
        track: true,
        delay: 0
    });
    $("a.signupButton").tooltip({
        bodyHandler: function() {
            return 'Sign up to the blackmarket.co.nz e-alert';
        },
        showURL: false,
        fade: 250,
        track: true,
        delay: 0
    });
    $("a.removeButton").tooltip({
        bodyHandler: function() {
            return 'This removes you from the blackmarket.co.nz e-alert';
        },
        showURL: false,
        fade: 250,
        track: true,
        delay: 0,
        extraClass: "tooltipBlack"
    });
    $("a.checkoutLoginButton").tooltip({
        bodyHandler: function() {
            return 'Logging in is optional';
        },
        showURL: false,
        fade: 250,
        track: true,
        delay: 0,
        extraClass: "tooltipBlack"
    });

    $("#whySignUp").tooltip({
        bodyHandler: function () {
            return 'Register once with e-alert and we will email you weekly regarding new deals. <br /><br />All wine and coffee deals at blackmarket.co.nz come with a full money back guarantee.';
        },
        showURL: false,
        fade: 250,
        track: true,
        delay: 0
    });
    $("#headerTopRight #vipText").tooltip({
        bodyHandler: function () {
            return '\<p\>blackmarket.co.nz has recognised you as a VIP member which will enable you access to our free calling service.\</p\>\<p class="bold largerText"\>0800 b market (0800 2 627538)\</p\>\<p\>We look forward to hearing from you.\</p\>\<p\>Kind regards, blackmarket.co.nz\</p\>';
        },
        showURL: false,
        fade: 250,
        track: true,
        delay: 0,
        extraClass: "tooltipMedium"
    });
    
    $(".myAccount").tooltip({
        bodyHandler: function() {
            return 'View and edit your personal info and order history';
        },
        showURL: false,
        fade: 250,
        track: true,
        delay: 0
    });

    $(".myCurrentOrder").tooltip({
        bodyHandler: function() {
            return 'View the items in your current order, and checkout to submit your order';
        },
        showURL: false,
        fade: 250,
        track: true,
        delay: 0
    });

    // Switch the "Open" and "Close" state per click
    $("#mainLinksToggleButton").toggle(function() {
        $(this).text("Hide menu");
    }, function() {
        $(this).text("Show menu");
    });

    // Set the height of the area (If not IE7)
    if ($.browser.version != "7.0") {
        $(".mainLinksDynamicArea").height($(".mainLinksDynamicArea").height());
    }

    // Slide up and down on click
    $(".toggleMe").click(function() {
        $(".mainLinksDynamicArea").slideToggle("slow");
    });

    //highlight e-alert
    $(".eAlertLink").click(function() {
        $('html, body').animate({
            scrollTop: $("#eAlertTop").offset().top
        }, 1000);
        $("#eAlert").css("background-image", "none")
        .animate({
            backgroundColor: "#ffff80"
        }, 1000)
        .animate({ backgroundColor: "#e5e3e4" }, 750);
        $(".firstName").focus();
    });


    $(".thanksForRegistering").css("background-image", "none")
        .animate({
            backgroundColor: "#ffff80"
        }, 1000)
        .animate({ backgroundColor: "#ffffff" }, 750);


    $('#messageBoardList').bxSlider({
        mode: 'slide',
        speed: 1000,
        pause: 5000,
        auto: true,
        controls: true,
        width: 736,
        auto_direction: 'left',
        prev_img: '/images/arrow-left.png',
        next_img: '/images/arrow-right.png',
        wrapper_class: 'messageBoardWrapper'
    });
    $("a.iframe").fancybox(
            {
                // Change as necessary
                frameHeight: 460,
                hideOnContentClick: false,
                padding: 0
            });
});

function hideLayer(divId) {
    if (document.layers) {
        document.layers[divId].visibility = "hide";
    }
    else if (document.getElementById) {
        var obj = document.getElementById(divId);
        obj.style.visibility = "hidden";
    }
    else if (document.all) {
        document.all[divId].style.visibility = "hidden";
    }
    return false;
}

function CheckDropDow(sender, args) {
    if (args.Value == "Select One")
        args.IsValid = false;
    else
        args.IsValid = true;
}