$(document).ready(function() {

	// company sites drop down configuration	
	$(".company-sites-list td:last").css({wordSpacing:"10px"});

	$(".company-sites-list td:last").hide();
	
	$(".company-sites-list td:first").click(function(){
		$(".company-sites-list td:last").slideToggle("fast");
	});
	
	// worldwide sites (companysitelandingpage) config
	$("#worldwide-sites ul").hide();
	$("#worldwide-sites li").click(function(){
		$(this).find("ul:first").slideToggle("slow");
	});
	
	// add in arrows
	//$(".firstlvl ul").siblings().prepend("<img src='../test/images/menuarrow.png' alt='Radius Solutions'/> ");
	//$(".firstlvl ul").siblings().append(">");
	//$(".firstlvl ul").siblings().append("<img src='../test/images/menuarrow.png' alt='Radius Solutions'/> ");
	$(".firstlvl ul").siblings().addClass("arrowmenu");
	$(".firstlvl ul").siblings().hover(function(){
		$(this).addClass("arrowmenuhover");
	},function(){
		$(this).removeClass("arrowmenuhover");
	});
	
	// menu hover effects
	//$(".firstlvl li").hover(function(){
	//	$(this).find("span").addClass("firstlvlarrowhover");
	//},function(){
	//	$(this).find("span").removeClass("firstlvlarrowhover");
	//});

	// LHS menu configuration
	/*$(".firstlvl li").not(".secondlvl li").not("li:last-child").not("li:first-child").addClass("lvl-one-bg");
	$(".firstlvl li:last-child").not(".secondlvl li").addClass("lvl-one-bottom");
	$(".firstlvl li:first-child").not(".secondlvl li").addClass("lvl-one-top");
	
	$(".secondlvl li").not(".thirdlvl li").not("li:last-child").not("li:first-child").addClass("lvl-two-bg");
	$(".secondlvl li:last-child").not(".thirdlvl li").addClass("lvl-two-bottom");
	$(".secondlvl li:first-child").not(".thirdlvl li").addClass("lvl-two-top");
	
	$(".thirdlvl li").not("li:last-child").not("li:first-child").addClass("lvl-three-bg");
	$(".thirdlvl li:last-child").addClass("lvl-three-bottom");
	$(".thirdlvl li:first-child").addClass("lvl-three-top");*/

	// Add margin above "event" header
	//$("#dRight dt").not("dt:first").addClass("rhsmargin");
	
	// Rounding of RHS menu background
	/*$("#dRight dt").addClass("rhsroundtop");
	// If the top dt tag was empty, append "More" to it so it shows the rounded background
	$("#dRight dt:empty").text("More");
	
	// find dt tag, select previous element and add class
	$("#dRight dt").prev().addClass("rhsroundbottom");
	// find last dd tag and add class
	$("#dRight dd:last").addClass("rhsroundbottom");
	
	// find all dd tags and change bg colour
	$("#dRight dd").not(".rhsroundbottom, .rhsroundtop").addClass("rhsall");*/

	// add the brochure button to the bottom of the left nav block
	//var brochureHeight = $(document).height(); 
	//brochureHeight = brochureHeight - 100;
	//$(".childlist ul:first").append("<div id='brochure'>test</div>");
	//$("#brochure div").css({top:brochureHeight}); 


 });
