
	var hideDelay = 500;
	var hideDelayTimer = null;
	
	function showdrop(Id, Class, Hidden){		
		
		$("input."+Class).click(function(){
			$(Id).css("display","block");
		});
		$(Id + " a").click(function(){
			$("input."+Class).val($(this).text());
			$("input."+Hidden).val($(this).attr("rel"));
			$(Id).css("display","none");
		});
		
		$(".drop").mouseover(function(){
			if (hideDelayTimer) clearTimeout(hideDelayTimer);				
				$(this).css("display","block");
		}).mouseout(function(){	
			if (hideDelayTimer) clearTimeout(hideDelayTimer);		
			hideDelayTimer = setTimeout(function () {
				hideDelayTimer = null;
				$(".drop").hide();				
			}, hideDelay);
		});			
	}	
	
	function fun_name1(txtfield, txt)
	{
		if(txtfield.value == txt)
			txtfield.value ='';			
	}
	function fun_name2(txtfield, txt)
	{
		if(txtfield.value.length == 0)
			txtfield.value = txt;
	}


	$(document).ready(function() {
		$("#rotator > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 0, true);
		showdrop('#drop1','show1','hidden1');
		showdrop('#drop2','show2','hidden2');
		$(".show1, .show2").mouseout(function(){	
			if (hideDelayTimer) clearTimeout(hideDelayTimer);		
			hideDelayTimer = setTimeout(function () {
				hideDelayTimer = null;
				$(".drop").hide();				
			}, hideDelay);
		});	
	});
		


