// JavaScript Document

$(function(){
	// top search
	$("#keyword").click(function(){
		$(this).select();							 
	});
//	if($("#keyword").val()=='') {
//		$("#keyword").val('Search');
//	}
	
	
	// accordion menu

	//$("#prodmenu ul").hide();
	//$("#prodmenu h2.open").next().show();

	$("#prodmenu h2 a:not(:last)").click(function(){
		$("#prodmenu ul:visible").slideUp("fast")
		$("#prodmenu h2").removeClass("open");
		$(this).parent().addClass("open");
		$(this).parent().next().slideDown("fast");
		return false;
	});



	// product lists	
	$(".product,.sproduct").hover(function(){
		$(this).addClass("producthover");						 
	},function(){
		$(this).removeClass("producthover");						 
	});
	
	$(".product,.sproduct").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});
	
	
	//news media
	
	$(".media").hover(function(){
		$(this).addClass("mediahover");						 
	},function(){
		$(this).removeClass("mediahover");						 
	});
	
	//$("a[rel*=facebox]").facebox();
	
	$("#faq dd").hide();
	$("#faq a").click(function(){
		$("#faq dd:visible").slideUp("fast");
		$("#faq dd").removeClass("open");
		$(this).parent().addClass("open");
		$(this).parent().next().slideDown("fast");
		return false;
	});
	
	
	//plus minus
	$("#prod_det h2").next().hide();
	
	$("#prod_det h2 a").click(function(){
		$(this).parent().next().toggle("fast");
		$(this).toggleClass("close") 
		return false;				
	});
	
	
//	$("#langlk").mouseover(function(){
//		$("#langmessage").fadeIn("slow");
//		setTimeout(function(){
//			$("#langmessage").fadeOut("slow");
//		}	
//		,3000);
//	});
	
	
	
});


function printit(){  
	if (window.print) {
		window.print() ;  
	} else {
		var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
		document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
		WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
	}
}