﻿
/// <reference path="jQuery/1.3.2/jquery-1.3.2-vsdoc.js" />

/*
 *****************************
 *	PAGE INIT
 *****************************
 */
	
$(document).ready(function () 
{
    // this is a fix for the timeout issue
    window.onload = function()
    {
        if(self.location.href.toLowerCase().indexOf('timeout') > 0 && top != self)
        {
	        top.location = self.location.href;
        }
		if (typeof woAfterLoad != "undefined") woAfterLoad();
    };
    
	var safari = $.browser.safari;
	
	if (safari)
	{
		// Get body tag 
		var body = $("body");
		body.addClass("safari");
	}

	// Trigger page setup event into which ALL class instance declarations are added
	$(document).trigger("js-class-setup");
	
	// Run core sIFR replacement
	sIFR.replaceCoreAssets();
	
	// Run page specific sIFR replacements
	if (sIFR.replacePageAssets) sIFR.replacePageAssets();
	
	// Run dealer page specific sIFR replacements
	if (sIFR.replaceDealerPageAssets) sIFR.replaceDealerPageAssets();
});

