$(document).ready(function () {
setTimeout(executeActive, 5000);
$("#destinatinSearch").focus(function(){
$(this).val("");
});

$("#destinatinSearch").change(function(){$("#destinatinSearch").unbind("blur");
$("#destinatinSearch").unbind("focus");

});

$("#destinatinSearch").blur(function(){
$(this).val("请输入目的地或景区名称...");
});

$("#commentSearch").focus(function(){
$(this).val("");
});


$("#commentSearch").change(function(){$("#commentSearch").unbind("blur");
$("#commentSearch").unbind("focus");

});


$("#commentSearch").blur(function(){
$(this).val("请输入点评关键字...");
});

$("#ticketSearch").focus(function(){
$(this).val("");
});

$("#ticketSearch").blur(function(){
$(this).val("请输入门票景区名称...");
});


$("#ticketSearch").keydown(function(event){
$("#ticketSearch").unbind("blur");
$("#ticketSearch").unbind("focus");
if(event.keyCode==13) {
var keyword = $("#ticketSearch").val();
window.location="http://www.lvmama.com/pro/product!index.do?keyWord="+UniformResourceLocator.encode(keyword);
}
});


$("#destinatinSearch").keydown(function(event){
$("#destinatinSearch").unbind("blur");
$("#destinatinSearch").unbind("focus");
if(event.keyCode==13) {
var keyword = $("#destinatinSearch").val();
window.location="http://search.lvmama.com/search/placeSearch.do?keyword="+UniformResourceLocator.encode(keyword);
} 
});

$("#commentSearch").keydown(function(event){
$("#commentSearch").unbind("blur");
$("#commentSearch").unbind("focus");
if(event.keyCode==13) {
var keyword = $("#commentSearch").val();
window.location="http://cmt.lvmama.com/com/comment!commentIndex.do?keyword="+UniformResourceLocator.encode(keyword);
} 
});

})


$(document).ready(function () {
$("p[name='priceInfo']").each(
function(){
var id=$(this).attr("value");
var param={productId:id};
var div=this;
$.ajax({url:"/indexPakage/index/index!getPlacesProductById.do", type:"post", data:param,dataType:"json", success:function (data) {

			if (data.member!= null) {
			   div.innerHTML="现售价："+data.member+"元<br /><em>门市价："+data.mark+"元</em>";
			} 
		 
			}});
}
);
});

function executeActive(){
$("#firstDiv").hide();
$("#secondDiv").show();
}

$(document).ready(function () {
$("#commbutton").click(
function(){
var keyword = $("#commentSearch").val();
window.location="http://cmt.lvmama.com/com/comment!commentIndex.do?keyword="+UniformResourceLocator.encode(keyword);
}
);

$("#ticketSearchComm").click(function(){
var keyword = $("#ticketSearch").val();
window.location="http://www.lvmama.com/pro/product!index.do?keyWord="+UniformResourceLocator.encode(keyword);
});


$("#desComm").click(function(){
var keyword = $("#destinatinSearch").val();

window.location="http://search.lvmama.com/search/placeSearch.do?keyword="+UniformResourceLocator.encode(keyword);
});

});


function subSearchForm()
{
if(event.keyCode==13) {

} 
return false;
}