/*
 * jQuery UI Effects 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/
 */
jQuery.effects||(function(d){d.effects={version:"1.7.1",save:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.data("ec.storage."+h[f],g[0].style[h[f]])}}},restore:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.css(h[f],g.data("ec.storage."+h[f]))}}},setMode:function(f,g){if(g=="toggle"){g=f.is(":hidden")?"show":"hide"}return g},getBaseline:function(g,h){var i,f;switch(g[0]){case"top":i=0;break;case"middle":i=0.5;break;case"bottom":i=1;break;default:i=g[0]/h.height}switch(g[1]){case"left":f=0;break;case"center":f=0.5;break;case"right":f=1;break;default:f=g[1]/h.width}return{x:f,y:i}},createWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent()}var g={width:f.outerWidth(true),height:f.outerHeight(true),"float":f.css("float")};f.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(arguments[0].constructor==Function)){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}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]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return -(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f},easeOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return h*Math.pow(2,-10*i)*Math.sin((i*l-j)*(2*Math.PI)/k)+m+f},easeInOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l/2)==2){return f+m}if(!k){k=l*(0.3*1.5)}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}if(i<1){return -0.5*(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f}return h*Math.pow(2,-10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k)*0.5+m+f},easeInBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*(h/=j)*h*((i+1)*h-i)+f},easeOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*((h=h/j-1)*h*((i+1)*h+i)+1)+f},easeInOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}if((h/=j/2)<1){return k/2*(h*h*(((i*=(1.525))+1)*h-i))+f}return k/2*((h-=2)*h*(((i*=(1.525))+1)*h+i)+2)+f},easeInBounce:function(g,h,f,j,i){return j-d.easing.easeOutBounce(g,i-h,0,j,i)+f},easeOutBounce:function(g,h,f,j,i){if((h/=i)<(1/2.75)){return j*(7.5625*h*h)+f}else{if(h<(2/2.75)){return j*(7.5625*(h-=(1.5/2.75))*h+0.75)+f}else{if(h<(2.5/2.75)){return j*(7.5625*(h-=(2.25/2.75))*h+0.9375)+f}else{return j*(7.5625*(h-=(2.625/2.75))*h+0.984375)+f}}}},easeInOutBounce:function(g,h,f,j,i){if(h<i/2){return d.easing.easeInBounce(g,h*2,0,j,i)*0.5+f}return d.easing.easeOutBounce(g,h*2-i,0,j,i)*0.5+j*0.5+f}})})(jQuery);;
/*
 * jQuery UI Effects Slide 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Slide
 *
 * Depends:
 *	effects.core.js
 */
(function(a){a.effects.slide=function(b){return this.queue(function(){var e=a(this),d=["position","top","left"];var i=a.effects.setMode(e,b.options.mode||"show");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e).css({overflow:"hidden"});var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var j=b.options.distance||(f=="top"?e.outerHeight({margin:true}):e.outerWidth({margin:true}));if(i=="show"){e.css(f,c=="pos"?-j:j)}var g={};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;
/*
 * SimpleFlame Content rotator
 * Version 0.2 (28.04.2009)
 * Possible effects to use :
 * - if UI effects have been added: 'blind', 'bounce', 'clip', 'drop', 'explode', 'fold', 'highlight', 'puff', 'pulsate', 'scale', 'shake', 'size', 'slide', 'transfer'
 * - basic effects from jQuery: fadeIn, fadeOut, show, hide, slideUp, slideDown
 */
eval(function(p,a,c,k,e,d){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--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('(5(){6 9=5(R,h){2.3={\'d\':\'z\',\'c\':\'M\',\'S\':1e,\'l\':p,\'t\':\'1r\',\'17\':{},\'C\':\'19\',\'m\':\'1k\',\'Q\':{},\'H\':\'19\'};7.1m(2.3,h);2.$g=7(R);2.12()};9.j.12=5(){2.$g.o(\'w-b\');2.$x=7(\'<1l Z="w-1j" />\');2.$g.1n(2.$x);2.$x.I(2.$g);2.$s=7(\'<1o Z="w-s" />\');2.$x.I(2.$s);2.$b=2.$g.1q(2.3.d);2.$e=2.$b.v(2.$b.1p(\'.\'+2.3.c));8(2.$e<0){2.$e=0}6 4=2;2.$b.o(\'w-d\').X(5(v,d){6 q=7(\'<z><a 1s="#">\'+1c(v+1,10)+\'</a></z>\');4.$s.I(q);q.U(\'a\').G(\'d\',d).1h(\'1g\',{4:4},4.q)});2.y(2.$e,p);8(2.3.l){2.l()}};9.j.q=5(D){D.1d();6 4=D.G.4;4.P();4.$O=p;6 k=4.$b.v(7(2).G(\'d\'));4.y(k)};9.j.y=5(k){6 11=1I[1]||14;6 c=2.3.c;6 i=2.$b.L(2.$e);6 f=2.$b.L(k);6 E=5(){i.N(c)};6 A=5(){f.o(c).Y(\'16\',10)};6 J=[\'1H\',\'1G\',\'1K\',\'1N\',\'1M\',\'1t\',\'1L\',\'1J\',\'1E\',\'1F\',\'1w\',\'1v\',\'1u\',\'1y\'];8(11===p){i.N(c).F();f.o(c).B()}n{8(7.1a(2.3.m,J)>-1){i.F(2.3.m,2.3.Q,2.3.H,E)}n 8(7.13(i[2.3.m])){i[2.3.m](2.3.H,E)}n{15"1b F 18"}f.Y(\'16\',1C);8(7.1a(2.3.t,J)>-1){f.B(2.3.t,2.3.17,2.3.C,A)}n 8(7.13(f[2.3.t])){f[2.3.t](2.3.C,A)}n{15"1b B 18"}}2.$s.U(\'a\').N(\'M\').L(k).o(\'M\');2.$e=k};9.j.l=5(){2.$O=14;6 4=2;2.$g.1A(5(){4.P()});2.$g.1B(5(){4.K()});2.K()};9.j.K=5(){8(2.$O===p){V}6 4=2;2.$T=W.1D(5(){6 u=4.$e+1;8(u===4.$b.1z){u=0}4.y(u)},2.3.S)};9.j.P=5(){8(2.3.l){W.1x(2.$T)}};7.1f.9=5(h){h=h||{};V 2.X(5(){6 r=1i 9(2,h)})}})();',62,112,'||this|settings|self|function|var|jQuery|if|sfRotator||items|activeClass|item|current|newItem|container|options|oldItem|prototype|position|autorotate|effectOut|else|addClass|true|trigger||controls|effectIn|next|index|sf|wrapper|activate|li|onShow|show|speedIn|event|onHide|hide|data|speedOut|append|effects|startAutorotate|eq|active|removeClass|rotationTerminated|stopAutorotate|optionsOut|el|duration|rotationInterval|find|return|window|each|css|class||instant|build|isFunction|false|throw|zIndex|optionsIn|transition|normal|inArray|Unsupported|parseInt|preventDefault|5000|fn|click|bind|new|rotator|fadeOut|div|extend|before|ul|filter|children|fadeIn|href|fold|slide|size|shake|clearInterval|transfer|length|mouseenter|mouseleave|100|setInterval|pulsate|scale|bounce|blind|arguments|puff|clip|highlight|explode|drop'.split('|'),0,{}));


/**
 * Compact labels plugin
 */
(function($){$.fn.compactize=function(){return this.each(function(){var label=$(this),input=$('#'+label.attr('for'));input.focus(function(){label.hide();}).blur(function(){if(input.val()===''){label.show();}});window.setTimeout(function(){if(input.val()!==''){label.hide();}},50);});};})(jQuery);

/*
 * hrefID jQuery extention - returns a valid #hash string from link href attribute in Internet Explorer
 */
(function($){$.fn.extend({hrefId:function(){return $(this).attr('href').substr($(this).attr('href').indexOf('#'));}});})(jQuery);

/*
 * Scripts
 *
 */
jQuery(function($) {
 
	var Engine = {
		utils : {
			links : function(){
				$('a[rel*=external]').click(function(e){
					e.preventDefault();
					window.open($(this).attr('href'));						  
				});
			},
			mails : function(){
				$('a[href^=mailto:]').each(function(){
					var mail = $(this).attr('href').replace('mailto:','');
					var replaced = mail.replace('/at/','@');
					$(this).attr('href','mailto:'+replaced);
					if($(this).text() == mail) {
						$(this).text(replaced);
					}
				});
			}
		},
		forms : {
			labels : function(){
				var $elements = $('.form-c p.row label');
				$elements.compactize();
			}
		},
		rotator : function(){
			$('#list-r, #slider ul.items').sfRotator({ 
				'autorotate' : true,	
				'effectIn' : 'slide', 
				'optionsIn' : { 
					'direction' : 'right' 
				}, 
				'speedIn': 'slow',
				'effectOut' : 'slide', 
				'optionsOut' : { 
					'direction' : 'left'
				},
				'speedOut': 'slow',
				'mouseenter': 'stopAutorotate',
				'stopAutorotate': 'startAutorotate'

			});
			
		},
		fixes : {
			blog : function(){
				// no comments/trackbacks + alternative
				var $comments = $('div.comments-a');
				$comments.each(function(){
					if($(this).find('div.comment').length == 0){
						var fixed = $(this).html().replace(/<\/h2>/i,'</h2><p class="empty">') + '</p>';
						$(this).html(fixed);
					} else {
						$(this).find('div.comment:odd').addClass('alt');
					}
				});
				
				// show/hide comments/trackbacks
				/*
				var $links = $('div.post-a p.info a.comments, div.post-a p.info a.trackbacks');
				$links.click(function(){
					$($(this).hrefId()).toggle();
					if($(this).is('.comments')) $($(this).hrefId()).next('div.add-comment-a:first').toggle();
					return false;
				});
				
				
				// single post (show trackbacks and comments)
				if($('div.post-a').length == 1){
					$('div.comments-a, div.add-comment-a').show();
				}
				
				*/
			},
			separators : function(){
				$('*[class*=cols]').each(function(){
					var matches = /cols([0-9]+)/i.exec($(this).attr('class'))
					var row = matches[1];
					$(this).find('li').each(function(i){
						if((i+1) % row == 0) $(this).after('<li class="separate"><a href="#top">Back to top</a></li>');
					});
				});
			}
		},
		
		tweaks : {
			
			hideEmptyCat : function(){
				
					if($(".catalogueItemNotFound").text() == "This catalog has no sub-catalogs."){
    					$(".list-a").hide();
					}
				
					if($(".productItemNotFound").text() == "This catalog has no products."){
    					$(".box-x .list-b").hide();
					}
			},// end hideEmptyCat
			
			featuredTweak : function(){
				
				
				$(".productfeaturelist li:nth-child(2)").addClass("first");
					
			}, // end featuredTweaks
			
			prodDetail : function(){
				
				if (document.location.href.indexOf("_product_") != -1 || document.location.href.indexOf("CatalogueRetrieve") != -1){    
                   
				   //ditch margin on prod table
				   $(".productTable").css("margin-left","0px");
				   
				   // ditch top heading
				   $(".box-x h2:first").hide();
				   
				   // increase width of table
				   $(".productTable").css("width","100%");
				   
				   // increase width of large image li
				   $(".list-b li").css("width","auto");
				   
				   // kill featured prods
				   $(".box-z:last").hide();
				   
				   // handle buy now mouse over
				    var onState = "/images/bttn-add-to-cart-on.png";
					var offState = $(".add2Cart").find("img").attr("src");
					
					$(".add2Cart").find("img").hover(function(){
						$(this).attr("src",onState);
						$(this).css("cursor","pointer");
					},function(){
						$(this).attr("src",offState);
					});
					
					// dang li paddin on add to favs and tell a friend
					$(".list-b li").css("margin-left","0px");
									   
				   
               	}

				
			}, // end prodDetail
			
			showcatStuff : function(){  // by default hiding the catalog stuff for smoother transitions
				
				if (document.location.href.indexOf("_catalog_") != -1){    
					$(".catStuff").show();
				}
				
			}, // end showcatStuff
			
			cartAction : function(){
				
				$("#catshopbuy").addClass("link-d");
				
				}, // end checkout
				
			checkOut : function(){
				
				 if ($('input#Amount').val() === '0.00') {
						$('#PaymentMethodType_9').attr('checked','checked');
					    $('#credit-card-information').css('display','none');   
					    // alert($('input#Amount').val());   
					}else{
						
						 //console.log('nope not zero');
					}
					
					$("#order-summary-value").text($("#Amount").val());
					
					
					
					// -----------------------------------------------------
				// This will copy over the shipping address value to the 
				// billing address.  Make sure the checkbox Id is "SameAsShipping"
				//
				// * Update - changed to check length and clear fields on unchecked
				// -----------------------------------------------------	
				$("#SameAsShipping").bind("change", function(e){
					
					var n = $("#SameAsShipping:checked").length
						if(n == 0){
							
							$("#BillingAddress").val('');
							$("#BillingCity").val('');
							$("#BillingState").val('');
							$("#BillingZip").val('');
							$("#BillingPhone").val('');
						}else{
							
							
							$("#BillingAddress").val($("#ShippingAddress").val());
							$("#BillingCity").val($("#ShippingCity").val());
							$("#BillingState").val($("#ShippingState").val());
							$("#BillingZip").val($("#ShippingZip").val());
							$("#BillingPhone").val($("#ShippingPhone").val());
						}
				
				});
				
				 if ($('input#Amount').val() === '0.00') {
									$('#PaymentMethodType_9').attr('checked','checked');
									   $('#credit-card-information').css('display','none');    
									   // alert($('input#Amount').val());    
									   }else{
										
										//console.log('nope not zero');
									}

					
					
					

				
				},// end checkOut
				
				loginCheck : function(){
                    if ($('#isLoggedIn').text() === '1') {
                         $(".box-a .text-d").html("<a href=\"/LogOutProcess.aspx\"><span>Log Out</span></a>");
						 $(".text-d").addClass('log-out');
                    }else{
						$(".box-a .text-d").html("<a href=\"/my-account/\">Register / Login</a>");
						}

				},
				
				loginPeepShow : function(){
			
					$("#btnLostPass").click(function(){
						$("#lostPass").slideToggle();
						return false;
					});
				
					
					$("#btnRegister").click(function(){
						$("#registerForm").slideToggle();
						return false;
					});
			
			
				} // end loginPeepShow

				
		}// end tweaks
	};

	Engine.utils.links();
	Engine.utils.mails();
	Engine.forms.labels();
	Engine.rotator();
	Engine.fixes.blog();
	//Engine.fixes.separators();
	
	Engine.tweaks.hideEmptyCat();
	Engine.tweaks.featuredTweak();
	Engine.tweaks.prodDetail();
	Engine.tweaks.showcatStuff();
	Engine.tweaks.cartAction();
	Engine.tweaks.checkOut();
	//Engine.tweaks.loginCheck();
	Engine.tweaks.loginPeepShow();
	
	
});
