$(function()
{	
	//
	function allhidet(id,id1){

			$("#togo1_c").hide();
			$("#togo2_c").hide();
			$("#togo3_c").hide();
			$("#togo4_c").hide();
			$(id1).fadeIn("slow",function(){});
	}
	$("#togo1").mouseover(function () {
	  allhidet("#togo1","#togo1_c")
    });
	$("#togo2").mouseover(function () {
	  allhidet("#togo2","#togo2_c")
    });
	$("#togo3").mouseover(function () {
	  allhidet("#togo3","#togo3_c")
    });
	$("#togo4").mouseover(function () {
	  allhidet("#togo4","#togo4_c")
    });
	
	
	
	//
	function allhide(id,id1){
			$("#search_service").removeClass();
			$("#search_info").removeClass();
			$("#search_hotel").removeClass();
			$("#service_s").hide();
			$("#info_s").hide();
			$("#hotel_s").hide();
			$(id).addClass("i_s_b");
			$(id1).fadeIn("slow",function(){});
		
	}
	$("#search_hotel").mouseover(function () {
	  allhide("#search_hotel","#hotel_s")
    });
	
	$("#search_service").mouseover(function () {
	  allhide("#search_service","#service_s")
    });
	
	$("#search_info").mouseover(function () {
	 allhide("#search_info","#info_s")
    });
	//日期选择
	$('.date-pick')
		.datePicker()
		.bind(
			'focus',
			function()
			{
				$(this).dpDisplay();
			}
		).bind(
			'blur',
			function(event)
			{
				// works good in Firefox... But how to get it to work in IE?
				if ($.browser.mozilla) {
					var el = event.explicitOriginalTarget
					var cal = $('#dp-popup')[0];
					while (true){
						if (el == cal) {
							return false;
						} else if (el == document) {
							$(this).dpClose();
							return true;
						} else {
							el = $(el).parent()[0];
						}
					}
				}
			}
		);
	
	//首页滑动
	function BraPanel_hide(id1,id2){

				$("#t1_c").slideUp();
				$("#t2_c").slideUp();
				$("#t3_c").slideUp();
				$("#t4_c").slideUp();
				$("#t1").parents("li").removeClass();
				$("#t2").parents("li").removeClass();
				$("#t3").parents("li").removeClass();
				$("#t4").parents("li").removeClass();
				$(id1).parents("li").addClass("Current");
				$(id2).slideDown("slow",function(){});

	}
	$("#t1").mouseover(function () {
		BraPanel_hide("#t1","#t1_c");
    });
	$("#t2").mouseover(function () {
		BraPanel_hide("#t2","#t2_c");
    });
	$("#t3").mouseover(function () {
		BraPanel_hide("#t3","#t3_c");
    });
	$("#t4").mouseover(function () {
		BraPanel_hide("#t4","#t4_c");
    });
	//show
	function showhide(id,id1){
		for(i=0;i<7;i++){
			$("#b"+i).hide();
		}
	}
	$("#bm0").mouseover(function () {
		showhide();
		$("#b0").show();
    });
	$("#bm1").mouseover(function () {
		showhide();
		$("#b1").show();
    });
	$("#bm2").mouseover(function () {
		showhide();
		$("#b2").show();
    });
	$("#bm3").mouseover(function () {
		showhide();
		$("#b3").show();
    });
	$("#bm4").mouseover(function () {
		showhide();
		$("#b4").show();
    });
	$("#bm5").mouseover(function () {
		showhide();
		$("#b5").show();
    });
	$("#bm6").mouseover(function () {
		showhide();
		$("#b6").show();
    });
	//时尚
	$("#f1").mouseover(function () {
					  $("#fff1").show();
					  $("#fff2").hide();
					  $("#fff3").hide();
	});
	$("#f2").mouseover(function () {
					  $("#fff1").hide();
					  $("#fff2").show();
					  $("#fff3").hide();
	});
	$("#f3").mouseover(function () {
			$("#fff1").hide();
			$("#fff2").hide();
			$("#fff3").show();
	});
	
	
});
function h(obj,url){obj.style.behavior='url(#default#homepage)';obj.setHomePage(url);}
