jQuery(function(f){f.fn.mnShowFrame=function(){var i=f(this);return i.css({right:f(document).width()}).show().animate({right:0},"fast",function(){f(window).trigger("resize")}),i},f.fn.mnHideFrame=function(){f(this).add(".mobile-nav-frame").css({right:0}).animate({right:f(document).width()},"fast",function(){f(this).hide(),f(window).trigger("resize")}),f("body").animate({"padding-left":0},"fast")};var t=[];f(".so-mobilenav-standard").each(function(){var i=f(this).data("id");if(void 0!==t[i])return!0;t[i]=!0;var c,e=f(this).next();f("#so-mobilenav-mobile-"+i).next();f(document).on("click",'a.mobilenav-main-link[data-id="'+i+'"]',function(i){if(i.preventDefault(),null==c){(c=f('

'+mobileNav.text.navigate+'

').appendTo("body")).find(".title").prepend(''+mobileNav.mobileMenuClose+""),mobileNav.search&&f("").insertAfter(c.find(".title")),c.find(".close").on("click",function(i){i.preventDefault(),c.mnHideFrame()}),f(window).on("resize",function(){c.is(":visible")&&(c.hide(),c.width(f(window).width()),c.show())}),f("body").on("orientationchange",function(){f(window).trigger("resize")}),activeSlide=null,showSlide=function(i){c.find(".slides-container .slide").hide(),activeSlide=c.find(".slides-container .slide").eq(i).show(),0==i?c.find("a.back").hide():c.find("a.back").show(),0!=i?c.find(".title h3").html(activeSlide.data("title")):c.find(".title h3").html(mobileNav.text.navigate)},c.find("a.back").on("click",function(){var i=activeSlide.data("parent-slide");return null!=i&&showSlide(i),!1});var o=function(i){var d,s=f('
').appendTo(c.find(".slides-container"));return i.find("> li").each(function(){var i=f(this),e=i.find("> a").html();if(e){d=i.find("> a");var t=f("").html(d.html()).attr("href",d.attr("href")).addClass("link");d.attr("target")&&t.attr({target:d.attr("target"),rel:d.attr("rel")})}else t=i.html();var a=f("
  • ").append(t).addClass(i.attr("class"));if(e&&(a.find("a").not(".next").on("click",function(i){"undefined"===f(this).attr("href")&&c.mnHideFrame()}),0 ul").length)){var n=f('');a.prepend(n);var l=i.find("> ul").eq(0),r=o(l);r.data("parent-slide",s.index()),r.data("title",t.html()),a.find("a.next").on("click",function(){return showSlide(r.index()),!1})}s.find("ul").append(a)}),s};o(e.find("ul").eq(0)),showSlide(0)}return f('.mobile-nav-frame .mobile a[href*="#"].link, .mobile-nav-frame .mobile a:not([href])').on("click",function(){f(this).prev(".next").length?f(this).prev(".next").trigger("click"):c.mnHideFrame()}),f(window).trigger("resize"),c.mnShowFrame(),showSlide(0),!1})})});