var ddsmoothmenu={arrowimages:{down:["downarrowclass","down.gif",38],right:["rightarrowclass","right.gif",6]},transition:{overtime:200,outtime:100},shadow:!0,showhidedelay:{showdelay:0,hidedelay:0},zindexvalue:1e3,closeonnonmenuclick:!0,closeonmouseout:!1,overarrowre:/(?=\.(gif|jpg|jpeg|png|bmp))/i,overarrowaddtofilename:"_over",detecttouch:!!("ontouchstart"in window)||!!("ontouchstart"in document.documentElement)||!!window.ontouchstart||!!window.Touch||!!window.onmsgesturechange||window.DocumentTouch&&window.document instanceof window.DocumentTouch,detectwebkit:navigator.userAgent.toLowerCase().indexOf("applewebkit")>-1,idevice:/ipad|iphone/i.test(navigator.userAgent),detectie6:function(){var e;return(e=/MSIE (\d+)/.exec(navigator.userAgent))&&e[1]<7}(),detectie9:function(){var e;return(e=/MSIE (\d+)/.exec(navigator.userAgent))&&e[1]>8}(),ie9shadow:function(){},css3support:"string"==typeof document.documentElement.style.boxShadow||!document.all&&document.querySelector,prevobjs:[],menus:null,executelink:function(e,t,i){for(var s=t.length,n=i.target;--s>-1;)t[s]===this&&(t.splice(s,1),n.href!==ddsmoothmenu.emptyhash&&n.href&&e(n).is("a")&&!e(n).children("span."+ddsmoothmenu.arrowimages.down[0]+", span."+ddsmoothmenu.arrowimages.right[0]).size()&&(n.target&&"_self"!==n.target?window.open(n.href,n.target):window.location.href=n.href,i.stopPropagation()))},updateprev:function(e,t,i){for(var s,n=t.length,o=i.parents().add(this);--n>-1;)o.index(s=t[n])<0&&(e(s).trigger("click",[1]),t.splice(n,1));t.push(this)},subulpreventemptyclose:function(e){var t=e.target;t.href===ddsmoothmenu.emptyhash&&$(t).parent("li").find("ul").size()<1&&(e.preventDefault(),e.stopPropagation())},getajaxmenu:function(e,t,i){var s=e("#"+t.contentsource[0]);s.html("Loading Menu..."),e.ajax({url:t.contentsource[1],async:!0,error:function(e){s.html("Error fetching content. Server Response: "+e.responseText)},success:function(n){s.html(n),!i&&ddsmoothmenu.buildmenu(e,t)}})},closeall:function(e){var t,i=ddsmoothmenu;if(i.globaltrackopen&&("mouseleave"===e.type||("click"===e.type||"touchstart"===e.type)&&i.menus.index(e.target)<0))for(t=i.prevobjs.length;--t>-1;)$(i.prevobjs[t]).trigger("click"),i.prevobjs.splice(t,1)},emptyhash:$('').get(0).href,buildmenu:function(e,t){var i=ddsmoothmenu;i.globaltrackopen=i.closeonnonmenuclick||i.closeonmouseout;var s=0,n=i.globaltrackopen?i.prevobjs:[],o=e("#"+t.mainmenuid).removeClass("ddsmoothmenu ddsmoothmenu-v").addClass(t.classname||"ddsmoothmenu"),r=o.find(">ul"),a=i.detecttouch?"toggle":"toggle"===t.method?"toggle":"hover",c=r.find(">li>ul").parent(),l="v"!=t.orientation?"down":"right",u=e(document.body);if(r.click(function(e){e.target.href===i.emptyhash&&e.preventDefault()}),"toggle"===a){if(i.globaltrackopen&&(i.menus=i.menus?i.menus.add(r.add(r.find("*"))):r.add(r.find("*"))),i.closeonnonmenuclick?("down"===l&&o.click(function(e){e.stopPropagation()}),e(document).unbind("click.smoothmenu").bind("click.smoothmenu",i.closeall),i.idevice&&(document.removeEventListener("touchstart",i.closeall,!1),document.addEventListener("touchstart",i.closeall,!1))):t.closeonnonmenuclick&&("down"===l&&o.click(function(e){e.stopPropagation()}),e(document).bind("click."+t.mainmenuid,function(){r.find("li>a.selected").parent().trigger("click")}),i.idevice&&document.addEventListener("touchstart",function(){r.find("li>a.selected").parent().trigger("click")},!1)),i.closeonmouseout){var d="down"===l?o:r;d.bind("mouseleave.smoothmenu",i.closeall)}else if(t.closeonmouseout){var d="down"===l?o:r;d.bind("mouseleave.smoothmenu",function(){r.find("li>a.selected").parent().trigger("click")})}e('style[title="ddsmoothmenushadowsnone"]').size()||e("head").append('');var f;e(window).resize(function(){clearTimeout(f);var t=r.find("li>a.selected").parent(),i=e(".ddshadow").addClass("ddsmoothmenushadowsnone");t.eq(0).trigger("click"),t.trigger("click"),f=setTimeout(function(){i.removeClass("ddsmoothmenushadowsnone")},100)})}c.each(function(){function o(){d.removeClass("selected")}var r=e(this).css({zIndex:(t.zindexvalue||i.zindexvalue)+s--}),c=r.children("ul:eq(0)").css({display:"block"}).data("timers",{}),d=r.children("a:eq(0)").css({paddingRight:i.arrowimages[l][2]}).append(''),f={w:d.outerWidth(),h:r.innerHeight(),subulw:c.outerWidth(),subulh:c.outerHeight()};c.css({top:"down"===l?f.h:0}),"toggle"===a&&c.click(i.subulpreventemptyclose),r[a](function(){r.data("headers")||(i.buildsubheaders(e,c.find(">li>ul").parent(),t,a,n),r.data("headers",!0).find(">ul").css({display:"none",visibility:"visible"})),"toggle"===a&&i.updateprev.call(this,e,n,r),clearTimeout(c.data("timers").hidetimer),d.addClass("selected"),c.data("timers").showtimer=setTimeout(function(){var s="down"===l?0:f.w;if(s=r.offset().left+s+f.subulw>e(window).width()?"down"===l?-f.subulw+f.w:-f.w:s,c.css({left:s,width:f.subulw}).stop(!0,!0).animate({height:"show"},i.transition.overtime,function(){this.style.removeAttribute&&this.style.removeAttribute("filter")}),t.shadow){r.data("$shadow")||r.data("$shadow",e("
").addClass("ddshadow toplevelshadow").prependTo(u).css({zIndex:r.css("zIndex")})),i.ie9shadow(r.data("$shadow"));var n=c.offset(),o=n.left,a=n.top;r.data("$shadow").css({overflow:"visible",width:f.subulw,left:o,top:a}).stop(!0,!0).animate({height:f.subulh},i.transition.overtime)}},i.showhidedelay.showdelay)},function(t,s){var l=r.data("$shadow");"hover"===a?o():i.executelink.call(this,e,n,t),clearTimeout(c.data("timers").showtimer),c.data("timers").hidetimer=setTimeout(function(){c.stop(!0,!0).animate({height:"hide",opacity:"hide"},s||i.transition.outtime,function(){"toggle"===a&&o()}),l&&(!i.css3support&&i.detectwebkit&&l.children("div:eq(0)").css({opacity:0}),l.stop(!0,!0).animate({height:0},s||i.transition.outtime,function(){"toggle"===a&&(this.style.overflow="hidden")}))},i.showhidedelay.hidedelay)})})},buildsubheaders:function(e,t,i,s,n){t.each(function(){function t(){l.removeClass("selected")}var o,r=ddsmoothmenu,a=e(this).css({zIndex:e(this).parent("ul").css("z-index")}),c=a.children("ul:eq(0)").css({display:"block"}).data("timers",{});"toggle"===s&&c.click(r.subulpreventemptyclose);var l=a.children("a:eq(0)").append(''),u={w:l.outerWidth(),subulw:c.outerWidth(),subulh:c.outerHeight()};c.css({top:0}),a[s](function(){a.data("headers")||(r.buildsubheaders(e,c.find(">li>ul").parent(),i,s,n),a.data("headers",!0).find(">ul").css({display:"none",visibility:"visible"})),"toggle"===s&&r.updateprev.call(this,e,n,a),clearTimeout(c.data("timers").hidetimer),l.addClass("selected"),c.data("timers").showtimer=setTimeout(function(){var t=u.w;if(t=a.offset().left+t+u.subulw>e(window).width()?-u.w:t,c.css({left:t,width:u.subulw}).stop(!0,!0).animate({height:"show"},r.transition.overtime,function(){this.style.removeAttribute&&this.style.removeAttribute("filter")}),i.shadow){a.data("$shadow")||(o=a.parents("li:eq(0)").data("$shadow"),a.data("$shadow",e("").addClass("ddshadow").prependTo(o).css({zIndex:o.css("z-index")}))),c.offset();var s=t,n=a.position().top;r.detectwebkit&&!r.css3support&&a.data("$shadow").css({opacity:1}),a.data("$shadow").css({overflow:"visible",width:u.subulw,left:s,top:n}).stop(!0,!0).animate({height:u.subulh},r.transition.overtime)}},r.showhidedelay.showdelay)},function(i,o){var l=a.data("$shadow");"hover"===s?t():r.executelink.call(this,e,n,i),clearTimeout(c.data("timers").showtimer),c.data("timers").hidetimer=setTimeout(function(){c.stop(!0,!0).animate({height:"hide",opacity:"hide"},o||r.transition.outtime,function(){"toggle"===s&&t()}),l&&(!r.css3support&&r.detectwebkit&&l.children("div:eq(0)").css({opacity:0}),l.stop(!0,!0).animate({height:0},o||r.transition.outtime,function(){"toggle"===s&&(this.style.overflow="hidden")}))},r.showhidedelay.hidedelay)})})},init:function(e){function t(){if(!r){if("object"==typeof e.customtheme&&2==e.customtheme.length){var t="v"==e.orientation?n:n+", "+n;o.push([t," ul li a {background:",e.customtheme[0],";}\n",n," ul li a:hover {background:",e.customtheme[1],";}"].join(""))}o.push('\n\n"],r=e.arrowswap?4:2;e.arrowswap&&(i=ddsmoothmenu.arrowimages.right[1].replace(ddsmoothmenu.overarrowre,ddsmoothmenu.overarrowaddtofilename),s=ddsmoothmenu.arrowimages.down[1].replace(ddsmoothmenu.overarrowre,ddsmoothmenu.overarrowaddtofilename),jQuery(new Image).bind("load error",function(i){e.rightswap="load"===i.type,e.rightswap&&o.push([n," ul li a:hover .",ddsmoothmenu.arrowimages.right[0],", ",n," ul li a.selected .",ddsmoothmenu.arrowimages.right[0]," { background-image: url(",this.src,");}"].join("")),--r,t()}).attr("src",i),jQuery(new Image).bind("load error",function(i){e.downswap="load"===i.type,e.downswap&&o.push([n," ul li a:hover .",ddsmoothmenu.arrowimages.down[0],", ",n," ul li a.selected .",ddsmoothmenu.arrowimages.down[0]," { background-image: url(",this.src,");}"].join("")),--r,t()}).attr("src",s)),jQuery(new Image).bind("load error",function(e){"load"===e.type&&o.push([n+" ul li a .",ddsmoothmenu.arrowimages.right[0]," { background: url(",this.src,") no-repeat;width:",this.width,"px;height:",this.height,"px;}"].join("")),--r,t()}).attr("src",ddsmoothmenu.arrowimages.right[1]),jQuery(new Image).bind("load error",function(e){"load"===e.type&&o.push([n+" ul li a .",ddsmoothmenu.arrowimages.down[0]," { background: url(",this.src,") no-repeat;width:",this.width,"px;height:",this.height,"px;}"].join("")),--r,t()}).attr("src",ddsmoothmenu.arrowimages.down[1]),e.shadow=!this.detectie6||"hover"!==e.method&&"v"!==e.orientation?e.shadow||this.shadow:!1,jQuery(document).ready(function(t){e.shadow&&ddsmoothmenu.css3support&&t("body").addClass("ddcss3support"),"object"==typeof e.contentsource?ddsmoothmenu.getajaxmenu(t,e):ddsmoothmenu.buildmenu(t,e)})}};parseFloat(jQuery.fn.jquery)>1.8&&!jQuery.migrateWarnings&&function(){var e=jQuery.fn.toggle;jQuery.extend(jQuery.fn,{toggle:function(t,i){if(!jQuery.isFunction(t)||!jQuery.isFunction(i))return e.apply(this,arguments);var s=arguments,n=t.guid||jQuery.guid++,o=0,r=function(e){var i=(jQuery._data(this,"lastToggle"+t.guid)||0)%o;return jQuery._data(this,"lastToggle"+t.guid,i+1),e.preventDefault(),s[i].apply(this,arguments)||!1};for(r.guid=n;o