/*

	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
    ================================ */

$(window).load(function()
{
	thunder.client.modify.rollImages();
	//thunder.client.modify.linkOptions();
	//thunder.client.modify.tabSet();
	thunder.client.modify.treeMenu();
	//thunder.client.modify.selfLabelFields();
	//thunder.client.modify.requireFields();
	if($(".appTable")){
		$(".appTable tr td").css("border-bottom", "none");
		$(".appTable tr td").css("border-right", "none");
		$(".appTable tr:first td").css("border-top", "none");
		$(".appTable tr td:first-child").css("border-left", "none");
	}

	if($("#tour-360-swf").length > 0)
	{
		var so = new SWFObject("/flash/pano.swf", "tour-swf", "100%", "450", "9", "");
		//so.addVariable("basePath", "");
		so.addParam("quality", "high");
		so.addParam("wmode", "transparent");
		so.write("tour-360-swf");
	}

	if($("#sales-map-swf").length > 0)
	{
		var so = new SWFObject("/flash/sales-team-map.swf", "sales-map-swf", "920", "540", "9", "");
		so.addVariable("basePath", "/flash/");
		so.addParam("quality", "high");
		so.addParam("wmode", "transparent");
		so.write("sales-map-swf");
	}

	$(".content img").not(".appTable img").not("#teamlogin img").each( function(){
			//$(this).css("width", $(this).width()); 
			$(this).replaceWith("<div class=\"rounded\" style='" + $(this).attr("style") + "; width:" + $(this).width() + "px;'><img height='" + $(this).height() + "' width='" + $(this).width() + "' src=\"" + $(this).attr("src") + "\"></div>");
    });

	//if($(".appTable")){$('.content .appTable div.rounded').corner("20px br"); }
	//if($(".content div.rounded")){ $('.content div.rounded').corner("30px br"); }
	
});



function searchProduct(){
    var dd = $("#" + $("#productDD").val());
    if (dd.val() != '') window.location = dd.val();
}

function searchIndustry(){    
    var dd = $("#" + $("#industryDD").val());
    if (dd.val() != '') window.location = dd.val();
}

//$.fn.corner.defaults.useNative = false;

