$(document).ready(function(){
						   
	//SPLASH PAGE
	if($("#contentPanels div.panel").length <= 1)
	{
		$("#rSplashBottomBoxes").css("background", "url(/App_Themes/Revere/images/layout/splashBottomThreeBoxesNoArr.png)");
	}
						   

	// Keeps the extraSmallShadow DIVs on the Details page the same height, just incase one gets to tall.
	var columnCountextraSmallShadows = $('.extraSmallShadow').length;
	var extraSmallShadowTallestCol = 0;
	
	for(var i = 0; i < columnCountextraSmallShadows; i++)
    {
        var extraSmallShadowDivUsed = $('.extraSmallShadow')[i];
		
		var extraSmallShadowDivHeight = jQuery(extraSmallShadowDivUsed).height();
        
        if(extraSmallShadowDivHeight != "NaN")
        {
            if(extraSmallShadowDivHeight > extraSmallShadowTallestCol)
            {
                extraSmallShadowTallestCol = extraSmallShadowDivHeight;
            }
        }
	}
	jQuery($('.extraSmallShadow')).css("height",extraSmallShadowTallestCol);
	
	$("#rHeaderRight ul li:first").css("border-left", "solid 0px #fff");
	
	$("sup").each(function () {
      $(this).replaceWith("<span class='supReplace'>" + $(this).text() + "</span>");
    });
    
    $('#BrandPages').slideToggle();
    
    var gridpattern = 6;
    $('.GridPattern').each(function(){
        $(this).eq(gridpattern).css('margin-right', '0');
        $(this).eq(gridpattern).after('<div class="clear"></div>');
        
        gridpattern = gridpattern + 7;
    });
    
    var gridprofile = 6;
    $('.GridProfile').each(function(){
        if($('.GridProfile').length != 8)
        {
            $('.GridProfile').eq(gridprofile).css('margin-right', '0');
            $('.GridProfile').eq(gridprofile).after('<div class="clear"></div>');
            
            gridprofile = gridprofile + 7;
        }
        else
        {
            $('.GridProfile').eq(3).after('<div class="clear"></div>');
        }
    });
    
    $('ul li p:last').css('padding-bottom', '0');
       
});
