/* * Copyright (c) 2011 China Highlights * //www.chinahighlights.com/ * * Date: 2011/10/10 * Describe: Tansfer 页面脚本 */ $(function(){ var sdates = $("#dateline,#dateline2,#dropdateline,#dropdateline2") .datepicker({showAnim:"fadeIn",duration:0,minDate: 0, maxDate:"1y",numberOfMonths: 2,showButtonPanel: true}); $('span[id*=hisTip]').CHtip({ClassName:"CHtip"}); $(".tranferNav li").click( function(){ $(".tranferNav li").removeClass("active"); $(this).addClass("active"); $("#contentflightRight form").hide().filter("#"+$(this).attr("subid")).show(); } ).css("cursor","pointer"); $("#price").change(function(){ if($(this).val()=="3"){ $(this).parents("form").attr("action","/china-flights/searchresult.asp"); $("#inlandFlight").hide(); $("#outlandFlight").show(); $("#triptypeDiv").hide(); $("#triptypeDiv").find("span").eq(1).hide().end().eq(0).find("input").trigger("click"); }else{ $("#triptypeDiv").show(); $(this).parents("form").attr("action","/china-flights/postquery.asp"); $("#triptypeDiv").find("span").show(); $("#inlandFlight").show(); $("#outlandFlight").hide(); if($(this).val()=="1"){ $("#startCode1").html(citystr); $("#destinationCode1").html(citystr1); }else{ $("#startCode1").html(cityHM); $("#destinationCode1").html(cityHM).val('PEK'); } } }); $("#flightSearchBox :radio").click(function(){ $("#flightSearchBox label:last").hide(1); if($(this).val()=="2"){ $("#flightSearchBox label:last").show(1); } }); $("#takeoffDate1").datepicker( {showAnim:"fadeIn",duration:0,minDate: 0,maxDate:"2y",numberOfMonths: 2,showButtonPanel: true} ); $("#takeoffDate2").datepicker( {showAnim:"fadeIn",duration:0,minDate: 0,maxDate:"2y",numberOfMonths: 2,showButtonPanel: true,onSelect:function(dateStr){ if(new Date(dateStr).getTime()