$(document).ready(function(){ 
	if($(".content_container").parent().parent().css("width") == "675px")
		$(".content_container").parent().parent().css("width","auto");
	$(".page-intro").load("page_introduction.html");
	$(".rightnav_container").load("rightnav.html","",function(){
		rightNavAdjustments();
	});
})


function trackPage() {
var x = window.location.href.split("corporate-responsibility/")[1];
showContactForm(x);
}


function showContactForm(campaignId) {
	/*var vHeight = ($(window).height() <= 530) ? $(window).height()-50 : 530;
	var vWidth = ($(window).width() <= 400) ? $(window).width()-30 : 400;*/
	var campaign = (campaignId == undefined?"Product Page":campaignId);
	var vHeight = 538;
	var vWidth = 371;
	var pagesource = (window.location.pathname).replace(window.location.search, '').replace('/sites/dotcom', '');
	var url = "/sites/dotcom/common/contact_brocade.html?campaign="+campaign+"&source="+pagesource+"&TB_iframe=true&height="+vHeight+"&width="+vWidth+"&scroll=no"
	//var campaign = "Market Segmentation Sales";
	//var url = "/sites/dotcom/common/contact_brocade.html?campaign="+campaignId+"&source="+pagesource+"&TB_iframe=true&height="+vHeight+"&width="+vWidth+"&scroll=no"
	tb_show('',url,'');
	/*if($.browser.msie){
		window.location = '#top';
	}
	if(typeof DD_belatedPNG != "undefined")
		DD_belatedPNG.fix('#TB_closeWindowButton');*/
	return false;
}

function showContactForm_backup() {
	var vHeight = 538;
	var vWidth = 371;
	
	var pagesource = window.location.pathname;
	pagesource = pagesource.replace('/sites/dotcom', '');
	
	var url = "/sites/dotcom/company/corporate-responsibility/contact_us2.html?source="+pagesource+"&TB_iframe=true&height="+vHeight+"&width="+vWidth+"&scroll=no"
	tb_show('',url,'');
	if($.browser.msie){
		window.location = '#top';
	}
	if(typeof DD_belatedPNG != "undefined")
		DD_belatedPNG.fix('#TB_closeWindowButton');
	return false;
}

function rightNavAdjustments()
{
	$(".videosContainer").parent().attr("class","videosList");
	jQuery.each(jQuery.browser, function(i) {
	  /*if($.browser.msie){
		 $(".rhs_contents").css("width","197px");
	  }*/
	  if($.browser.msie && parseInt($.browser.version) <= 6)
	  {
		  $(".video_thumb").css("margin","10px 6px 10px 5px");
			pngFixInit();
	  }
	});
}

