var ddsmoothmenu={arrowimages:{down:["downarrowclass","Site/graphics/down.gif",23],right:["rightarrowclass","Site/graphics/right.gif"]},transition:{overtime:300,outtime:300},shadow:{enable:!1,offsetx:0,offsety:0},showhidedelay:{showdelay:0,hidedelay:0},detectwebkit:-1!=navigator.userAgent.toLowerCase().indexOf("applewebkit"),detectie6:document.all&&!window.XMLHttpRequest,getajaxmenu:function(a,d){var b=a("#"+d.contentsource[0]);b.html("Loading Menu...");a.ajax({url:d.contentsource[1],async:!0,error:function(a){b.html("Error fetching content. Server Response: "+
a.responseText)},success:function(e){b.html(e);ddsmoothmenu.buildmenu(a,d)}})},buildmenu:function(a,d){var b=ddsmoothmenu,e=a("#"+d.mainmenuid+">ul");e.parent().get(0).className=d.classname||"ddsmoothmenu";var h=e.find("ul").parent();h.hover(function(){a(this).children("a:eq(0)").addClass("selected")},function(){a(this).children("a:eq(0)").removeClass("selected")});h.each(function(e){var g=a(this).css({zIndex:100-e}),f=a(this).find("ul:eq(0)").css({display:"block"});f.data("timers",{});this._dimensions=
{w:this.offsetWidth,h:this.offsetHeight,subulw:f.outerWidth(),subulh:f.outerHeight()};this.istopheader=1==g.parents("ul").length?!0:!1;f.css({top:this.istopheader&&"v"!=d.orientation?this._dimensions.h+"px":0});g.children("a:eq(0)").css(this.istopheader?{paddingRight:b.arrowimages.down[2]}:{}).append('<img src="'+(this.istopheader&&"v"!=d.orientation?b.arrowimages.down[1]:b.arrowimages.right[1])+'" class="'+(this.istopheader&&"v"!=d.orientation?b.arrowimages.down[0]:b.arrowimages.right[0])+'" style="border:0;" />');
if(b.shadow.enable)this._shadowoffset={x:this.istopheader?f.offset().left+b.shadow.offsetx:this._dimensions.w,y:this.istopheader?f.offset().top+b.shadow.offsety:g.position().top},$parentshadow=this.istopheader?a(document.body):g.parents("li:eq(0)").get(0).$shadow,this.$shadow=a('<div class="ddshadow'+(this.istopheader?" toplevelshadow":"")+'"></div>').prependTo($parentshadow).css({left:this._shadowoffset.x+"px",top:this._shadowoffset.y+"px"});g.hover(function(){var c=g.get(0);clearTimeout(f.data("timers").hidetimer);
f.data("timers").showtimer=setTimeout(function(){c._offsets={left:g.offset().left,top:g.offset().top};var e=c.istopheader&&"v"!=d.orientation?0:c._dimensions.w,e=c._offsets.left+e+c._dimensions.subulw>a(window).width()?c.istopheader&&"v"!=d.orientation?-c._dimensions.subulw+c._dimensions.w:-c._dimensions.w:e;if(1>=f.queue().length&&(f.css({left:e+"px",width:c._dimensions.subulw+"px"}).animate({height:"show",opacity:"show"},ddsmoothmenu.transition.overtime),b.shadow.enable)){var e=c.istopheader?f.offset().left+
ddsmoothmenu.shadow.offsetx:e,h=c.istopheader?f.offset().top+b.shadow.offsety:c._shadowoffset.y;!c.istopheader&&ddsmoothmenu.detectwebkit&&c.$shadow.css({opacity:1});c.$shadow.css({overflow:"",width:c._dimensions.subulw+"px",left:e+"px",top:h+"px"}).animate({height:c._dimensions.subulh+"px"},ddsmoothmenu.transition.overtime)}},ddsmoothmenu.showhidedelay.showdelay)},function(){var a=g.get(0);clearTimeout(f.data("timers").showtimer);f.data("timers").hidetimer=setTimeout(function(){f.animate({height:"hide",
opacity:"hide"},ddsmoothmenu.transition.outtime);b.shadow.enable&&(ddsmoothmenu.detectwebkit&&a.$shadow.children("div:eq(0)").css({opacity:0}),a.$shadow.css({overflow:"hidden"}).animate({height:0},ddsmoothmenu.transition.outtime))},ddsmoothmenu.showhidedelay.hidedelay)})});e.find("ul").css({display:"none",visibility:"visible"})},init:function(a){if("object"==typeof a.customtheme&&2==a.customtheme.length){var d="#"+a.mainmenuid;document.write('<style type="text/css">\n'+("v"==a.orientation?d:d+", "+
d)+" ul li a {background:"+a.customtheme[0]+";}\n"+d+" ul li a:hover {background:"+a.customtheme[1]+";}\n</style>")}this.shadow.enable=document.all&&!window.XMLHttpRequest?!1:this.shadow.enable;jQuery(document).ready(function(b){"object"==typeof a.contentsource?ddsmoothmenu.getajaxmenu(b,a):ddsmoothmenu.buildmenu(b,a)})}};
