var App=function(){var isRTL=false;var isIE9=false;var isIE10=false;var isIE=false;var resizeHandlers=[];var handleInit=function(){isIE9=!!navigator.userAgent.match(/MSIE 9.0/);isIE10=!!navigator.userAgent.match(/MSIE 10.0/);isIE=navigator.userAgent.indexOf("MSIE ")>-1||navigator.userAgent.indexOf("Trident/")>-1;if(isIE10){$('html').addClass('ie10');} if(isIE9){$('html').addClass('ie9');} if(isIE){$('html').addClass('ie');}};var _runResizeHandlers=function(){for(var i=0;iheight){height=height_;}});height=height+offset;items.each(function(){if($(this).attr('data-height')=="height"){$(this).css('height',height);}else{$(this).css('min-height',height);}});if(parent.attr('data-related')){$(parent.attr('data-related')).css('height',parent.height());}});} var handleOnResize=function(){var resize;$(window).resize(function(){if(resize){clearTimeout(resize);} resize=setTimeout(function(){_runResizeHandlers();},50);});};var handleCheckboxRadios=function(){$('body').on('click','.c-checkbox > label, .c-radio > label',function(){var the=$(this);var el=$(this).children('span:first-child');el.addClass('inc');var newone=el.clone(true);el.before(newone);$("."+el.attr("class")+":last",the).remove();});};var handleAccordions=function(){$('body').on('shown.bs.collapse','.accordion.scrollable',function(e){Jango.scrollTo($(e.target));});};var handleTabs=function(){if(encodeURI(location.hash)){var tabid=encodeURI(location.hash.substr(1));$('a[href="#'+tabid+'"]').parents('.tab-pane:hidden').each(function(){var tabid=$(this).attr("id");$('a[href="#'+tabid+'"]').click();});$('a[href="#'+tabid+'"]').click();}};var handleModals=function(){$('body').on('hide.bs.modal',function(){if($('.modal:visible').size()>1&&$('html').hasClass('modal-open')===false){$('html').addClass('modal-open');}else if($('.modal:visible').size()<=1){$('html').removeClass('modal-open');}});$('body').on('show.bs.modal','.modal',function(){if($(this).hasClass("modal-scroll")){$('body').addClass("modal-open-noscroll");}});$('body').on('hide.bs.modal','.modal',function(){$('body').removeClass("modal-open-noscroll");});$('body').on('hidden.bs.modal','.modal:not(.modal-cached)',function(){$(this).removeData('bs.modal');});};var handleTooltips=function(){$('.tooltips').tooltip();};var handleDropdowns=function(){$('body').on('click','.dropdown-menu.hold-on-click',function(e){e.stopPropagation();});};var handleAlerts=function(){$('body').on('click','[data-close="alert"]',function(e){$(this).parent('.alert').hide();$(this).closest('.note').hide();e.preventDefault();});$('body').on('click','[data-close="note"]',function(e){$(this).closest('.note').hide();e.preventDefault();});$('body').on('click','[data-remove="note"]',function(e){$(this).closest('.note').remove();e.preventDefault();});};var handleDropdownHover=function(){$('[data-hover="dropdown"]').not('.hover-initialized').each(function(){$(this).dropdownHover();$(this).addClass('hover-initialized');});};var lastPopedPopover;var handlePopovers=function(){$('.popovers').popover();$(document).on('click.bs.popover.data-api',function(e){if(lastPopedPopover){lastPopedPopover.popover('hide');}});};var handleFixInputPlaceholderForIE=function(){if(isIE9||isIE10){$('input[placeholder]:not(.placeholder-no-fix), textarea[placeholder]:not(.placeholder-no-fix)').each(function(){var input=$(this);if(input.val()===''&&input.attr("placeholder")!==''){input.addClass("placeholder").val(input.attr('placeholder'));} input.focus(function(){if(input.val()==input.attr('placeholder')){input.val('');}});input.blur(function(){if(input.val()===''||input.val()==input.attr('placeholder')){input.val(input.attr('placeholder'));}});});}};return{init:function(){handleHeight();this.addResizeHandler(handleHeight);handleInit();handleOnResize();handleCheckboxRadios() handleAlerts();handleDropdowns();handleTooltips();handlePopovers();handleAccordions();handleModals();handleFixInputPlaceholderForIE();},changeLogo:function(filename){var path='../assets/jango/img/layout/logos/'+filename+'.png';$('.c-brand img.c-desktop-logo').attr('src',path);},setLastPopedPopover:function(el){lastPopedPopover=el;},addResizeHandler:function(func){resizeHandlers.push(func);},runResizeHandlers:function(){_runResizeHandlers();},scrollTo:function(el,offeset){var pos=(el&&el.size()>0)?el.offset().top:0;if(el){if($('body').hasClass('page-header-fixed')){pos=pos-$('.page-header').height();} pos=pos+(offeset?offeset:-1*el.height());} $('html,body').animate({scrollTop:pos},'slow');},scrollTop:function(){Jango.scrollTo();},initFancybox:function(){handleFancybox();},getActualVal:function(el){el=$(el);if(el.val()===el.attr("placeholder")){return"";} return el.val();},getURLParameter:function(paramName){var searchString=window.location.search.substring(1),i,val,params=searchString.split("&");for(i=0;i