|
|
|
|
var sd = 0;
|
|
|
|
|
var ed = 100;
|
|
|
|
|
var sprice = 0;
|
|
|
|
|
var eprice = 100000;
|
|
|
|
|
var dsprice = 0;
|
|
|
|
|
var deprice = 100000;
|
|
|
|
|
var asprice = 0;
|
|
|
|
|
var aeprice = 100000;
|
|
|
|
|
var dtheme = "All";
|
|
|
|
|
var zShowMessages, resultcountE, rctSE, LineTypeDiv;
|
|
|
|
|
var totaladdons = 0,
|
|
|
|
|
totaltour = 0,
|
|
|
|
|
totaldaytrip = 0;
|
|
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
|
zShowMessages = $("#ZShowMsg");
|
|
|
|
|
resultcountE = $("#resultcount");
|
|
|
|
|
rctSE = $("#resultcounts");
|
|
|
|
|
LineTypeDiv = $("div[id^='Type_']")
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function ft(n, o) {
|
|
|
|
|
n = parseInt(n);
|
|
|
|
|
n > 1 ? $("#dayslen").hide() : $("#dayslen").show()
|
|
|
|
|
|
|
|
|
|
//for (t=0;t<o.parentNode.childNodes.length;t++){
|
|
|
|
|
//o.parentNode.childNodes[t].className="";
|
|
|
|
|
//}
|
|
|
|
|
$(o).parent().children().attr("class", "");
|
|
|
|
|
|
|
|
|
|
$(o).addClass("itemSelected");
|
|
|
|
|
if (n == 2) {
|
|
|
|
|
$("#daytriptheme").show();
|
|
|
|
|
$("#daytriptheme2").show();
|
|
|
|
|
} else {
|
|
|
|
|
$("#daytriptheme").hide();
|
|
|
|
|
$("#daytriptheme2").hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch (n) {
|
|
|
|
|
case 0:
|
|
|
|
|
$("#dpriceid").hide();
|
|
|
|
|
$("#apriceid").hide();
|
|
|
|
|
$("#tpriceid").show();
|
|
|
|
|
$("div.tourfilterList").show();
|
|
|
|
|
$("#linetypeName").show(); //<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
$("div.tourfilterList1").show();
|
|
|
|
|
$("div.tourfilterList2").show();
|
|
|
|
|
//$("#resultcount").text(totaladdons + totaltour + totaldaytrip);
|
|
|
|
|
selectFilterCategory("#PricePerPerson", "Price Per Person", "show");
|
|
|
|
|
selectFilterCategory("#Duration", "Duration", "show");
|
|
|
|
|
selectFilterCategory("#CategoriesDayTrips", "Categories");
|
|
|
|
|
selectFilterCategory("#CategoriesPrivateTours", "Categories", "show");
|
|
|
|
|
FadeCount(totaladdons + totaltour + totaldaytrip);
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
$("#dpriceid").hide();
|
|
|
|
|
$("#apriceid").hide();
|
|
|
|
|
$("#linetypeName").show(); //<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
$("#tpriceid").show();
|
|
|
|
|
$("div.tourfilterList").show();
|
|
|
|
|
$("div.tourfilterList1").hide();
|
|
|
|
|
$("div.tourfilterList2").hide();
|
|
|
|
|
//$("#resultcount").text(totaltour);
|
|
|
|
|
selectFilterCategory("#PricePerPerson", "Price Per Person", "show");
|
|
|
|
|
selectFilterCategory("#Duration", "Duration", "show");
|
|
|
|
|
selectFilterCategory("#CategoriesDayTrips", "Categories");
|
|
|
|
|
selectFilterCategory("#CategoriesPrivateTours", "Categories", "show");
|
|
|
|
|
FadeCount(totaltour);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
$("#dpriceid").show();
|
|
|
|
|
$("#apriceid").hide();
|
|
|
|
|
$("#linetypeName").hide(); //<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
$("#tpriceid").hide();
|
|
|
|
|
$("div.tourfilterList").hide();
|
|
|
|
|
$("div.tourfilterList1").show();
|
|
|
|
|
$("div.tourfilterList2").hide();
|
|
|
|
|
//$("#resultcount").text(totaldaytrip);
|
|
|
|
|
$(".filtercategory.cat").show();
|
|
|
|
|
selectFilterCategory("#PricePerPerson", "Price Per Person", "show");
|
|
|
|
|
selectFilterCategory("#Duration", "Duration");
|
|
|
|
|
selectFilterCategory("#CategoriesPrivateTours", "Categories");
|
|
|
|
|
selectFilterCategory("#CategoriesDayTrips", "Categories", "show");
|
|
|
|
|
FadeCount(totaldaytrip);
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
$("#dpriceid").hide();
|
|
|
|
|
//$("#apriceid").fadeIn(1);
|
|
|
|
|
$("#linetypeName").hide(); //<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
$("#tpriceid").hide();
|
|
|
|
|
$("div.tourfilterList").hide();
|
|
|
|
|
$("div.tourfilterList1").hide();
|
|
|
|
|
$("div.tourfilterList2").show();
|
|
|
|
|
//$("#PricePerPerson").hide();
|
|
|
|
|
selectFilterCategory("#PricePerPerson", "Price Per Person");
|
|
|
|
|
selectFilterCategory("#Duration", "Duration");
|
|
|
|
|
selectFilterCategory("#CategoriesPrivateTours", "Categories");
|
|
|
|
|
selectFilterCategory("#CategoriesDayTrips", "Categories");
|
|
|
|
|
//$("#resultcount").text(totaladdons);
|
|
|
|
|
FadeCount(totaladdons);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function selectFilterCategory(i, t, v){
|
|
|
|
|
$(".filtercategory.cat").each(function(){
|
|
|
|
|
//alert($(this).text());
|
|
|
|
|
var filtercategory_tite = $(this).text();
|
|
|
|
|
if (filtercategory_tite == t){
|
|
|
|
|
if (v == "show"){
|
|
|
|
|
$(this).show();
|
|
|
|
|
$(i).show();
|
|
|
|
|
}else{
|
|
|
|
|
$(this).hide();
|
|
|
|
|
$(i).hide();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fp(n, o) {
|
|
|
|
|
|
|
|
|
|
$(o).parent().children().attr("class", "");
|
|
|
|
|
|
|
|
|
|
$(o).addClass("itemSelected");
|
|
|
|
|
switch (n) {
|
|
|
|
|
case 0:
|
|
|
|
|
sprice = 0;
|
|
|
|
|
eprice = 100000;
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
sprice = 0;
|
|
|
|
|
eprice = 100;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
sprice = 100;
|
|
|
|
|
eprice = 200;
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
sprice = 200;
|
|
|
|
|
eprice = 400;
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
sprice = 400;
|
|
|
|
|
eprice = 700;
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
sprice = 700;
|
|
|
|
|
eprice = 100000;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cc = 0;
|
|
|
|
|
for (t = 0; t < $("div.tourfilterList").size(); t++) {
|
|
|
|
|
if (parseInt($("div.tourfilterList").eq(t).children(".tourPrice").children(".redPrice12Bold.red_price").text().replace("$", "")) >= sprice && parseInt($("div.tourfilterList").eq(t).children(".tourPrice").children(".redPrice12Bold.red_price").text().replace("$", "")) <= eprice) {
|
|
|
|
|
|
|
|
|
|
if (parseInt($("div.tourfilterList").eq(t).children("div").children("ul").children("li").eq(1).text().split(":")[1].split("Da")[0]) >= sd && parseInt($("div.tourfilterList").eq(t).children("div").children("ul").children("li").eq(1).text().split(":")[1].split("Da")[0]) <= ed) {
|
|
|
|
|
$("div.tourfilterList").eq(t).show();
|
|
|
|
|
cc++;
|
|
|
|
|
//alert(1);
|
|
|
|
|
} else {
|
|
|
|
|
$("div.tourfilterList").eq(t).hide();
|
|
|
|
|
//alert(2);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$("div.tourfilterList").eq(t).hide();
|
|
|
|
|
//alert(3);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//var rstnum = getresults();
|
|
|
|
|
//$("#resultcount").text(rstnum);
|
|
|
|
|
FadeCount(getresults());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fd(n, o) {
|
|
|
|
|
$(o).parent().children().attr("class", "");
|
|
|
|
|
$(o).addClass("itemSelected");
|
|
|
|
|
// alert($("div.tourfilterList").eq(2).childNodes("div").childNodes("ul").childNodes("li").eq(0).text().split(":")[1].split("Da")[0].trim());
|
|
|
|
|
//alert($("div.tourfilterList").eq(2).childNodes(".tourPrice").childNodes(".redPrice12Bold.red_price").text());
|
|
|
|
|
switch (n) {
|
|
|
|
|
case 0:
|
|
|
|
|
sd = 0;
|
|
|
|
|
ed = 100;
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
sd = 0;
|
|
|
|
|
ed = 1;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
sd = 2;
|
|
|
|
|
ed = 3;
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
sd = 4;
|
|
|
|
|
ed = 5;
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
sd = 6;
|
|
|
|
|
ed = 8;
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
sd = 8;
|
|
|
|
|
ed = 100;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cc = 0;
|
|
|
|
|
for (t = 0; t < $("div.tourfilterList").size(); t++) {
|
|
|
|
|
if (parseInt($("div.tourfilterList").eq(t).children("div").children("ul").children("li").eq(1).text().split(":")[1].split("Da")[0]) >= sd && parseInt($("div.tourfilterList").eq(t).children("div").children("ul").children("li").eq(1).text().split(":")[1].split("Da")[0]) <= ed) {
|
|
|
|
|
if (parseInt($("div.tourfilterList").eq(t).children(".tourPrice").children(".redPrice12Bold.red_price").text().replace("$", "")) >= sprice && parseInt($("div.tourfilterList").eq(t).children(".tourPrice").children(".redPrice12Bold.red_price").text().replace("$", "")) <= eprice) {
|
|
|
|
|
$("div.tourfilterList").eq(t).show();
|
|
|
|
|
cc++;
|
|
|
|
|
} else {
|
|
|
|
|
$("div.tourfilterList").eq(t).hide();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$("div.tourfilterList").eq(t).hide();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//var rstnum = getresults();
|
|
|
|
|
//$("#resultcount").text(rstnum);
|
|
|
|
|
FadeCount(getresults());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fdt(n, o) {
|
|
|
|
|
dtheme = $(o).text();
|
|
|
|
|
//o2 = document.getElementById("daytriptheme");
|
|
|
|
|
//for (t=0;t<o2.childNodes.length;t++){
|
|
|
|
|
// o2.childNodes[t].className="";
|
|
|
|
|
// }
|
|
|
|
|
$("#daytriptheme").children().attr("class", "");
|
|
|
|
|
$("#daytriptheme2").children().attr("class", "");
|
|
|
|
|
$(o).addClass("itemSelected");
|
|
|
|
|
//o2 = document.getElementById("daytriptheme2");
|
|
|
|
|
// for (t=0;t<o2.childNodes.length;t++){
|
|
|
|
|
// o2.childNodes[t].className="";
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
cc = 0;
|
|
|
|
|
//for (t=0;t<$("div.tourfilterList1").size();t++){
|
|
|
|
|
// ppp = parseInt($("div.tourfilterList1").eq(t).children(".tourPrice").children(".redPrice12Bold.red_price").text().replace("$",""));
|
|
|
|
|
// if ($("div.tourfilterList1").eq(t).children("div").children("ul").children("li").eq(1).text()==$(o).text()){
|
|
|
|
|
// if (ppp>=dsprice && ppp<=deprice){
|
|
|
|
|
// $("div.tourfilterList1").eq(t).show();
|
|
|
|
|
// cc++;
|
|
|
|
|
// }else{
|
|
|
|
|
// $("div.tourfilterList1").eq(t).hide();
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// else{
|
|
|
|
|
// if ($(o).text()=="All"){
|
|
|
|
|
// if (ppp>=dsprice && ppp<=deprice){
|
|
|
|
|
// $("div.tourfilterList1").eq(t).show();
|
|
|
|
|
// cc++;
|
|
|
|
|
// }else{
|
|
|
|
|
// $("div.tourfilterList1").eq(t).hide();
|
|
|
|
|
// }
|
|
|
|
|
// }else{
|
|
|
|
|
// $("div.tourfilterList1").eq(t).hide();
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
$(".tourfilterList1").each(function() {
|
|
|
|
|
|
|
|
|
|
var ppp = parseInt($(this).find(".red_price").text().replace("$", "")),
|
|
|
|
|
tmpe = $(o).text().replace(/(^\s*)|(\s*$)/g, "");
|
|
|
|
|
|
|
|
|
|
if ($(this).find("li:first").text().replace(/(^\s*)|(\s*$)/g, "") == tmpe) {
|
|
|
|
|
if (ppp >= dsprice && ppp <= deprice) {
|
|
|
|
|
$(this).show();
|
|
|
|
|
cc++;
|
|
|
|
|
} else {
|
|
|
|
|
$(this).hide();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (tmpe == "All") {
|
|
|
|
|
if (ppp >= dsprice && ppp <= deprice) {
|
|
|
|
|
$(this).show();
|
|
|
|
|
cc++;
|
|
|
|
|
} else {
|
|
|
|
|
$(this).hide();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$(this).hide();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//var rstnum = getresults();
|
|
|
|
|
//$("#resultcount").text(rstnum);
|
|
|
|
|
//FadeCount(getresults());
|
|
|
|
|
FadeCount(cc);
|
|
|
|
|
//alert($("div.tourfilterList1").eq(3).childNodes("div").childNodes("ul").childNodes("li").eq(1).text());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fpday(n, o) {
|
|
|
|
|
n = parseInt(n);
|
|
|
|
|
// for (t=0;t<o.parentNode.childNodes.length;t++){
|
|
|
|
|
// o.parentNode.childNodes[t].className="";
|
|
|
|
|
// }
|
|
|
|
|
// o.className="itemSelected";
|
|
|
|
|
$(o).parent().children().attr("class", "");
|
|
|
|
|
|
|
|
|
|
$(o).addClass("itemSelected");
|
|
|
|
|
|
|
|
|
|
switch (n) {
|
|
|
|
|
case 0:
|
|
|
|
|
dsprice = 0;
|
|
|
|
|
deprice = 100000;
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
dsprice = 0;
|
|
|
|
|
deprice = 20;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
dsprice = 20;
|
|
|
|
|
deprice = 40;
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
dsprice = 40;
|
|
|
|
|
deprice = 60;
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
dsprice = 60;
|
|
|
|
|
deprice = 90;
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
dsprice = 90;
|
|
|
|
|
deprice = 100000;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cc = 0;
|
|
|
|
|
for (t = 0; t < $("div.tourfilterList1").size(); t++) {
|
|
|
|
|
//alert($("div.tourfilterList1").eq(t).childNodes(".tourPrice").childNodes(".redPrice12Bold.red_price").text()+":"+t);
|
|
|
|
|
tmpprice = parseInt($("div.tourfilterList1").eq(t).children(".tourPrice").children(".redPrice12Bold.red_price").text().replace("$", ""));
|
|
|
|
|
if (tmpprice >= dsprice && tmpprice <= deprice) {
|
|
|
|
|
oo2 = $("div.tourfilterList1").eq(t).children("div").children("ul").children("li").eq(1).text();
|
|
|
|
|
if (oo2 == dtheme || dtheme == "All") {
|
|
|
|
|
$("div.tourfilterList1").eq(t).show();
|
|
|
|
|
cc++;
|
|
|
|
|
} else {
|
|
|
|
|
$("div.tourfilterList1").eq(t).hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
$("div.tourfilterList1").eq(t).hide();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//var rstnum = getresults();
|
|
|
|
|
//$("#resultcount").text(rstnum);
|
|
|
|
|
FadeCount(getresults());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getresults() {
|
|
|
|
|
grs = 0;
|
|
|
|
|
for (t = 0; t < $("div.tourfilterList").size(); t++) {
|
|
|
|
|
if ($("div.tourfilterList").eq(t).css("display") == "block") grs++;
|
|
|
|
|
}
|
|
|
|
|
for (t = 0; t < $("div.tourfilterList1").size(); t++) {
|
|
|
|
|
if ($("div.tourfilterList1").eq(t).css("display") == "block") grs++;
|
|
|
|
|
}
|
|
|
|
|
for (t = 0; t < $("div.tourfilterList2").size(); t++) {
|
|
|
|
|
if ($("div.tourfilterList2").eq(t).css("display") == "block") grs++;
|
|
|
|
|
}
|
|
|
|
|
return grs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showlinetype(e) {
|
|
|
|
|
var txt = e.getAttribute("name");
|
|
|
|
|
$("#linetypeName td").removeClass("itemSelected");
|
|
|
|
|
e.className = "itemSelected";
|
|
|
|
|
|
|
|
|
|
if (LineTypeDiv.length > 0) {
|
|
|
|
|
var ii = 0;
|
|
|
|
|
if (txt) {
|
|
|
|
|
LineTypeDiv.each(function() {
|
|
|
|
|
|
|
|
|
|
var tE = $(this);
|
|
|
|
|
|
|
|
|
|
if (tE.attr("id").indexOf(txt) > 0) {
|
|
|
|
|
ii++;
|
|
|
|
|
tE.show();
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
tE.hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
LineTypeDiv.show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FadeCount(ii);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><>ѡ<EFBFBD><D1A1><EFBFBD>ĸ<EFBFBD><C4B8><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>
|
|
|
|
|
function FadeCount(Num) {
|
|
|
|
|
if (typeof Num != "number") return;
|
|
|
|
|
|
|
|
|
|
if (resultcountE) {
|
|
|
|
|
resultcountE = $("#resultcount");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resultcountE.text(Num);
|
|
|
|
|
|
|
|
|
|
//<2F><>ʾtour<75><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ <20><>Ϊ0<CEAA><30>ʾ
|
|
|
|
|
if (Num > 1) {
|
|
|
|
|
rctSE.text("tours");
|
|
|
|
|
zShowMessages.hide();
|
|
|
|
|
} else {
|
|
|
|
|
rctSE.text("tour");
|
|
|
|
|
|
|
|
|
|
if (Num < 1) {
|
|
|
|
|
zShowMessages.show();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|