$(function(){ $(".makeres_popup").click(function(){ NEXTWIDGET.widget.show('O6M1CPM8N',false); return false; $( "#reservation_fb_content" ) . html(); $( "#reservation_fb_content" ) . html( $( "#reservation_fb_content_h" ) . html() ); $( ".reservation_fb").click(); }); $(".reservation_fb").fancybox({ 'centerOnScroll': true, 'autoScale' : false, 'transitionIn' : 'fade', 'transitionOut' : 'none', 'speedIn' : 100, 'type' : 'inline', 'href' : this.href, 'overlayOpacity' : 0.2, 'padding' : 15, onStart : function() { }, }); $( ".google_map_" ) . click( function(){ $( "#google_map_content" ) . html(); $( "#google_map_content" ) . html( $( "#google_map_content_h" ) . html() ); $(".show-gmap-fb").click(); return false; }); $(".show-gmap-fb").fancybox({ 'centerOnScroll': true, 'autoScale' : false, 'transitionIn' : 'fade', 'transitionOut' : 'none', 'speedIn' : 100, 'type' : 'inline', 'href' : this.href, 'overlayOpacity' : 0.2, 'padding' : 15, onStart : function() { }, }); /* Background Music */ try { var bgMusic = $('#audio-bg')[0], playing = true; bgMusic.addEventListener('ended', function() { this.currentTime = 0; if (playing) { this.play(); } }, false); bgMusic.play(); $('.toggle').click(function(e) { if (!bgMusic.paused) { bgMusic.pause(); playing = false; $('.toggle').html('Sound On'); } else { bgMusic.play(); playing = true; $('.toggle').html('Sound Off'); } $.post( "?act=jax_music_change", { act: bgMusic.paused?1:0 }, function(ret) { }, 'json' ); e.preventDefault(); }); } catch(e) { } $('body').bind('orientationchange', function(){ $("#preloader").hide(); }); $(".mainn_avbar li").hover(function(){ $(this).find("ul").show(); },function(){ $(this).find("ul").hide(); }); $('.slider').bxSlider({ mode: 'vertical', auto: true, controls: true, pager: true }); slider = bs_slider_init(); bxslider_init_images(); }); function bs_slider_init() { res = $('.bxslider').bxSlider({ minSlides: 1, maxSlides: 5, moveSlides: 1, slideWidth: 70, slideMargin: 10, infiniteLoop: false, hideControlOnEnd: true, pager: false, onSliderLoad: function(){ } }); return res; } function bxslider_init_images() { $(".thumbs_area .bxslider img").click(function(){ var imgsrc = $(this).attr("src"); $(".activethumb").removeClass("activethumb"); $(this).addClass("activethumb"); $(this).closest('.about_history_right').find('.large_img img').attr("src",imgsrc); }); } function inp_highlight_text( id_, res_ ) { var fn = $( "*[name='" + id_ + "']" ) if ( !fn . val() ) { fn . attr ("style", "border: 1px solid red; background-color:pink;" ); res_ = false; } else { fn . attr ("style", "" ); } return res_; } $( ".required-text") . change( function(){ if (! inp_verify_text( $( this ) . attr( "name" ) ) ) { return false; } }); function inp_verify_text( name_ ) { res = true; var fn = $( "*[name='" + name_ + "']" ) fn . attr ("style", "" ); if ( !fn . val() ) { fn . effect( "shake", { times:3, distance:4, direction:"left" }, 100, function() { fn . focus() . select(); fn . attr ("style", "border: 1px solid red; background-color:pink;" ); } ); res = false; } else fn . attr ("style", "border: 1px solid black; background-color:white;" ); return res; }