var wos_windowID = '';
if(wos_data.loadPageBackend == '1'){
    window.parent.wos_loadPageOnBackend(document.location.href);     
}
jQuery(document).ready(function(){   
    if(!wos_inIframe()){
        var url = document.location.href;
        if(url.indexOf('?')<0){
            url += '?wos-reload=1';
        } else {
            url += '&wos-reload=1';            
        }
        document.location.href = url;
    }
   jQuery('*').click(function(){
       window.parent.wos_clickWindow(wos_windowID); 
   });
   window.parent.wos_pageChanged(wos_windowID,document.location.href); 
   Mousetrap.bind(wos_data.key_nextWin_1+'+'+wos_data.key_nextWin_2, function(e) {
        window.parent.wos_sortWindowsView(false);             
        return false;
    });
     Mousetrap.bind(wos_data.key_prevWin_1+'+'+wos_data.key_prevWin_2+'+'+wos_data.key_prevWin_3, function(e) {
        window.parent.wos_sortWindowsView(true);             
        return false;
    });
});
jQuery(window).load(function(){     
    jQuery('body').animate({
       opacity: 1 
    },300);
});

function wos_inIframe () {
    try {
        return window.self !== window.top;
    } catch (e) {
        return true;
    }
}