/*

	Filename             sitewide.js
	Detail               Site functionality
	Author:              thunder::tech inc.
	License:             CLIENT is defined as the owner of online property from which this file resides or this code is referenced in.
						 ADDITIONAL PARTY is defined as anyone other than thunder::tech or CLIENT.
						 No right is granted to ADDITIONAL PARTY to sell, distribute, modify or otherwise transfer the following source code without explicit written permission by CLIENT or thunder::tech.

*/

/*  ================================
     Sitewide JavaScript
    ================================ */

var Project = {};

Project.pageLoaded = function()
{
	//thunder.client.project.flashReplace();
	//thunder.client.modify.rollImages();
	//thunder.client.modify.linkOptions();
	//thunder.client.modify.tabSet();
	Project.menuWidth = 0;
	thunder.client.modify.treeMenu(false, [Project.menu]);
	//thunder.client.modify.treeMenu(false, [thunder.client.modes.separatorTreeMenu]);
	//thunder.client.modify.treeMenu(false, [thunder.client.modes.imageTreeMenu]);
	thunder.client.modify.selfLabelFields();
	if(Project.menuWidth > 630)
	{
		$('.menu-heading').css('font-size', '13px');
	}
	if($.browser.msie && ($.browser.version <= 6))
	{
		$('.lighthouse, .dropdown-cap, .menu-cap, .opener h1').css('display', 'none');
		$('.menu-dropdown').css('background', '#839E79');
	}
	//thunder.client.modify.requireFields();
	//thunder.client.modify.dropSelector(true);
	//thunder.client.modify.scrollFeature(640, 3000, 500);
}

Project.menu = {
	over: function(obj)
	{
	},
	out: function(obj)
	{
	},
	init: function(obj)
	{
		var menuItem = $(obj);
		var w = menuItem.children('.menu-heading').width();
		menuItem.children('.menu-dropdown').css({left: (w / 2) - 74});
		Project.menuWidth += w;
	}
}

Project.flashReplace = function()
{
	var so;
	so = new SWFObject("flash/swf1.swf", "swf-obj-1", "300", "250", "9", "");
	so.addParam("quality", "high");
	so.addParam("wmode", "transparent");
	so.write("swf-holder-1");
}

$(Project.pageLoaded);
