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.
72 lines
2.5 KiB
JavaScript
72 lines
2.5 KiB
JavaScript
$(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();
|
|
});
|
|
//±£´æÌá½»µØÖ·
|
|
$("#Q_URL").val(location.href);
|
|
});
|
|
|
|
function preloadImages(json) {
|
|
for(var i=0;i<json.length;i++) {
|
|
$('<img />').attr('src', json[i]);
|
|
}
|
|
}
|
|
$(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: 8000,
|
|
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);
|
|
}
|
|
});
|
|
}); |