You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
2.8 KiB
JavaScript

// JavaScript Document
$(function(){
var html = '';
html += "<div class=\"inpageTailor\">";
html += "<div class=\"tailorForm\">";
html += "<div class=\"tailorContent\">Change it to suit! - 90% of our clients tailor the tour to suit their price & interests!";
html += "<\/div>";
html += "<div class=\"tailorButton\"><a href=\"//www.chinahighlights.com\/tour\/create-my-trip.htm\">Create My Trip Now<\/a> <span class=\"promiseWords\">No extra cost<\/span> <\/div>";
html += "<div class=\"clear\"><\/div>";
html += "<\/div>";
html += "<\/div>";
html += " <div class=\"TailorPhone\">";
html += " <div class=\"numberLeft\">Free Call ";
html += " <span class=\"telNo\">";
html += " <strong id=\"USA-CA\">800-268 2918<\/strong> ";
html += " <strong id=\"Australia\" style=\"display: none\">1800-764 678<\/strong>";
html += " <strong id=\"UK\" style=\"display: none;\">0800-032 7753<\/strong>";
html += " <strong id=\"China\" style=\"display: none;\">800-879 3007<\/strong>";
html += " <strong id=\"Other-Area\" style=\"display: none;\">86-773-283 1999<\/strong> ";
html += " from";
html += " <\/span>";
html += " <\/div>";
html += " <span id=\"fp\"><span>USA & CA<\/span> <img src=\"\data:image/gif;base64,R0lGODlhCwALANUAAAAAAP///9UYHNQYHOEaG9wZG9wZHNwaG9waHNsaG9UXHcwWHcwWHssWHdUYHdQYHcwXHcwXHssXHsIVHsIVH7gUH7kTILgTH7gTILASIK8SILkUILgUILATIagQIakRIqgRIagRIrASIa8SIaMQIv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACUALAAAAAALAAsAAAZQwBJhSCQKi0jCwVAoIAyIZgIxcAQUA8HjERAIJIxAYMGIiBuQCWUibk/UmM3F0t5wKhhRRjMSBUQjGRkdIR8hICAeIR6IHySPkJEkJZKRJUEAOw==\"><\/span>";
html += " <div class=\"moretelNo\" style=\"display: none;\">";
html += " <ul>";
html += " <li id=\"USA-CA\" style=\"display: none;\">USA & CA<\/li>";
html += " <li id=\"Australia\">Australia<\/li>";
html += " <li id=\"UK\">UK<\/li>";
html += " <li id=\"China\">China<\/li>";
html += " <li id=\"Other-Area\">Other Area<\/li>";
html += " <\/ul>";
html += " <\/div>";
html += " <\/div>";
$("#tailor-in-page").html(html);
var tel_list = [];
$(".moretelNo ul li").each(function(){
tel_list.push($(this).text());
});
$("#fp,#fp img").click(function(){
$("#fp").addClass("freePhone");
$(".moretelNo").show(100);
$(".moretelNo ul li").show();
$(".moretelNo ul li:eq("+jQuery.inArray($("#fp span").text(), tel_list)+")").hide();
});
$(".moretelNo ul li").click(function(){
$(".telNo strong").hide();
$("#"+ $(this).attr("id")).show();
$("#fp span").html("");
$("#fp span").html(tel_list[jQuery.inArray($(this).text(), tel_list)]);
$("#fp").removeClass("freePhone");
$(".moretelNo").hide(100);
});
});