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.

139 lines
4.7 KiB
JavaScript

$(document).ready(function(){
//imagePreview();
// We only want these styles applied when javascript is enabled
$('div.navigation').css({'width' : '152px', 'float' : 'right'});
$('div.content').css('display', 'block');
// Initially set opacity on thumbs and add
// additional styling for hover effect on thumbs
var onMouseOutOpacity = 0.67;
$('#thumbs ul.thumbs li').opacityrollover({
mouseOutOpacity: onMouseOutOpacity,
mouseOverOpacity: 1.0,
fadeSpeed: 'fast',
exemptionSelector: '.selected'
});
// Initialize Advanced Galleriffic Gallery
var gallery = $('#thumbs').galleriffic({
delay: 5000,
numThumbs: 8,
preloadAhead: 10,
enableTopPager: false,
enableBottomPager: true,
maxPagesToShow: 3,
imageContainerSel: '#slideshow',
controlsContainerSel: '#controls',
captionContainerSel: '#caption',
loadingContainerSel: '#loading',
renderSSControls: true,
renderNavControls: true,
playLinkText: 'Play Slideshow',
pauseLinkText: 'Pause Slideshow',
prevLinkText: '‹',
nextLinkText: 'Next Photo ›',
nextPageLinkText: '›',
prevPageLinkText: '‹',
enableHistory: false,
autoStart: true,
syncTransitions: true,
defaultTransitionDuration: 900,
onSlideChange: function(prevIndex, nextIndex) {
// 'this' refers to the gallery, which is an extension of $('#thumbs')
this.find('ul.thumbs').children()
.eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
.eq(nextIndex).fadeTo('fast', 1.0);
},
onPageTransitionOut: function(callback) {
this.fadeTo('fast', 0.0, callback);
},
onPageTransitionIn: function() {
this.fadeTo('fast', 1.0);
}
});
});
function c_(c){
$(".itineraryContent .container").html($(".itineraryContent_data #" + $(c).parent().find("td:eq(0)").text().replace(" ", "_") + "").html());
}
function h_(){
var container_height = 0;
for(i = 0; i< $(".container > *").length; i++){
container_height += $(".container > *:eq(" + i + ")").height();
}
return container_height - $(".container .tourImg").height();
//$(".itineraryContent").height(container_height);
}
function open_up(){
$(".itineraryContent").height(h_());
$(".container").css({height: "auto"});
$(".itineraryContent_button").hide();
}
//map preview
function preloadImages(json) {
for(var i=0;i<json.length;i++) {
$('<img />').attr('src', json[i]);
}
}
$(document).ready(function(){
imagePreview();
});
//check question form submit
$(function(){
$("#send-button").click(function(){
var emailI = RegCkElement("yemail","Please fill in a valid email address! Eg: service@chinahighlights.com","/^([a-zA-Z0-9_-_\.])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/","","",false);
var realnameI = StrIsNullOrEmpty("realname","Please fill in your full name.","","",false);
var AquestionI = StrIsNullOrEmpty("Aquestion","Please fill in your Question.","","",false);
if(emailI&&realnameI&&AquestionI)
$("#formquestion").submit();
});
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1BDBB>ַ
$("#Q_URL").val(location.href);
});
// show more paypal price info
$(function(){
var uuseridwinPIE= $(".tipInfo"),TSuuseridwin;
uuseridwinPIE.prev().hover(function(){
var te = $(this), ps = te.position(), tp = (te.height()+ 5 + ps.top) + "px", tl = ps.left + "px";//te.height()* 2
te.next().css({
position: "absolute",
top: tp,
left: tl,
display: "block",
"background-color": "#FFF",
"z-index":9999
});
},function(){TSuuseridwin= setTimeout("$('.tipInfo').hide()" ,300)});
uuseridwinPIE.hover(function(){if(TSuuseridwin)clearTimeout(TSuuseridwin);$(this).show();},function(){$(this).hide();});//
});
// show more value guarantee info
$(function(){
var uuseridwinPIE= $(".moreInfo"),TSuuseridwin;
// $(".valueGuarantee").css("cursor", "pointer")
uuseridwinPIE.prev().hover(function(){
var te = $(this), ps = te.position(), tp = (te.height()+ 5 + ps.top) + "px", tl = ps.left + "px";//te.height()* 2
te.next().css({
position: "absolute",
top: tp,
left: tl,
display: "block",
"background-color": "#FFF",
"z-index":1000
});
},function(){TSuuseridwin= setTimeout("$('.moreInfo').hide()" ,300)});
uuseridwinPIE.hover(function(){if(TSuuseridwin)clearTimeout(TSuuseridwin);$(this).show();},function(){$(this).hide();});//
});
// close international flights ads
$(function(){
$(".closeAds").click(function(){
$(".flights2China").hide();
});
});