// JavaScript Document $(document).ready(function(){ //$('.top_image').rotate(5); $('#carousel_container').carousel({ transitionlength: '6000', prevButtonObject: '.whats_new_nav .carosel_prev_button', nextButtonObject: '.whats_new_nav .carosel_next_button', objectsToRotate: '.img_obj', buttonObject: '.thumb_obj', buttonCurrentClass: 'current', fadeOut : 'slow' }); $('#testimonials').carousel({ transitionlength: '7000', prevButtonObject: '.blue-box .carousel_prev_button', nextButtonObject: '.blue-box .carousel_next_button', objectsToRotate: '.testimonial', fadeOut : 'slow' }); $('#tour_1 .tour_gallery_container').carousel({ transitionlength: '6000', objectsToRotate: '.img_obj', buttonObject: '#tour_1 .thumb_obj', buttonCurrentClass: 'current', imageEvent: 'mouseOver', parentObject: '#tour_1', buttonEvent: 'mouseOver', auto: false, fadeOut : 'fast', dofade: false }); $('#tour_2 .tour_gallery_container').carousel({ transitionlength: '6000', objectsToRotate: '.img_obj', buttonObject: '#tour_2 .thumb_obj', buttonCurrentClass: 'current', imageEvent: 'mouseOver', parentObject: '#tour_2', buttonEvent: 'mouseOver', auto: false, fadeOut : 'fast', dofade: false }); $('#tour_3 .tour_gallery_container').carousel({ transitionlength: '6000', objectsToRotate: '.img_obj', buttonObject: '#tour_3 .thumb_obj', buttonCurrentClass: 'current', imageEvent: 'mouseOver', parentObject: '#tour_3', buttonEvent: 'mouseOver', auto: false, fadeOut : 'fast', dofade: false }); $('#tour_4 .tour_gallery_container').carousel({ transitionlength: '6000', objectsToRotate: '.img_obj', buttonObject: '#tour_4 .thumb_obj', buttonCurrentClass: 'current', imageEvent: 'mouseOver', parentObject: '#tour_4', buttonEvent: 'mouseOver', auto: false, fadeOut : 'fast', dofade: false }); $('#tour_5 .tour_gallery_container').carousel({ transitionlength: '6000', objectsToRotate: '.img_obj', buttonObject: '#tour_5 .thumb_obj', buttonCurrentClass: 'current', imageEvent: 'mouseOver', parentObject: '#tour_5', buttonEvent: 'mouseOver', auto: false, fadeOut : 'fast', dofade: false }); $('#tour_6 .tour_gallery_container').carousel({ transitionlength: '6000', objectsToRotate: '.img_obj', buttonObject: '#tour_6 .thumb_obj', buttonCurrentClass: 'current', imageEvent: 'mouseOver', parentObject: '#tour_6', buttonEvent: 'mouseOver', auto: false, fadeOut : 'fast', dofade: false }); $('#tour_7 .tour_gallery_container').carousel({ transitionlength: '6000', objectsToRotate: '.img_obj', buttonObject: '#tour_7 .thumb_obj', buttonCurrentClass: 'current', imageEvent: 'mouseOver', parentObject: '#tour_7', buttonEvent: 'mouseOver', auto: false, fadeOut : 'fast', dofade: false }); //$('.tour_gallery_container').carousel({ // transitionlength: '6000', // objectsToRotate: '.img_obj', // buttonObject: '.thumb_obj', // buttonCurrentClass: 'current', // imageEvent: 'mouseOver', // }); $(".tour_gallery_container .img_obj").mouseover(function() { $(this).find('.magnify').fadeIn('fast'); }); $(".tour_gallery_container .img_obj").mouseout(function() { $(this).find('.magnify').fadeOut('fast'); }); $('.next_btn').click(function(){ //$('.tour_gallery_container').carousel.stop_carousel(); $numImages = $('#tour_gallery_nav_container .thumb_obj').size(); var $stopPoint = (($numImages * 56) - (56 * 6)) * -1; $currentMargin = $('#tour_gallery_nav_container').css('margin-left'); $currentMargin = $currentMargin.match(/[0-9]+/i); $nextMargin = (($currentMargin * 1) + 56) * -1; var nextMargin = $nextMargin; console.log($numImages + ':' + nextMargin + ":" + $stopPoint); if(nextMargin >= $stopPoint){ $('#tour_gallery_nav_container').animate({ marginLeft: nextMargin + 'px' }, 500, function() { // Animation complete. }); } }); $('.prev_btn').click(function(){ //$('.tour_gallery_container').carousel.stop_carousel(); $numImages = $('#tour_gallery_nav_container .thumb_obj').size(); var $stopPoint = 0; $currentMargin = $('#tour_gallery_nav_container').css('margin-left'); $currentMargin = $currentMargin.match(/[0-9]+/i); $nextMargin = (($currentMargin * 1) - 56) * -1; var nextMargin = $nextMargin; console.log($numImages + ':' + nextMargin + ":" + $stopPoint); if(nextMargin <= $stopPoint){ $('#tour_gallery_nav_container').animate({ marginLeft: nextMargin + 'px' }, 500, function() { // Animation complete. }); } }); ////Carosel Event hook // $(".tour_gallery_container .carousel_slider").bind("imagemove", function(e, newID){ // //console.log(newID); // $numImages = $('#tour_gallery_nav_container .thumb_obj').size(); // if(newID >= 6){ // // var $stopPoint = (($numImages * 56) - (56 * 6)) * -1; // $currentMargin = $('#tour_gallery_nav_container').css('margin-left'); // $currentMargin = $currentMargin.match(/[0-9]+/i); // $purposedMargin = ((newID * 56) - (5 * 56)) * -1; // if($currentMargin >= $purposedMargin && $purposedMargin >= $stopPoint){ // nextMargin = $purposedMargin; // $('#tour_gallery_nav_container').animate({ // marginLeft: nextMargin + 'px' // }, 500, function() { // // Animation complete. // }); // } // } else { // var $stopPoint = 0; // $currentMargin = $('#tour_gallery_nav_container').css('margin-left'); // $currentMargin = $currentMargin.match(/[0-9]+/i); // $currentMargin = $currentMargin * -1; // $purposedMargin = ((newID * 56) - (56)) * -1; // //console.log($currentMargin + ":" + $purposedMargin); // if($currentMargin < $purposedMargin && $purposedMargin <= $stopPoint){ // nextMargin = $purposedMargin; // $('#tour_gallery_nav_container').animate({ // marginLeft: nextMargin + 'px' // }, 500, function() { // // Animation complete. // }); // } // } // }); if ( $.browser.msie ) { $("a.homepage_videos").click(function () { var url = $(this).attr('name'); //alert('bugs in IE'); $.fancybox({ 'padding': 7, 'overlayOpacity': 0.7, 'autoDimensions': false, 'width': 428, 'height': 345, 'content': '
Download Video:' +
' MP4,' +
' WebM,' +
' Ogg
' +
'
Download Video:' +
' MP4,' +
' WebM,' +
' Ogg
' +
'