/* Copyright (C) 2007 - 2011 YOOtheme GmbH, YOOtheme Proprietary Use License (http://www.yootheme.com/license) */

(function(e){var f=function(){};f.prototype=e.extend(f.prototype,{name:"dropdownMenu",initialize:function(h,b){b=e.extend({mode:"default",duration:600,transition:"easeOutExpo"},b);var g={width:0,height:0};switch(b.mode){case "width":g={width:0};break;case "height":g={height:0}}h.find("li.parent").each(function(){var c=e(this),a=c.find("ul:first");if(a.length){var i={width:a.css("width"),height:a.css("height")};if(!e.browser.msie){g.opacity=0;i.opacity=a.css("opacity")}a.css(g);c.bind({mouseenter:function(){var n=
c.parent();n.css("overflow")=="hidden"&&n.css("overflow","visible");a.css("overflow","hidden");a.animate(i,b.duration,b.transition)},mouseleave:function(){a.stop();a.css(g)}})}});if(b.fancy){var d=e.extend({mode:"move",transition:"easeOutExpo",duration:500,onEnter:null,onLeave:null},b.fancy),j=h.find("ul:first").append('<li class="fancy bg1"><div class="fancy-1"><div class="fancy-2"><div class="fancy-3"></div></div></div></li>').find(".fancy:first").hide(),k=h.find(".active:first"),l=null,m=function(c,
a,i){if(!(a&&l&&c.get(0)==l.get(0))){j.stop().show().css("visibility","visible");i=i?0:d.duration;if(d.mode=="move")!k.length&&!a?j.hide():j.animate({left:c.position().left+"px",width:c.outerWidth()+"px"},i,d.transition);else a?j.css({opacity:k?0:1,left:c.position().left+"px",width:c.width()+"px"}).animate({opacity:1},i):j.animate({opacity:0},i);l=a?c:null}};h.find("li.level1").each(function(c){var a=e(this);a.bind({mouseenter:function(){m(a,true);d.onEnter&&d.onEnter(a,c,j)},mouseleave:function(){m(k,
false);d.onLeave&&d.onLeave(a,c,j)}})});k.length&&d.mode=="move"&&m(k,true,true)}}});e.fn[f.prototype.name]=function(){var h=arguments,b=h[0]?h[0]:null;return this.each(function(){var g=e(this);if(f.prototype[b]&&g.data(f.prototype.name)&&b!="initialize")g.data(f.prototype.name)[b].apply(g.data(f.prototype.name),Array.prototype.slice.call(h,1));else if(!b||e.isPlainObject(b)){var d=new f;f.prototype.initialize&&d.initialize.apply(d,e.merge([g],h));g.data(f.prototype.name,d)}else e.error("Method "+
b+" does not exist on jQuery."+f.name)})}})(jQuery);

