(function(a){a.fn.hoverIntent=function(b,g){var f={sensitivity:7,interval:100,timeout:0};f=a.extend(f,g?{over:b,out:g}:b);var i,j,k,l,m=function(e){i=e.pageX;j=e.pageY},n=function(e,c){c.hoverIntent_t=clearTimeout(c.hoverIntent_t);if(Math.abs(k-i)+Math.abs(l-j)<f.sensitivity){a(c).unbind("mousemove",m);c.hoverIntent_s=1;return f.over.apply(c,[e])}else{k=i;l=j;c.hoverIntent_t=setTimeout(function(){n(e,c)},f.interval)}},o=function(e){for(var c=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;c&& c!=this;)try{c=c.parentNode}catch(p){c=this}if(c==this)return false;var h=jQuery.extend({},e),d=this;if(d.hoverIntent_t)d.hoverIntent_t=clearTimeout(d.hoverIntent_t);if(e.type=="mouseover"){k=h.pageX;l=h.pageY;a(d).bind("mousemove",m);if(d.hoverIntent_s!=1)d.hoverIntent_t=setTimeout(function(){n(h,d)},f.interval)}else{a(d).unbind("mousemove",m);if(d.hoverIntent_s==1)d.hoverIntent_t=setTimeout(function(){d.hoverIntent_t=clearTimeout(d.hoverIntent_t);d.hoverIntent_s=0;f.out.apply(d,[h])},f.timeout)}}; return this.mouseover(o).mouseout(o)}})(jQuery); $(document).ready(function(){$("ul#topnav > li > ul.subcat1").css({opacity:"0"});$("ul#topnav > li").hoverIntent({sensitivity:2,interval:50,over:function(){$(this).find(".subcat1").stop().fadeTo("slow",0.95).show();(function(b){jQuery.fn.calcSubWidth=function(){rowWidth=0;b(this).find(".level2").each(function(){rowWidth+=b(this).width()})}})(jQuery);if($(this).find(".row").length>0){var a=0;$(this).find(".row").each(function(){$(this).calcSubWidth();if(rowWidth>a)a=rowWidth})}else{$(this).calcSubWidth(); $(this).find(".subcat1").css({width:rowWidth})}},timeout:500,out:function(){$(this).find(".subcat1").stop().fadeTo("fast",0,function(){$(this).hide()})}})}); (function(a){a.fn.extend({customStyle:function(){if(!a.browser.msie||a.browser.msie&&a.browser.version>6)return this.each(function(){var b=a(this).find(":selected");a(this).after('<span class="customStyleSelectBox"><span class="customStyleSelectBoxInner">'+b.text()+"</span></span>").css({position:"absolute",opacity:0,fontSize:a(this).next().css("font-size")});b=a(this).next();var g=parseInt(a(this).width())-parseInt(b.css("padding-left"))-parseInt(b.css("padding-right")),f=b.find(":first-child"); b.css({display:"inline-block"});f.css({width:g,display:"inline-block"});b=parseInt(b.height("height"))+parseInt(b.css("padding-top"))+parseInt(b.css("padding-bottom"));a(this).height(b).change(function(){f.text(a(this).find(":selected").text()).parent().addClass("changed")})})}})})(jQuery);
