﻿var Website = new Object();
Website.baseUrl = "http://" + document.domain;
Website.swfFilesPath = Website.baseUrl + "/static/";
Website.jsRootPath = Website.baseUrl + "/static/js/";
Website.xmlPath = Website.baseUrl + "/static/photogallery/images.xml";
Website.FPExpressInstallSrc = Website.jsRootPath + "/swfobject/express-install.swf";

var delayedCalls = [];

window.onload = onWindowLoad;

function callLater(func)
{	
	delayedCalls.push(func);
}

function onWindowLoad()
{
	for(var i = 0; i < delayedCalls.length; i++)
	{
		var func = delayedCalls[i];
		func();
	}
}

function includeAllJSFiles()
{
	var jsRootPath = '/static/js/';
	
	//all jquery stuff
	document.write('<scr'+'ipt type="text/javascript" src="' + jsRootPath + 'jquery/jquery-1.4.2.js" ></scr'+'ipt>'); 

	//all jquery ui core stuff
	document.write('<scr'+'ipt type="text/javascript" src="' + jsRootPath + 'jquery/ui/jquery.ui.core.js" ></scr'+'ipt>'); 
	document.write('<scr'+'ipt type="text/javascript" src="' + jsRootPath + 'jquery/ui/jquery.ui.widget.js" ></scr'+'ipt>'); 
	
	//all jquery ui components. Add all component js files as and when required in this section
	document.write('<scr'+'ipt type="text/javascript" src="' + jsRootPath + 'jquery/ui/jquery.ui.tabs.js" ></scr'+'ipt>');
	document.write('<scr'+'ipt type="text/javascript" src="' + jsRootPath + 'jquery/ui/jquery.ui.accordion.js" ></scr'+'ipt>');
	document.write('<scr'+'ipt type="text/javascript" src="' + jsRootPath + 'jquery/ui/jquery.ui.datepicker.js" ></scr'+'ipt>');
	
	//nicedit editor
	//document.write('<scr'+'ipt type="text/javascript" src="' + jsRootPath + 'nicEdit.js" ></scr'+'ipt>'); 
	
	//everything related to this application/website
	document.write('<scr'+'ipt type="text/javascript" src="' + jsRootPath + 'jquery.fancybox-1.3.1.js" ></scr'+'ipt>'); 
	document.write('<scr'+'ipt type="text/javascript" src="http://www.w3counter.com/tracker.js" ></scr'+'ipt>'); 
	document.write('<scr'+'ipt type="text/javascript" src="' + jsRootPath + 'swfobject.js" ></scr'+'ipt>');
}

includeAllJSFiles();
