$(document).ready(function() {
	
	
	$('#Home div#main').addClass('mainFlower');
	$pageLocation = $('body').attr("id");
	
	$('#nav a img').each(function(){
		if($pageLocation == $(this).attr("id").substring(6)){
			$(this).css("background", "url('images/" + $(this).attr("id") + "On.gif')" );
		} 
	});
	/*
	$pageHeight = $pageLocation == "OperatingUnites" ? 1020 : $pageLocation == "Home" ? 540 : 870;
	$MarginBottom = -7;
	$leftColHeight = $pageLocation == "Home" ? 203 : $pageHeight + $MarginBottom;
	$rightColHeight = $leftColHeight - 30;
	
	
	$('#' + $pageLocation + ' div#main').css("height", $pageHeight + "px");
	$('#' + $pageLocation + ' div#main #leftCol').css("height", $leftColHeight + "px");
	$('#' + $pageLocation + ' div#main #leftCol').css("margin-bottom", $MarginBottom + "px");
	$('#' + $pageLocation + ' div#main #rightCol').css("height", $rightColHeight + "px");
	$('#' + $pageLocation + ' div#main #rightCol').css("margin-bottom", $MarginBottom + "px");
	
	$rightMsg = $('body').attr("class");
	$("#" + $rightMsg).show("fast");	
	$('#nav a img').each(function(){
		if($pageLocation == $(this).attr("id").substring(6)){
			$(this).css("background", "url('images/" + $(this).attr("id") + "On.gif')" );
		} 
	});
	
	$('#ouSubNav a').each(function(){
		//alert($('#ouSubNav').attr('class'));
		if($('#ouSubNav').attr('class') == $(this).text()){
			$(this).css("font-weight", "bold" );
		} 
	});	

	$('#selectBox').hover(function(){
		$('.selectBoxOptions').show('slow');
	},function(){   
		$('.selectBoxOptions').hover(function(){
		},function(){   
			$('.selectBoxOptions').hide('slow');
		});
	});*/
	
	$navItem = $('#nav' + $pageLocation);
	$navItem.slideDown('fast');
	$('#' + $pageLocation + 'Arrow').attr("src","images/leftColArrowOpen.gif");
	$navItem.children().each(function(){
		if($(this).text() == $("#centerCol").attr("class")){
			$(this).css("color", "#51A4DB");
		}
	});
	
	$('.productThumbs').fadeTo("slow", 0.4);
	
	$('#productBoxs a').lightBox().click(function(){
		$lightboxContent = "<img src='images/lightboxTop.png' width='900' height='18'/><div id='lightboxContent'><img src='images/lightBoxCloseBtn.gif' width='67' height='21' id='lightboxClose'/>";
		$lightboxContent += "</div><img src='images/lightboxBottom.png' width='900' height='31'/>";
		$('#jquery-lightbox').empty().append($lightboxContent);
		$('.current').fadeTo("slow", 1);
		$('#' + $(this).attr('href')).appendTo("#lightboxContent").show();
		$('#jquery-lightbox').unbind('click');
		$('#lightboxClose').click(function () {
			$('#lightboxContent').children('div').appendTo('body').hide();
			$('#jquery-lightbox').hide().remove();
			$('#jquery-overlay').fadeOut('fast').remove();
		});
    
		$('.productThumbs a').click(function(event){
			$('#lightboxContent').children('div').hide();
			$("#" + $(this).attr('href')).appendTo("#lightboxContent").show();
			event.preventDefault();
		});
	});
	
}); 