/*

	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
    ================================ */

thunder.client.project.pageLoaded = function()
{
	//thunder.client.project.flashReplace();
	//thunder.client.modify.rollImages();
	//thunder.client.modify.linkOptions();
	//thunder.client.modify.tabSet();
	//thunder.client.modify.treeMenu(false);
	//thunder.client.modify.treeMenu(false, [thunder.client.modes.separatorTreeMenu]);
	//thunder.client.modify.treeMenu(false, [thunder.client.modes.imageTreeMenu]);
	//thunder.client.modify.selfLabelFields();
	//thunder.client.modify.requireFields();
	//thunder.client.modify.dropSelector(true);
	//thunder.client.modify.scrollFeature(640, 3000, 500);
	//thunder.client.workarounds.alphaImages();
	thunder.client.workarounds.labelAsBrowser();
	
	$(".hideable").click(function(){
		var temp = $(this);
		if($(".text", this).css("display") == "block"){ $(".text", this).css("display", "none"); }
		
		$(".hiding", this).slideToggle("slow", function(){
			if($(".text", temp).css("display") == "none" && $(this).is(":hidden")){ $(".text", temp).css("display", "block"); }
		});
	});
	$(".hiding").each(function(){
	    $(".item:last", this).css("border", "none");
	});
	setTimeout(function(){ $(".hiding:first").slideToggle("slow"); $(".hideable:first .text").css("display", "none");  }, 2000);
}

thunder.client.project.flashReplace = function()
{
	$('.flash-billboard').flash(
		{
			swf: 'flash/billboard.swf',
			height: 200,
			width: 800,
			allowFullScreen: true,
			allowScriptAccess: 'always',
			hasVersion: 9,
			wmode: 'transparent',
			flashvars: {
				basePath: ''
			}
		}
	);
}

$(thunder.client.project.pageLoaded);
