var Layout=function(){var e="layouts/layout3/img/",n="layouts/layout3/css/",o=App.getResponsiveBreakpoint("md"),t=function(){$(".page-header").on("click",".search-form",function(e){$(this).addClass("open"),$(this).find(".form-control").focus(),$(".page-header .search-form .form-control").on("blur",function(e){$(this).closest(".search-form").removeClass("open"),$(this).unbind("blur")})}),$(".page-header").on("keypress",".hor-menu .search-form .form-control",function(e){return 13==e.which?($(this).closest(".search-form").submit(),!1):void 0}),$(".page-header").on("mousedown",".search-form.open .submit",function(e){e.preventDefault(),e.stopPropagation(),$(this).closest(".search-form").submit()}),$("body").on("click",".page-header-top-fixed .page-header-top .menu-toggler",function(){App.scrollTop()})},a=function(){$(".page-header .menu-toggler").on("click",function(e){if(App.getViewPort().width a, .hor-menu .dropdown-submenu > a").on("click",function(e){App.getViewPort().width a").on("click",function(e){App.getViewPort().widthe?$(".page-header-menu").addClass("fixed"):$(".page-header-menu").removeClass("fixed")),$("body").hasClass("page-header-top-fixed")&&($(window).scrollTop()>e?$(".page-header-top").addClass("fixed"):$(".page-header-top").removeClass("fixed"))})},i=function(e,n,o){var t=encodeURI(location.hash).toLowerCase(),a=$(".hor-menu");"click"===e||"set"===e?n=$(n):"match"===e&&a.find("li > a").each(function(){var e=$(this).attr("ui-sref");if(o&&e){if(o.is(e))return void(n=$(this))}else{var a=$(this).attr("href");if(a&&(a=a.toLowerCase(),a.length>1&&t.substr(1,a.length-1)==a.substr(1)))return void(n=$(this))}}),n&&0!=n.size()&&"javascript:;"!=n.attr("href")&&"javascript:;"!=n.attr("ui-sref")&&"#"!=n.attr("href")&&"#"!=n.attr("ui-sref")&&(a.find("li.active").removeClass("active"),a.find("li > a > .selected").remove(),a.find("li.open").removeClass("open"),n.parents("li").each(function(){$(this).addClass("active"),1===$(this).parent("ul.navbar-nav").size()&&$(this).find("> a").append('')}))},s=function(){var e=App.getViewPort().width;$(".page-header-menu");e>=o?$(".page-header-menu").css("display","block"):o>e&&$(".page-header-menu").css("display","none")},r=function(){return},p=function(){var e=100,n=500;navigator.userAgent.match(/iPhone|iPad|iPod/i)?$(window).bind("touchend touchcancel touchleave",function(o){$(this).scrollTop()>e?$(".scroll-to-top").fadeIn(n):$(".scroll-to-top").fadeOut(n)}):$(window).scroll(function(){$(this).scrollTop()>e?$(".scroll-to-top").fadeIn(n):$(".scroll-to-top").fadeOut(n)}),$(".scroll-to-top").click(function(e){return e.preventDefault(),$("html, body").animate({scrollTop:0},n),!1})};return{initHeader:function(e){t(),a(),App.addResizeHandler(s),App.isAngularJsApp()&&i("match",null,e)},initContent:function(){r()},initFooter:function(){p()},init:function(){this.initHeader(),this.initContent(),this.initFooter()},setMainMenuActiveLink:function(e,n){i(e,n)},setAngularJsMainMenuActiveLink:function(e,n,o){i(e,n,o)},closeMainMenu:function(){$(".hor-menu").find("li.open").removeClass("open"),App.getViewPort().width