﻿
function FlashProduct(	$target) {

	//alert("triggered");
	$target.effect("highlight", {'color' : '#feeb8c' ,'mode' : 'show' }, 2000).effect("highlight", {'color' : '#feeb8c' ,'mode' : 'show'}, 2000).effect("highlight", {'color' : '#feeb8c' ,'mode' : 'show'}, 2000);
}

$(window).scroll(function() {
	if (( browserVars.width >=800) && ( browserVars.height >=570))
{
		if ($("#chromemenusmall").css("visibility") == "visible")
		{
			$("#chromemenusmall").fadeOut();
		}
		
		if ($(window).scrollTop()> 99) {

			// reposition
			$("#chromemenu").css("top", $(window).scrollTop() + "px");
			
			if ($("#chromemenu").css("display") == "none")
			{
				$("#chromemenu").fadeIn("fast"); //fadeTo("fast",1);
			}

	if (cssdropdown.dropmenuobj){
		if (cssdropdown.dropmenuobj.style.visibility=="visible")
			{
			cssdropdown.dropmenuobj.style.visibility="hidden";}
			}

		}
		else
		{
			{

							// fadeOut open menu

								$("#openmenu").fadeOut();
				// reposition
				$("#chromemenu").css("top", $(window).scrollTop() + "px");
				$("#chromemenu").fadeOut("slow");//.fadeTo("fast",0);
			
			}
		//$("#openmenu").css("top", $(window).scrollTop() + "px");	
		// fadeIn open menu
		$("#openmenu").fadeIn();
		

		}
}
else
{
$("#chromemenusmall").fadeIn();
$("#openmenu").fadeOut();

$("#chromemenu").fadeOut();
}
});


$(document).ready(function(){
		cssdropdown.startchrome("chromemenu");

		$("#chromemenu").fadeOut();
      
	 browserVars.updateVars(); 
	if (( browserVars.width >=800) && ( browserVars.height >=570))
	{
		$("#chromemenusmall").fadeOut();
		$("#openmenu").fadeIn();

	}
	else
	{
		$("#chromemenusmall").fadeIn();
		$("#openmenu").fadeOut();
	}

	//alert( browserVars.width + "x" + browserVars.height);
	
if (( browserVars.width >=640) && ( browserVars.height >=430))
{
	LoadRightFloater();
}

	if (window.location.hash)
	{
		var $target =$(window.location.hash);

		$target = $target.length && $target || $('[name=' + window.location.hash.slice(1) +']');

            
		
				$target = $target.parents('table:first') ;
				
				var targetOffset = $target.offset().top-110;

                $('html,body').animate({scrollTop: targetOffset}, 1000, FlashProduct($target) );
                
                return false; // dan
                
		
	}
});

