﻿// JScript File

function PageLoaded()
{
    document.aspnetForm.action = window.location.href;

    sIFR.activate(gillsans);    
    
    // Main page titles - h1
    sIFR.replace(gillsans, {
      selector: 'h1',
      wmode: 'transparent',
      css: {
        '.sIFR-root': { 'color':'#003F93', 'background-color':'transparent' }
      }
    });
        
    // Make content container equal to height of the left side nav if it is shorter
    var SideNav = jQuery('.site-left-nav');
    var SiteContent = jQuery('.site-content');
        
    // Open the current level in side treeview if on sales page
    var CurrentUrl = window.location.href;
    if (CurrentUrl.indexOf("Sales") > -1)
    {
        // Match the url to that of the link in the side treeview
        var MatchedNavItem = jQuery('a[href='+CurrentUrl+']').parent();
        if (MatchedNavItem)
        {
            MatchedNavItem.remove()
        }
    }
    
    // Remove .net border-width styling on images
    jQuery("a > img.netfix").removeAttr("style");
    
    // Add spans to elements to make them look rounded 
    jQuery('.image-top-holder').append(
            '<span class="overlay tl"></span><span class="overlay tr"></span>' +
            '</span><span class="overlay br"></span><span class="overlay bl">');
}