function load_tripadvisor(b, a) { if (a == "en") { a == "en_US" } if (a == "es") { a == "es_ES" } if (a == "fr") { a == "fr_FR" } var url = "https://www.tripadvisor.com/WidgetEmbed-selfserveprop?border=true&popIdx=true&iswide=false&locationId=8587814&display_version=2&uniq=614&rating=true&nreviews=0&writereviewlink=true&lang=" + a; jQuery.ajax({ type: "GET", url: url, success: function() { $("#" + b).removeClass("tripad-placeholder"); $("#" + b).removeClass("hide") }, error: function() {}, dataType: "script", cache: true }); } jQuery(document).ready(function($){ if (window.matchMedia('(max-width: 991px)').matches) { } load_tripadvisor('TA_selfserveprop614', 'en'); /* ---------------------------------------------------------------------- */ /* Form Focus /* ---------------------------------------------------------------------- */ /* $("input[type='text'], input[type='email'], input[type='tel'], input[type='password'], textarea").on('focus', function(){ var place = $(this).attr('placeholder'); $(this).attr('data-place', place); $(this).attr('placeholder', ''); }); $("input[type='text'], input[type='email'], input[type='tel'], input[type='password'], textarea").on('blur', function(){ $(this).attr('placeholder', $(this).attr('data-place')); }); */ /* ---------------------------------------------------------------------- */ /* View Menu /* ---------------------------------------------------------------------- */ $('.view-menu').on('click', function(e){ if($('.main-menu').is(':hidden')){ $('.main-menu').slideDown(); $(this).html(''); }else{ $('.main-menu').slideUp(); $(this).html(''); } }); /* ---------------------------------------------------------------------- */ /* View Menu Sub /* ---------------------------------------------------------------------- */ $('.main-menu li.li-parent > a').append(''); $('.view-sub-menu').on('click', function(e){ e.preventDefault(); var subMenu = $(this).parents('li').find('ul'); if($(subMenu).is(':hidden')){ $(subMenu).slideDown(); $(this).html(''); }else{ $(subMenu).slideUp(); $(this).html(''); } }); /* ---------------------------------------------------------------------- */ /* View Search /* ---------------------------------------------------------------------- */ $('.view-search').on('click', function(e){ $('.search-box').slideToggle(); }); /* ---------------------------------------------------------------------- */ /* Zing Tab /* ---------------------------------------------------------------------- */ $('.tab-header a').on('click', function(e){ e.preventDefault(); var id = $(this).attr('href'); $('.tab-header a').removeClass('active'); $(this).addClass('active'); $('.tab-content .tab').hide(); $('.tab-content '+id).fadeIn(); }); /* ---------------------------------------------------------------------- */ /* Seach Suggets /* ---------------------------------------------------------------------- */ $('.txt-search').keyup(function(){ var name = $(this).val(); $.post( '/search/suggest',{csrf_token_name:csrf_token_value, name:name},function( data ) { console.log(data); $('.suggest-box').html(data); $('.suggest-box').slideDown(); }); }); $(document).mouseup(function (e) { var container = $(".search-box"); if (!container.is(e.target) && container.has(e.target).length === 0) { $('.suggest-box').hide(); } }); $('.menu-home a').html(''); $('.menu-disable > a').on('click', function(e){ e.preventDefault(); }); var owl_slider_partner = $(".slider-partner-list"); owl_slider_partner.owlCarousel({ loop:true, nav:false, autoplay:true, autoplayTimeout:5000, margin:30, dots: false, responsive:{ 0:{ items: 1, }, 400:{ items: 2, }, 550:{ items: 4, }, 992:{ items: 6, } } }); $('.owl-prev-partner').click(function(event) { owl_slider_partner.trigger('prev.owl'); event.preventDefault(); }); $('.owl-next-partner').click(function(event) { owl_slider_partner.trigger('next.owl'); event.preventDefault(); }); $('.form-newsletter').submit(function(e){ var form = $(this); if(form.data('submitted') === true){ e.preventDefault(); }else{ form.data('submitted', true); } }); $(document).on('click', '.slider-tour-item', function(){ var href = $(this).data('href'); window.location.href = href; }); });