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.

157 lines
6.3 KiB
JavaScript

<<<<<<< question-form-tour.js
//Tip
$(function(){
$('.couponPromo').mouseenter(
function(e)
{
$('.couponTip').show(100);
}
)
$('.couponPromo').mouseleave(
function()
{
var _tobj = setTimeout(function(){
$('.couponTip').hide(100);
},50);
$('.couponTip').mouseenter(function(){
clearTimeout(_tobj);
});
}
)
$('.couponTip').mouseleave(function(){
var _tobjs = setTimeout(function(){
$('.couponTip').hide(100);
},50);
$('.couponPromo').mouseenter(function(){
clearTimeout(_tobjs);
});
});
});
document.writeln("<script type='text/javascript' src='http://data.chinahighlights.com/js/jquery.sticky-kit.js'>\<\/script>");
document.writeln("<script type='text/javascript' src='http://data.chinahighlights.com/js/in-field-labels/jquery.infieldlabel.min.js'>\<\/script>");
document.writeln("<script type='text/javascript' src='http://data.chinahighlights.com/js/validation/jquery.validate.min.js'>\<\/script>");
=======
//Tip
$(function(){
$('.couponPromo').mouseenter(
function(e)
{
$('.couponTip').show(100);
}
)
$('.couponPromo').mouseleave(
function()
{
var _tobj = setTimeout(function(){
$('.couponTip').hide(100);
},50);
$('.couponTip').mouseenter(function(){
clearTimeout(_tobj);
});
}
)
$('.couponTip').mouseleave(function(){
var _tobjs = setTimeout(function(){
$('.couponTip').hide(100);
},50);
$('.couponPromo').mouseenter(function(){
clearTimeout(_tobjs);
});
});
});
if( typeof(questiontype) == "undefined") {
questiontype = ""
}
document.writeln("<script type='text/javascript' src='http://data.chinahighlights.com/js/jquery.sticky-kit.js'>\<\/script>");
document.writeln("<script type='text/javascript' src='http://data.chinahighlights.com/js/in-field-labels/jquery.infieldlabel.min.js'>\<\/script>");
document.writeln("<script type='text/javascript' src='http://data.chinahighlights.com/js/validation/jquery.validate.min.js'>\<\/script>");
>>>>>>> 1.5
document.writeln("<form action=\"/forms/reserve-tour-simple-save.asp\" id=\"formquestion\" method=\"post\" novalidate=\"novalidate\">");
document.writeln("<div id=\"questionBox\"> ");
<<<<<<< question-form-tour.js
document.writeln("<div class=\"couponPromo\">");
document.writeln(" <span class=\"couponText\">April Offer <b>$25 Coupon</b></span>");
document.writeln(" <span class=\"rightBlock\"></span>");
document.writeln(" </div>");
document.writeln(" <div class=\"couponTip\">");
document.writeln(" <span class=\"arrowUp\"></span>");
document.writeln(" <ol>");
document.writeln(" <li>Send your inquiry before Apr. 30, 2014, and we will email you a $25 coupon.</li>");
document.writeln(" <li>The coupon is valid till Dec. 31, 2014, for paying tour packages worth $250 or up.</li>");
document.writeln(" <li>The coupon cannot be used for paying flight tickets, train tickets, hotel rooms and day trips.</li>");
document.writeln(" </ol>");
document.writeln(" </div>");
document.writeln(" <span class=\"interested\">Get started...</span> <span class=\"interest-label\">Each tour can be tailored.</span>");
=======
document.writeln(" <span class=\"interested\">Get started...</span> <span class=\"interest-label\">Each tour can be tailored.</span>");
>>>>>>> 1.5
document.writeln(" <div class=\"infoRequired\">");
document.writeln("<div class=\"yourStyle\">");
document.writeln("<input type=\"radio\" name=\"travelstyle\" value=\"Comfort\">Comfort");
document.writeln("<input type=\"radio\" name=\"travelstyle\" value=\"Discovery\">Discovery");
document.writeln("<input type=\"radio\" name=\"travelstyle\" value=\"Essential\">Essential ");
document.writeln("<span class=\"whatStyle\">[ <a target=\"_blank\" rel=\"nofollow\" href=\"/tour/your-travel-style.htm\">Find your travel style</a> ]</span>");
document.writeln("</div>");
document.writeln(" <p>");
document.writeln(" <label for=\"realname\">Full Name: </label>");
document.writeln(" <input name=\"realname\" type=\"text\" id=\"realname\" value=\"\" />");
document.writeln(" </p>");
document.writeln(" <p>");
document.writeln(" <label for=\"yemail\">Email: </label>");
document.writeln(" <input name=\"yemail\" type=\"text\" id=\"yemail\" value=\"\" />");
document.writeln(" </p>");
document.writeln(" <p class=\"des\">");
document.writeln(" <label for=\"Aquestion\">Tell us your tour ideas: where to visit, how many people and days...<br />");
document.writeln(" </label>");
document.writeln(" <textarea name=\"Aquestion\" id=\"Aquestion\"></textarea>");
if ( questiontype == 'contactus' ) {
document.writeln(" <input type=\"hidden\" name=\"questiontype\" value=\"contactus\" />");
}
document.writeln(" <input type=\"hidden\" name=\"Q_URL\" id=\"Q_URL\" />");
document.writeln(" </p>");
document.writeln(" </div>");
document.writeln(" <input type=\"image\" value=\"Send\" class=\"sendButton\" src=\"/pic/send-90x28.png\">");
document.writeln("</div>");
document.writeln("</form>");
$(function() {
$("#questionBox .infoRequired p").show();
$("#questionBox .infoRequired label").inFieldLabels();
$(".switchTags").stick_in_parent({parent: "#tourContent"});
$("#addtionalRight").stick_in_parent({parent: "#tourContent"}).on("sticky_kit:stick", function(e) {});
$(document).on("click",".error", function() {
$(this).parent("p").find(".arrowDownTest").remove();
});
$("#formquestion").validate({
rules: {
realname:{
required: true,
minlength: 1
},
yemail:{
required: true,
email: true
}
},
messages: {
realname: "Please enter a real name",
yemail: "Please enter a valid email address."
},
errorLabelContainer: "#questionBox .infoRequired p .arrowDownTest",
errorPlacement: function(error, element) {
var error_tip = "<div class=\"arrowDownTest\"><div class=\"arrowDown\"><img src=\"/css/images/whiteArrow.png\"></div></div>";
element.parent().append(error_tip);
error.appendTo(element.parent().find(".arrowDownTest"));
},
focusInvalid: true,
submitHandler: function(form){
//form.find(".arrowDownTest").show();
form.submit();
},
//debug: true
});
$("#Q_URL").val(location.href);
//---------------------------------------------------------------------------------------------------------------------------------------
});