/*
 * jQuery Easing v1.3 
 *
 * website	:	http://gsgd.co.uk/sandbox/jquery/easing
 *
*/
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){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;}});

/*
 * jQuery Plugin - PrettyPhoto 2.4.3
 * 
 * website	: 	http://www.no-margin-for-errors.com
 * author	: 	Stephane Caron
*/
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}('t $3;t $12;(9(A){A.3y.3z=9(W){t E=u;t K=y;t O=[];t D=0;t R;t S;t V;t Y;t F="1E";t Z;t M=G();A(z).3A(9(){M=G();C()});A(z).3B(9(){C();U()});A(17).3C(9(c){3D(c.3E){2l 37:4(D==1){11}N("1M");2m;2l 39:4(D==1c){11}N("1Y");2m;2l 27:L();2m}});W=2O.3F({w:"3G",1N:40,1O:0.8,2n:u,2P:u,1Z:"/",2o:"3H",2Q:9(){}},W);4(A.1p.2p&&A.1p.2q==6){W.2o="3I"}A(14).3J(9(){t e=y;t d=y;t f=0;t c=0;O[O.2r]=14;A(14).1q("18",9(){J(14);11 y})});9 J(c){Z=A(c);2R=Z.m("2S");2T=/\\[(?:.*)\\]/;2U=2T.2V(2R);1w=y;1c=0;b();3K(i=0;i<O.2r;i++){4(A(O[i]).m("2S").1d(2U)!=-1){1c++;4(1c>1){1w=u}4(A(O[i]).m("n")==Z.m("n")){D=1c;1x=i}}}X();$3.5("p.2s").2t(D+W.1Z+1c);C();A("#1e").1P();$3.5(".20").2u()}2v=9(f,c,j,h,g,d,e){A(".20").1P();4(A.1p.2W){19=z.2X;15=z.2Y}o{19=A(z).k();15=A(z).l()}$3.5(".2w").2Z({k:g},W.w);1f=M.1a+((19/2)-(h/2));4(1f<0){1f=0+$3.5(".12").k()}$3.2Z({1y:1f,1r:((15/2)-(j/2)),l:j},W.w,9(){$3.l(j);$3.5(".1s,#21").k(c).l(f);$3.5("#1e").1F(W.w,9(){A(14).5("1g,1h").q("1i","23")});I();4(e){A("a.1t,a.1Q").1F(W.w)}})};9 I(){4(1w&&F=="1E"){$3.5(".1s").1F(W.w)}o{$3.5(".1s").1P()}$3.5(".1u").1F(W.w);4(W.2n&&2x){$12.q({1y:$3.30().1y-22,1r:$3.30().1r+(W.1N/2),3L:"3M"});$12.1F(W.w)}}9 Q(){$3.5(".1s,.1u").1z(W.w);$3.5("#1e 1g,#1e 1h").q("1i","1G");$3.5("#1e").1z(W.w,9(){A(".20").2u();a()});$12.1z(W.w)}9 N(c){4(c=="1M"){1x--;D--}o{1x++;D++}4(!E){E=u}Q();A("a.1t,a.1Q").1z(W.w,9(){A(14).1R("1Q").1A("1t")})}9 L(){$3.5("1g,1h").q("1i","1G");A("7.3,7.12").1z(W.w);A("7.1H").1z(W.w,9(){A("7.1H,7.3,7.12").3N();4(A.1p.2p&&A.1p.2q==6){A("31").q("1i","23")}W.2Q()});E=u}9 H(){4(D==1c){$3.5("a.24").q("1i","1G");$3.5("a.25").1A("1I").32("18")}o{$3.5("a.24").q("1i","23");$3.5("a.25.1I").1R("1I").1q("18",9(){N("1Y");11 y})}4(D==1){$3.5("a.26").q("1i","1G");$3.5("a.28").1A("1I").32("18")}o{$3.5("a.26").q("1i","23");$3.5("a.28.1I").1R("1I").1q("18",9(){N("1M");11 y})}$3.5("p.2s").2t(D+W.1Z+1c);Z=(1w)?A(O[1x]):Z;b();4(Z.m("2y")){$3.5(".29").2u().33(34(Z.m("2y")))}o{$3.5(".29").1P().2t("")}4(Z.5("2a").m("35")&&W.2n){2x=u;$12.33(34(Z.5("2a").m("35")))}o{2x=y}}9 P(d,c){2z=y;T(d,c);1B=d;1C=c;19=A(z).k();15=A(z).l();4(((Y>15)||(V>19))&&E&&W.2P&&!K){2z=u;2A=u;3O(2A){4((Y>15)){1B=(15-36);1C=(c/d)*1B}o{4((V>19)){1C=(19-36);1B=(d/c)*1C}o{2A=y}}V=1C;Y=1B}T(1B,1C)}11{l:1B,k:1C,2B:V,2C:Y,2D:R,2E:S,2F:2z}}9 T(d,c){$3.5(".1u").l(d).5(".29").l(d-1j($3.5("a.2G").q("l")));R=c+$3.5(".1u").k()+1j($3.5(".1u").q("3P"))+1j($3.5(".1u").q("3Q"));S=d;V=R+$3.5(".12").k()+$3.5(".38").k()+$3.5(".3a").k();Y=d+W.1N}9 b(){4(Z.m("n").3R(/1S\\.1T\\/3S/i)){F="1S"}o{4(Z.m("n").1d(".3T")!=-1){F="1J"}o{4(Z.m("n").1d(".3U")!=-1){F="2b"}o{4(Z.m("n").1d("1K")!=-1){F="1K"}o{F="1E"}}}}}9 C(){4($3){4($3.3V()==0){11}}o{11}4(A.1p.2W){19=z.2X;15=z.2Y}o{19=A(z).k();15=A(z).l()}4(E){$3b=$3.k();$2H=$3.l();$2I=$12.k();1f=(19/2)+M.1a-($3b/2);4(1f<0){1f=0+$2I}$3.q({1y:1f,1r:(15/2)+M.1k-($2H/2)});$12.q({1y:1f-$2I,1r:(15/2)+M.1k-($2H/2)+(W.1N/2)})}}9 a(){H();4(F=="1E"){1l=2c 2J();3c=2c 2J();4(1w&&D>1c){3c.16=A(O[1x+1]).m("n")}3d=2c 2J();4(1w&&O[1x-1]){3d.16=A(O[1x-1]).m("n")}1b=\'<2a 2K="21" 16="" />\';$3.5("#1e")[0].3e=1b;$3.5(".2w").q("3W","1G");$3.5("#21").m("16",Z.m("n"));1l.3X=9(){t c=P(1l.l,1l.k);1l.l=c.l;1l.k=c.k;2v(1l.l,1l.k,c.2C,c.2B,c.2D,c.2E,c.2F)};1l.16=Z.m("n")}o{1D=(1j(B("l",Z.m("n"))))?B("l",Z.m("n")):"3Y";1v=(1j(B("k",Z.m("n"))))?B("k",Z.m("n")):"3Z";4(1D.1d("%")!=-1||1v.1d("%")!=-1){1v=(A(z).k()*1j(1v)/2d)-2d;1D=(A(z).l()*1j(1D)/2d)-2d;41=u}o{1v=1j(1v);1D=1j(1D)}4(F=="1J"){1v+=13}s=P(1D,1v);4(F=="1S"){1b=\'<1g 2L="2M:3f-3g-3h-3i-3j" l="\'+s.l+\'" k="\'+s.k+\'"><1m 1n="2e" 1o="u" /><1m 1n="2f" 1o="2g" /><1m 1n="3k" 1o="2h://2i.1S.1T/v/\'+B("v",Z.m("n"))+\'" /><1h 16="2h://2i.1S.1T/v/\'+B("v",Z.m("n"))+\'" 2j="3l/x-3m-2b" 2e="u" 2f="2g" l="\'+s.l+\'" k="\'+s.k+\'"></1h></1g>\'}o{4(F=="1J"){1b=\'<1g 2L="2M:42-43-44-45-46" 47="2h://2i.3n.1T/48/49.4a" k="\'+s.k+\'" l="\'+s.l+\'"><1m 1n="16" 1o="\'+Z.m("n")+\'"><1m 1n="3o" 1o="u"><1m 1n="2j" 1o="3p/1J"><1h 16="\'+Z.m("n")+\'" k="\'+s.k+\'" l="\'+s.l+\'" 3o="u" 2j="3p/1J" 4b="2h://2i.3n.1T/1J/4c/"></1h></1g>\'}o{4(F=="2b"){1U=Z.m("n");1U=1U.3q(Z.m("n").1d("4d")+10,Z.m("n").2r);1L=Z.m("n");1L=1L.3q(0,1L.1d("?"));1b=\'<1g 2L="2M:3f-3g-3h-3i-3j" l="\'+s.l+\'" k="\'+s.k+\'"><1m 1n="2e" 1o="u" /><1m 1n="2f" 1o="2g" /><1m 1n="3k" 1o="\'+1L+"?"+1U+\'" /><1h 16="\'+1L+"?"+1U+\'" 2j="3l/x-3m-2b" 2e="u" 2f="2g" l="\'+s.l+\'" k="\'+s.k+\'"></1h></1g>\'}o{4(F=="1K"){1V=Z.m("n");1V=1V.4e(0,1V.1d("1K")-1);1b=\'<1K 16 ="\'+1V+\'" l="\'+(s.l-10)+\'" k="\'+(s.k-10)+\'" 4f="4g"></1K>\'}}}}$3.5("#1e")[0].3e=1b;2v(s.l,s.k,s.2C,s.2B,s.2D,s.2E,s.2F)}}9 G(){4(2N.3r){1a=2N.3r;1k=2N.4h}o{4(17.2k&&17.2k.1a){1a=17.2k.1a;1k=17.2k.1k}o{4(17.1W){1a=17.1W.1a;1k=17.1W.1k}}}11{1a:1a,1k:1k}}9 U(){A("7.1H").q({k:A(17).k(),l:A(z).l()})}9 X(){1X="";1X+="<7 r=\'1H\'></7>";4(F=="1E"){1b=\'<2a 2K="21" 16="" />\'}o{1b=""}1X+=\'<7 r="3"><7 r="38"><7 r="3s"></7><7 r="3t"></7><7 r="3u"></7></7><7 r="2w"><a n="#" r="1t" 2y="3v 4i 1E">3v</a><7 r="20"></7><7 r="1s"><a r="24" n="#">1Y</a><a r="26" n="#">1M</a></7><7 2K="1e">\'+1b+\'</7><7 r="1u 4j"><a r="2G" n="#">4k</a><p r="29"></p><7 r="3w"><a n="#" r="28">4l</a><p r="2s">0\'+W.1Z+\'0</p><a n="#" r="25">4m</a></7></7></7><7 r="3a"><7 r="3s"></7><7 r="3t"></7><7 r="3u"></7></7></7>\';1X+=\'<7 r="12"></7>\';A("1W").4n(1X);$3=A(".3");$12=A(".12");A("7.1H").q("k",A(17).k()).1q("18",9(){L()});$3.q({1O:0}).1A(W.2o);A("a.2G").1q("18",9(){L();11 y});A("a.1t").1q("18",9(){$14=A(14);4($14.4o("1t")){$14.1R("1t").1A("1Q");E=y}o{$14.1R("1Q").1A("1t");E=u}Q();$3.5(".1s, #1e, .1u").1z(W.w,9(){a()});11 y});$3.5(".26, .28").1q("18",9(){N("1M");11 y});$3.5(".24, .25").1q("18",9(){N("1Y");11 y});$3.5(".1s").q({"4p-1r":W.1N/2});4(!1w){$3.5(".1s,.3w").1P()}4(A.1p.2p&&A.1p.2q==6){A("1W").1A("4q");A("31").q("1i","1G")}A("7.1H").q("1O",0).4r(W.w,W.1O,9(){$3.q("1O",0).1F(W.w,9(){$3.m("4s","1r:"+$3.q("1r")+";1y:"+$3.q("1y")+";");a()})})}};9 B(E,D){E=E.3x(/[\\[]/,"\\\\[").3x(/[\\]]/,"\\\\]");t C="[\\\\?&]"+E+"=([^&#]*)";t G=2c 4t(C);t F=G.2V(D);4(F==4u){11""}o{11 F[1]}}})(2O);',62,279,'|||pp_pic_holder|if|find||div||function|||||||||||height|width|attr|href|else||css|class|correctSizes|var|true||animationSpeed||false|window||||||||||||||||||||||||||||return|ppt||this|windowWidth|src|document|click|windowHeight|scrollTop|pp_typeMarkup|setCount|indexOf|pp_full_res|projectedTop|object|embed|visibility|parseFloat|scrollLeft|imgPreloader|param|name|value|browser|bind|left|pp_hoverContainer|pp_expand|pp_details|movie_height|isSet|arrayPosition|top|fadeOut|addClass|imageWidth|imageHeight|movie_width|image|fadeIn|hidden|pp_overlay|disabled|quicktime|iframe|filename|previous|padding|opacity|hide|pp_contract|removeClass|youtube|com|flash_vars|movie_url|body|toInject|next|counter_separator_label|pp_loaderIcon|fullResImage||visible|pp_next|pp_arrow_next|pp_previous||pp_arrow_previous|pp_description|img|flash|new|100|allowfullscreen|allowscriptaccess|always|http|www|type|documentElement|case|break|showTitle|theme|msie|version|length|currentTextHolder|text|show|showimage|pp_content|hasTitle|title|hasBeenResized|notFitting|containerHeight|containerWidth|contentHeight|contentWidth|resized|pp_close|pWidth|tHeight|Image|id|classid|clsid|self|jQuery|allowresize|callback|theRel|rel|galleryRegExp|theGallery|exec|opera|innerHeight|innerWidth|animate|offset|select|unbind|html|unescape|alt|200||pp_top||pp_bottom|pHeight|nextImage|prevImage|innerHTML|D27CDB6E|AE6D|11cf|96B8|444553540000|movie|application|shockwave|apple|autoplay|video|substring|pageYOffset|pp_left|pp_middle|pp_right|Expand|pp_nav|replace|fn|prettyPhoto|scroll|resize|keypress|switch|keyCode|extend|normal|light_rounded|light_square|each|for|display|none|remove|while|marginTop|marginBottom|match|watch|mov|swf|size|overflow|onload|425|344||parsentBased|02BF25D5|8C17|4B23|BC80|D3488ABDDC6B|codebase|qtactivex|qtplugin|cab|pluginspage|download|flashvars|substr|frameborder|no|pageXOffset|the|clearfix|Close|Previous|Next|append|hasClass|margin|ie6|fadeTo|style|RegExp|null'.split('|'),0,{}))


$(document).ready(function(){
						   
	//splash page animation
	$('#splash a').css({opacity: 0}).hover(
		function(){
			$(this).animate({opacity: 1}, {duration: 500, queue: false});
		},
		function(){
			$(this).animate({opacity: 0}, {duration: 500, queue: false});
		}
	);
	//end of splash animation
	
	//party home page
	function swapImage(){
		$('#party #seasonal .images img:last').animate({opacity: 0, left: 50}, {duration: 1200, easing: 'easeOutQuad', complete:function(){
				$(this).prependTo($(this).parent());
				$(this).css({opacity: 1, left: 0});
				setTimeout(swapImage, 5000);
			}
		});	
	}
	setTimeout(swapImage, 5000);
	//end of party homepage
	
	//items button animation
	$('#equipment #items_small a, #items_large a').css({opacity: 0}).hover(
		function(){
			$(this).animate({opacity: 1}, {duration: 500, queue: false});
		},
		function(){
			$(this).animate({opacity: 0}, {duration: 500, queue: false});
		}
	);
	//end of items button animation
	
	//
	$('#gallery #loader').css({'opacity': 0, 'display': 'block'});
	$('#gallery').attr('title', 'click to enlarge');
	$('#gallery .thumbs a').click(function(){
													  
		$('#gallery #loader').css({'opacity': 0, 'display': 'block'});
		$('#gallery #loader').animate({opacity: 1},{duration:600, queue:false});
		
		var src = $(this).attr('href');	
		var newsrc = '/images/thumb/300,230/' + src.substr(3);		
		
		
		if($('#gallery #preview a[href*="' + src + '"]').length == 0){
			var newimg = new Image();
			newimg.src = newsrc;
			newimg.onload = function(){			
				$('#gallery #loader').animate({'opacity': 0},{duration:300, queue:false, complete: function(){$(this).css('display', 'none');}});
				
				var imglink = $('<a href="' + src + '"></a>');	
				imglink.prettyPhoto({
					animationSpeed			: 'fast',
					padding					: 40,
					opacity					: 0.35,
					showTitle				: false,
					allowresize				: true,
					counter_separator_label	: '/',
					theme					: 'dark_square'
				});
				
				$(imglink).append(newimg).css({opacity: 0});				
				$('#gallery #preview').append(imglink);	
				$(imglink).animate({opacity: 1},{duration:600, queue:false});		
			}		
		}else{
			
			$('#gallery #loader').animate({'opacity': 0},{duration:300, queue:false, complete: function(){$(this).css('display', 'none');}});
			
			var imglink = $('#gallery #preview a[href*="' + src + '"]').eq(0);
			
			if($('#gallery #preview a').index(imglink) == $('#gallery #preview a').length-1) return false;
			$(imglink).css({opacity: 0});		
			$('#gallery #preview').append(imglink);	
			$(imglink).animate({opacity: 1},{duration:600, queue:false});
		}
		return false;		
	});
	//
	
	//prettyphoto
	$("a[rel^='gal']").prettyPhoto({
		animationSpeed: 'fast', /* fast/slow/normal */
		padding: 40, /* padding for each side of the picture */
		opacity: 0.35, /* Value betwee 0 and 1 */
		showTitle: false, /* true/false */
		allowresize: true, /* true/false */
		counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'dark_square' /* light_rounded / dark_rounded / light_square / dark_square */
	});
	//end of prettyphoto
						   
	//construction site homepage products preview						   
	$('#equipment #products-preview p').each(function(){		
		$(this).css({cursor: 'pointer'});
		$link = $(this).find('a').eq(0);
		$link.css({opacity: 0});		
	}).hover(	
		function(){			
			$link = $(this).find('a').eq(0);
			var h = $link.height();			
			$link.animate({top: 176-h, opacity: .9}, {duration: 400, easing: 'easeOutQuad', queue:false});			
		},
		function(){			
			$link = $(this).find('a').eq(0);
			var h = $link.height();			
			$link.animate({top: 192, opacity: 0}, {duration: 300, easing: 'easeInQuad', queue:false});			
		}
	).click(function(){		
		window.location = $(this).find('a').attr('href');		
	});
	//end of products preview
	
	//focus clear fields
	$('.default').each(function(){
		$(this).css({'color' : '#999'});
		var _default = $(this)[0].defaultValue;//document.getElementById($(this).attr('id')).defaultValue;
		$(this).focus(function(){
			$(this).css({'color' : '#000'});
			if($(this).val() == _default){
				$(this).val('');	
			}
		});
		$(this).blur(function(){
			if($(this).val() == ''){
				$(this).val(_default);	
				$(this).css({'color' : '#999'});
			}
		});						
	});
	//end of clear focus
	
	//textarea autogrow
	$('textarea').each(function() {		
		var $this       = $(this),
			minHeight   = $this.height(),
			lineHeight  = $this.css('lineHeight');
		
		var shadow = $('<div></div>').css({
			position:   'absolute',
			top:        -10000,
			left:       -10000,
			width:      $(this).width(),
			fontSize:   $this.css('fontSize'),
			fontFamily: $this.css('fontFamily'),
			lineHeight: $this.css('lineHeight'),
			resize:     'none'
		}).appendTo(document.body);
		
		var update = function() {
			
			var val = this.value.replace(/</g, '&lt;')
								.replace(/>/g, '&gt;')
								.replace(/&/g, '&amp;')
								.replace(/\n/g, '<br/>');
			
			shadow.html(val);
			$(this).css('height', Math.max(shadow.height() + 20, minHeight));
			$(this).css({overflow: 'hidden'});
		}
		
		$(this).change(update).keyup(update).keydown(update);
		
		update.apply(this);		
	});
	//end of textarea autogrow
	
	//simple alert
	$(".alert").animate({opacity: 1}, 3000).animate({opacity: 0 }, {duration: 600, easing: 'easeInQuad'}).animate({height: 0, paddingTop: 0, paddingBottom: 0, borderWidth: 0, marginBottom: 0, marginTop: 0}, {duration: 500, easing: 'easeInQuad', complete: 
		function(){$(this).remove();}
	});
	//end of alert
	
});

