requirejs(["jquery","bootstrap","global/blockUI","imageLazyLoad"],function(n,t,i){function f(){var c=n(".header").find(".navbar-nav"),r,t,f,s,e,i,h,o;if(c.length>0&&(r="active",t=window.location.pathname,t=u(t),f=c.find("li"),s=f.length,s>0))for(f.removeClass(r),e=0;e<s;e++)if(i=n(f[e]),i.length>0&&(h=i.find("a"),h.length>0)){if(o=h.attr("href"),o.indexOf("http://skoolbo.")!==-1)continue;if(t==="/")o===t&&i.addClass(r);else if(o.indexOf(t)!==-1){i.addClass(r);i.closest("li.dropdown").addClass(r);break}}}function e(){window.notUseLoading||(n(document).ajaxSend(function(){window.skipBlockUI||i.showBlock()}).ajaxStop(function(){i.hideBlock()}),window.onbeforeunload=function(){i.showBlock()},window.onpageshow=function(){r==!1&&i.hideBlock()})}var u=function(n){if(n.length>2&&n.match("/$")!=null){var t=n.match("/$");return n=n.substring(0,t.index),u(n)}return n},r=!1;n(document).ajaxComplete(function(n,t){window.notUseLoading||i.hideBlock();var u=JSON.parse(t.getResponseHeader("X-Responded-JSON"));u!=null&&u.status==401&&r==!1&&(r=!0,alert("Session timeout. Please login again."),i.showBlock(),window.location.href=window.logoutUrl)});n(document).ready(function(){f();e();var t=n("img.lazy");t.length>0&&t.lazy()})})