/*
 *
 *	Copyright Crysandrea 2011
 *	Version 1.1.2
 *
 *	Authors: Alex Bor, Tyler Diaz	
 *
 * 	All plugins not made by Crysandrea have been given their propper credits
 *	
 *
 *
*/

/*
 * jQuery Tools 1.2.3 - The missing UI library for the Web
 * 
 * [tooltip]
*/
(function(d){d.tools=d.tools||{};d.tools.tabs={version:"1.0.4",conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",api:false,rotate:false},addEffect:function(e,f){c[e]=f}};var c={"default":function(f,e){this.getPanes().hide().eq(f).show();e.call()},fade:function(g,e){var f=this.getConf(),j=f.fadeOutSpeed,h=this.getPanes();if(j){h.fadeOut(j)}else{h.hide()}h.eq(g).fadeIn(f.fadeInSpeed,e)},slide:function(f,e){this.getPanes().slideUp(200);this.getPanes().eq(f).slideDown(400,e)},ajax:function(f,e){this.getPanes().eq(0).load(this.getTabs().eq(f).attr("href"),e)}};var b;d.tools.tabs.addEffect("horizontal",function(f,e){if(!b){b=this.getPanes().eq(0).width()}this.getCurrentPane().animate({width:0},function(){d(this).hide()});this.getPanes().eq(f).animate({width:b},function(){d(this).show();e.call()})});function a(g,h,f){var e=this,j=d(this),i;d.each(f,function(k,l){if(d.isFunction(l)){j.bind(k,l)}});d.extend(this,{click:function(k,n){var o=e.getCurrentPane();var l=g.eq(k);if(typeof k=="string"&&k.replace("#","")){l=g.filter("[href*="+k.replace("#","")+"]");k=Math.max(g.index(l),0)}if(f.rotate){var m=g.length-1;if(k<0){return e.click(m,n)}if(k>m){return e.click(0,n)}}if(!l.length){if(i>=0){return e}k=f.initialIndex;l=g.eq(k)}if(k===i){return e}n=n||d.Event();n.type="onBeforeClick";j.trigger(n,[k]);if(n.isDefaultPrevented()){return}c[f.effect].call(e,k,function(){n.type="onClick";j.trigger(n,[k])});n.type="onStart";j.trigger(n,[k]);if(n.isDefaultPrevented()){return}i=k;g.removeClass(f.current);l.addClass(f.current);return e},getConf:function(){return f},getTabs:function(){return g},getPanes:function(){return h},getCurrentPane:function(){return h.eq(i)},getCurrentTab:function(){return g.eq(i)},getIndex:function(){return i},next:function(){return e.click(i+1)},prev:function(){return e.click(i-1)},bind:function(k,l){j.bind(k,l);return e},onBeforeClick:function(k){return this.bind("onBeforeClick",k)},onClick:function(k){return this.bind("onClick",k)},unbind:function(k){j.unbind(k);return e}});g.each(function(k){d(this).bind(f.event,function(l){e.click(k,l);return false})});if(location.hash){e.click(location.hash)}else{if(f.initialIndex===0||f.initialIndex>0){e.click(f.initialIndex)}}h.find("a[href^=#]").click(function(k){e.click(d(this).attr("href"),k)})}d.fn.tabs=function(i,f){var g=this.eq(typeof f=="number"?f:0).data("tabs");if(g){return g}if(d.isFunction(f)){f={onBeforeClick:f}}var h=d.extend({},d.tools.tabs.conf),e=this.length;f=d.extend(h,f);this.each(function(l){var j=d(this);var k=j.find(f.tabs);if(!k.length){k=j.children()}var m=i.jquery?i:j.children(i);if(!m.length){m=e==1?d(i):j.parent().find(i)}g=new a(k,m,f);j.data("tabs",g)});return f.api?g:this}})(jQuery);
 /*
 * TipTip
 * Copyright 2010 Drew Wilson
 * www.drewwilson.com
 * code.drewwilson.com/entry/tiptip-jquery-plugin
 *
 * Version 1.3   -   Updated: Mar. 23, 2010
 *
 * This Plug-In will create a custom tooltip to replace the default
 * browser tooltip. It is extremely lightweight and very smart in
 * that it detects the edges of the browser window and will make sure
 * the tooltip stays within the current window size. As a result the
 * tooltip will adjust itself to be displayed above, below, to the left 
 * or to the right depending on what is necessary to stay within the
 * browser window. It is completely customizable as well via CSS.
 *
 * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder" style="max-width:'+opts.maxWidth+';"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)<parseInt($(window).scrollLeft());var left_compare=(tip_w+left)>parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery);
/*
 * jQuery Color Animations
 * Copyright 2007-2010 John Resig
 * Released under the MIT and GPL licenses.
 */
(function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(!g.colorInit){g.start=c(g.elem,e);g.end=b(g.end);g.colorInit=true}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}if(e=/rgba\(0, 0, 0, 0\)/.exec(f)){return a.transparent}return a[d.trim(f).toLowerCase()]}function c(g,e){var f;do{f=d.curCSS(g,e);if(f!=""&&f!="transparent"||d.nodeName(g,"body")){break}e="backgroundColor"}while(g=g.parentNode);return b(f)}var a={transparent:[255,255,255]}})(jQuery);
/* 
 * http://keith-wood.name/countdown.html
 * Countdown for jQuery v1.4.2.
 * Written by Keith Wood (kbwood{at}iinet.com.au) January 2008.
 * Released under the MIT and GPL licenses.
*/
(function(f){function o(){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"],timeSeparator:":",isRTL:false};this._defaults={until:null,since:null,timezone:null,format:"dHMS",layout:"",compact:false,description:"",expiryUrl:"",expiryText:"",alwaysExpire:false,onExpiry:null,onTick:null};f.extend(this._defaults,this.regional[""])}function p(a,b){f.extend(a,
       b);for(var c in b)if(b[c]==null)a[c]=null;return a}f.extend(o.prototype,{markerClassName:"hasCountdown",_timer:setInterval(function(){f.countdown._updateTargets()},980),_timerTargets:[],setDefaults:function(a){this._resetExtraLabels(this._defaults,a);p(this._defaults,a||{})},UTCDate:function(a,b,c,d,g,e,k,j){if(typeof b=="object"&&b.constructor==Date){j=b.getMilliseconds();k=b.getSeconds();e=b.getMinutes();g=b.getHours();d=b.getDate();c=b.getMonth();b=b.getFullYear()}var h=new Date;h.setUTCFullYear(b);
       h.setUTCDate(1);h.setUTCMonth(c||0);h.setUTCDate(d||1);h.setUTCHours(g||0);h.setUTCMinutes((e||0)-(Math.abs(a)<30?a*60:a));h.setUTCSeconds(k||0);h.setUTCMilliseconds(j||0);return h},_attachCountdown:function(a,b){var c=f(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName);c={options:f.extend({},b),_periods:[0,0,0,0,0,0,0]};f.data(a,"countdown",c);this._changeCountdown(a)}},_addTarget:function(a){this._hasTarget(a)||this._timerTargets.push(a)},_hasTarget:function(a){return f.inArray(a,
       this._timerTargets)>-1},_removeTarget:function(a){this._timerTargets=f.map(this._timerTargets,function(b){return b==a?null:b})},_updateTargets:function(){for(var a=0;a<this._timerTargets.length;a++)this._updateCountdown(this._timerTargets[a])},_updateCountdown:function(a,b){var c=f(a);if(b=b||f.data(a,"countdown")){c.html(this._generateHTML(b));c[(this._get(b,"isRTL")?"add":"remove")+"Class"]("countdown_rtl");if(c=this._get(b,"onTick"))c.apply(a,[b._hold!="lap"?b._periods:this._calculatePeriods(b,
       b._show,new Date)]);if(b._hold!="pause"&&(b._since?b._now.getTime()<=b._since.getTime():b._now.getTime()>=b._until.getTime())&&!b._expiring){b._expiring=true;if(this._hasTarget(a)||this._get(b,"alwaysExpire")){this._removeTarget(a);(c=this._get(b,"onExpiry"))&&c.apply(a,[]);if(c=this._get(b,"expiryText")){var d=this._get(b,"layout");b.options.layout=c;this._updateCountdown(a,b);b.options.layout=d}if(c=this._get(b,"expiryUrl"))window.location=c}b._expiring=false}else b._hold=="pause"&&this._removeTarget(a);
       f.data(a,"countdown",b)}},_changeCountdown:function(a,b,c){b=b||{};if(typeof b=="string"){var d=b;b={};b[d]=c}if(c=f.data(a,"countdown")){this._resetExtraLabels(c.options,b);p(c.options,b);this._adjustSettings(c);f.data(a,"countdown",c);b=new Date;if(c._since&&c._since<b||c._until&&c._until>b)this._addTarget(a);this._updateCountdown(a,c)}},_resetExtraLabels:function(a,b){var c=false;for(var d in b)if(d.match(/[Ll]abels/)){c=true;break}if(c)for(d in a)if(d.match(/[Ll]abels[0-9]/))a[d]=null},_destroyCountdown:function(a){var b=
       f(a);if(b.hasClass(this.markerClassName)){this._removeTarget(a);b.removeClass(this.markerClassName).empty();f.removeData(a,"countdown")}},_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=f.data(a,"countdown");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;f.data(a,"countdown",c);this._updateCountdown(a,c)}},_getTimesCountdown:function(a){a=f.data(a,"countdown");return!a?null:!a._hold?a._periods:this._calculatePeriods(a,a._show,new Date)},_get:function(a,b){return a.options[b]!=null?a.options[b]:f.countdown._defaults[b]},_adjustSettings:function(a){var b=new Date,c=this._get(a,"timezone");
       c=c==null?-(new Date).getTimezoneOffset():c;a._since=this._get(a,"since");if(a._since)a._since=this.UTCDate(c,this._determineTime(a._since,null));a._until=this.UTCDate(c,this._determineTime(this._get(a,"until"),b));a._show=this._determineShow(a)},_determineTime:function(a,b){var c=function(g){var e=new Date;e.setTime(e.getTime()+g*1E3);return e},d=function(g){g=g.toLowerCase();var e=new Date,k=e.getFullYear(),j=e.getMonth(),h=e.getDate(),i=e.getHours(),l=e.getMinutes();e=e.getSeconds();for(var n=
       /([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g,m=n.exec(g);m;){switch(m[2]||"s"){case "s":e+=parseInt(m[1],10);break;case "m":l+=parseInt(m[1],10);break;case "h":i+=parseInt(m[1],10);break;case "d":h+=parseInt(m[1],10);break;case "w":h+=parseInt(m[1],10)*7;break;case "o":j+=parseInt(m[1],10);h=Math.min(h,f.countdown._getDaysInMonth(k,j));break;case "y":k+=parseInt(m[1],10);h=Math.min(h,f.countdown._getDaysInMonth(k,j));break}m=n.exec(g)}return new Date(k,j,h,i,l,e,0)};(c=a==null?b:typeof a=="string"?d(a):typeof a==
       "number"?c(a):a)&&c.setMilliseconds(0);return c},_getDaysInMonth:function(a,b){return 32-(new Date(a,b,32)).getDate()},_generateHTML:function(a){a._periods=periods=a._hold?a._periods:this._calculatePeriods(a,a._show,new Date);for(var b=false,c=0,d=0;d<a._show.length;d++){b|=a._show[d]=="?"&&periods[d]>0;a._show[d]=a._show[d]=="?"&&!b?null:a._show[d];c+=a._show[d]?1:0}b=this._get(a,"compact");d=this._get(a,"layout");var g=b?this._get(a,"compactLabels"):this._get(a,"labels"),e=this._get(a,"timeSeparator"),
       k=this._get(a,"description")||"",j=function(i){var l=f.countdown._get(a,"compactLabels"+periods[i]);return a._show[i]?periods[i]+(l?l[i]:g[i])+" ":""},h=function(i){var l=f.countdown._get(a,"labels"+periods[i]);return a._show[i]?'<span class="countdown_section"><span class="countdown_amount">'+periods[i]+"</span><br/>"+(l?l[i]:g[i])+"</span>":""};return d?this._buildLayout(a,d,b):(b?'<span class="countdown_row countdown_amount'+(a._hold?" countdown_holding":"")+'">'+j(0)+j(1)+j(2)+j(3)+(a._show[4]?
       this._minDigits(periods[4],2):"")+(a._show[5]?(a._show[4]?e:"")+this._minDigits(periods[5],2):"")+(a._show[6]?(a._show[4]||a._show[5]?e:"")+this._minDigits(periods[6],2):""):'<span class="countdown_row countdown_show'+c+(a._hold?" countdown_holding":"")+'">'+h(0)+h(1)+h(2)+h(3)+h(4)+h(5)+h(6))+"</span>"+(k?'<span class="countdown_row countdown_descr">'+k+"</span>":"")},_buildLayout:function(a,b,c){var d=this._get(a,c?"compactLabels":"labels"),g=function(j){return(f.countdown._get(a,(c?"compactLabels":
       "labels")+a._periods[j])||d)[j]},e=function(j,h){return Math.floor(j/h)%10};g={desc:this._get(a,"description"),sep:this._get(a,"timeSeparator"),yl:g(0),yn:a._periods[0],ynn:this._minDigits(a._periods[0],2),ynnn:this._minDigits(a._periods[0],3),y1:e(a._periods[0],1),y10:e(a._periods[0],10),y100:e(a._periods[0],100),ol:g(1),on:a._periods[1],onn:this._minDigits(a._periods[1],2),onnn:this._minDigits(a._periods[1],3),o1:e(a._periods[1],1),o10:e(a._periods[1],10),o100:e(a._periods[1],100),wl:g(2),wn:a._periods[2],
       wnn:this._minDigits(a._periods[2],2),wnnn:this._minDigits(a._periods[2],3),w1:e(a._periods[2],1),w10:e(a._periods[2],10),w100:e(a._periods[2],100),dl:g(3),dn:a._periods[3],dnn:this._minDigits(a._periods[3],2),dnnn:this._minDigits(a._periods[3],3),d1:e(a._periods[3],1),d10:e(a._periods[3],10),d100:e(a._periods[3],100),hl:g(4),hn:a._periods[4],hnn:this._minDigits(a._periods[4],2),hnnn:this._minDigits(a._periods[4],3),h1:e(a._periods[4],1),h10:e(a._periods[4],10),h100:e(a._periods[4],100),ml:g(5),mn:a._periods[5],
       mnn:this._minDigits(a._periods[5],2),mnnn:this._minDigits(a._periods[5],3),m1:e(a._periods[5],1),m10:e(a._periods[5],10),m100:e(a._periods[5],100),sl:g(6),sn:a._periods[6],snn:this._minDigits(a._periods[6],2),snnn:this._minDigits(a._periods[6],3),s1:e(a._periods[6],1),s10:e(a._periods[6],10),s100:e(a._periods[6],100)};var k=b;for(b=0;b<7;b++){e="yowdhms".charAt(b);e=RegExp("\\{"+e+"<\\}(.*)\\{"+e+">\\}","g");k=k.replace(e,a._show[b]?"$1":"")}f.each(g,function(j,h){var i=RegExp("\\{"+j+"\\}","g");
       k=k.replace(i,h)});return k},_minDigits:function(a,b){a="0000000000"+a;return a.substr(a.length-b)},_determineShow:function(a){a=this._get(a,"format");var b=[];b[0]=a.match("y")?"?":a.match("Y")?"!":null;b[1]=a.match("o")?"?":a.match("O")?"!":null;b[2]=a.match("w")?"?":a.match("W")?"!":null;b[3]=a.match("d")?"?":a.match("D")?"!":null;b[4]=a.match("h")?"?":a.match("H")?"!":null;b[5]=a.match("m")?"?":a.match("M")?"!":null;b[6]=a.match("s")?"?":a.match("S")?"!":null;return b},_calculatePeriods:function(a,
       b,c){a._now=c;a._now.setMilliseconds(0);var d=new Date(a._now.getTime());if(a._since&&c.getTime()<a._since.getTime())a._now=c=d;else if(a._since)c=a._since;else{d.setTime(a._until.getTime());if(c.getTime()>a._until.getTime())a._now=c=d}var g=[0,0,0,0,0,0,0];if(b[0]||b[1]){var e=f.countdown._getDaysInMonth(c.getFullYear(),c.getMonth()),k=f.countdown._getDaysInMonth(d.getFullYear(),d.getMonth()),j=d.getDate()==c.getDate()||d.getDate()>=Math.min(e,k)&&c.getDate()>=Math.min(e,k);j=Math.max(0,(d.getFullYear()-
       c.getFullYear())*12+d.getMonth()-c.getMonth()+(d.getDate()<c.getDate()&&!j||j&&(d.getHours()*60+d.getMinutes())*60+d.getSeconds()<(c.getHours()*60+c.getMinutes())*60+c.getSeconds()?-1:0));g[0]=b[0]?Math.floor(j/12):0;g[1]=b[1]?j-g[0]*12:0;j=function(i,l,n){n=i.getDate()==n;var m=f.countdown._getDaysInMonth(i.getFullYear()+l*g[0],i.getMonth()+l*g[1]);i.getDate()>m&&i.setDate(m);i.setFullYear(i.getFullYear()+l*g[0]);i.setMonth(i.getMonth()+l*g[1]);n&&i.setDate(m);return i};if(a._since)d=j(d,-1,k);else c=
       j(new Date(c.getTime()),+1,e)}var h=Math.floor((d.getTime()-c.getTime())/1E3);a=function(i,l){g[i]=b[i]?Math.floor(h/l):0;h-=g[i]*l};a(2,604800);a(3,86400);a(4,3600);a(5,60);a(6,1);return g}});f.fn.countdown=function(a){var b=Array.prototype.slice.call(arguments,1);if(a=="getTimes")return f.countdown["_"+a+"Countdown"].apply(f.countdown,[this[0]].concat(b));return this.each(function(){typeof a=="string"?f.countdown["_"+a+"Countdown"].apply(f.countdown,[this].concat(b)):f.countdown._attachCountdown(this,
       a)})};f.countdown=new o})(jQuery);

/* CRYSANDREA SITE-WIDE SCRIPTS */
var crys = {};
 
$(function() {
	$('.more_navigation a').toggle(function(){
		$('.more_nav').show();
		$('.more_navigation a').html('Less');
		return false;
	}, function(){
		$('.more_nav').hide();
		$('.more_navigation a').html('More');
		return false;
	});
	
//	crys = { 
//		change_palla: function(new_amount){
//			
//		},
//		redirect: function(url){
//			window.location = baseurl+url;
//		}
//	};
	
 	crys.window_obj = $(window);
	crys.window_obj.focus(function(){
		crys.window_focused = true;
	});
	crys.window_obj.blur(function(){
		crys.window_focused = false;
	});
        
});
