//----------------------------------------------------------------- // COOKIES $(function(){ $.fn.cookieconfirmA = function( options ) { return var settings = { 'confirmtext' : 'This website uses cookies to ensure you get the best experience on our website.', 'buttonlabel' : 'OK', 'policylink' : '', 'background' : 'rgba(0,0,0,0.9)', 'cookiename' : 'cookiesapproved', 'cookievalue' : 'confirm' }; if ( options ) { $.extend( settings, options );} var cookiesconfirmok; cookiesconfirmok = Cookies.get(settings.cookiename); if( cookiesconfirmok != settings.cookievalue ){ var button = $('' + settings.buttonlabel + '') .css({ 'display':'inline-block', 'padding':'0.3em 0.5em', 'box-sizing':'border-box', 'margin':'0 0 0 0.3em', 'background':'#fff', 'color':'#000', 'font-size':'0.9em', 'font-weight':'bold', 'cursor':'pointer' }); var cookietopcontent = $('
' + settings.confirmtext + settings.policylink + '
') .css({ 'display':'none', 'position':'relative', 'z-index':'1001', 'max-width':'1200px', 'padding':'0.5em 1em', 'box-sizing':'border-box', 'margin':'0 auto', 'background':settings.background, 'color':'#000', 'text-align':'center', 'font-size':'1.2em', 'line-height':'150%' }) .fadeIn(2000) .append(button); $('
').appendTo('body') .css({ 'position':'fixed', 'top':'0px', 'left':'0px', 'z-index':1000, 'width':'100%', 'height':'0px' }) .append(cookietopcontent); $('body').on('click','#cookiesconfirmbtn', function(){ var t = $(this); var tp = t.parent(); Cookies.set(settings.cookiename, settings.cookievalue, { expires: 365 }); tp.fadeOut(1500); }); } } }); //only number input function numbersonly(e, decimal) { var key; var keychar; if (window.event) { key = window.event.keyCode; } else if (e) { key = e.which; } else { return true; } keychar = String.fromCharCode(key); if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) ) { return true; } else if ((("0123456789").indexOf(keychar) > -1)) { return true; } else if (decimal && (keychar == ".")) { return true; } else return false; } //----------------------------------------------------------------- // Antispam email function mkcore(jmeno, domena, tld){ var ret=jmeno; ret += String.fromCharCode(63+1); if(typeof(domena)=="undefined") ret += 'hoteljulian.cz'; else if(typeof(tld)=="undefined") ret += domena+'.cz'; else ret += domena+'.'+tld; return (ret); } function mke(jmeno, domena, tld) { document.write(mkcore(jmeno, domena, tld)); } function mkm(jmeno, domena, tld) { document.write('mai'); document.write('lto'+String.fromCharCode(58)); mke(jmeno, domena, tld); } function gom(jmeno, domena, tld) { var dst='mai'; dst += 'lto'+String.fromCharCode(58); dst += mkcore(jmeno,domena,tld); w1=window.open(dst); if (w1) w1.close(); } function mkhref(jmeno, celejmeno, domena, tld, atr) { document.write(''); if(typeof(celejmeno)!=="undefined" && celejmeno!=""){ document.write(celejmeno); }else{ document.write(mkcore(jmeno, domena, tld)); } document.write(''); } function mkhrefnopen(jmeno, domena, tld, atr) { document.write(''); document.write(mkcore(jmeno, domena, tld)); } function mk_form_to (form_name, jmeno) { var F = MM_findObj ( form_name ); F.To.value=mkcore(jmeno); } // -------------------------------------------------------------------- Date.FromCS = function(val) { var dp = val.split('.'); if(dp.length != 3) return -1; return new Date(Date.UTC(dp[2],dp[1] - 1,dp[0])) }; function remap(hyp, url) { //var url = 'https://www.hoteltime.cz/public3/?idhotel=1.111900979&idseller=111995571&lng=cs'; s1 = document.getElementById('date1c').value; s2 = document.getElementById('date2c').value; var f = Date.FromCS(s1); var t = Date.FromCS(s2); if(f >= t) { window.alert('Datum odjezdu je dřívější\n než datum příjezdu!'); return false; } //alert( hyp.href ); hyp.href = url + '&f=' + s1 + "&t=" + s2; //alert( hyp.href ); return true; } //////////////////////////////// (function( $ ){ $.fn.antispam = function( options ) { var settings = {'emailname' : 'i','emaildomain' : 'd','emailltd' : 'c'}; if ( options ) { $.extend( settings, options );} this.each(function(){ aemail = $(this).html().split(','); if( aemail[0] == undefined ){ aemail[0] = settings.emailname; } if( aemail[1] == undefined ){ aemail[1] = settings.emaildomain; } if( aemail[2] == undefined ){ aemail[2] = settings.emailltd; } $(this).attr( 'href','mailto: ' + aemail[0] + '@' + aemail[1] + '.' + aemail[2] ); if( aemail[3] == undefined ){ $(this).html( aemail[0] + '@' + aemail[1] + '.' + aemail[2] ); }else{ $(this).html( aemail[3] ); } }); }; })( jQuery ); /* $('a.mail').antispam({ 'emailname' : 'info','emaildomain' : 'empemont','emailltd' : 'cz' }); */ //////////////////////////////////// //////////////////////////////// (function( $ ){ $.fn.inputAlterText = function( options ) { this.each(function(){ var o = $(this); var a; var t = o.attr('title'); o.val(t); o.addClass('empty'); o.focus(function(){ a = ( o.val()=="" || o.val()==t ? '' : o.val() ); if( a == t ){ o.addClass('empty'); }else{ o.removeClass('empty'); } o.val(a); }); o.blur(function(){ a = ( o.val()=="" ? t : o.val() ); if( a == t ){ o.addClass('empty'); }else{ o.removeClass('empty'); } o.val(a); }); }); }; })( jQuery ); $(function() { // Options for SuperBGImage /* $.fn.superbgimage.options = { };*/ }); function hideblockF(e,c,i,d){ window.specialoffersblock = window.specialoffersblock || []; //console.log(specialoffersblock); //specialoffersblock = []; specialoffersblock[i] = {} //var specialoffersblock = specialoffersblock || {}; //specialoffersblock.i = 0; //specialoffersblock.mouse_is_inside_offers = false; specialoffersblock[i].mouse_is_inside_offers = false; specialoffersblock[i].mouse_is_inside_offers_t; $(e + ',' + c).hover( function () { clearTimeout(specialoffersblock[i].mouse_is_inside_offers_t); //$(c).slideDown(500, function(){ web_full_screen_mode( min_vyska_obsahu, globalh ); } ); $(c).show('slide', {direction: d},500, function(){ web_full_screen_mode( min_vyska_obsahu, globalh ); } ); specialoffersblock[i].mouse_is_inside_offers=true; //console.log(window.mouse_is_inside_offers); //console.log(1); }, function () { if ( !$(e).hasClass("offershow") ) { specialoffersblock[i].mouse_is_inside_offers_t = setTimeout(function(){ //$(c).slideDown(500, function(){ web_full_screen_mode( min_vyska_obsahu, globalh ); } ); $(c).hide('slide', {direction: d}, 500, function(){ web_full_screen_mode( min_vyska_obsahu, globalh ); } );/**/ /*$(c).animate({ width: [ "toggle", "swing" ] }, 500, 'linear', function(){ web_full_screen_mode( min_vyska_obsahu, globalh ); });/**/ },10000); } specialoffersblock[i].mouse_is_inside_offers=false; //console.log(0); } ); /**/ $(e + ',' + c).click(function() { clearTimeout(specialoffersblock[i].mouse_is_inside_offers_t); $(e).addClass('offershow'); //$(e).slideDown(500, function(){ web_full_screen_mode( min_vyska_obsahu, globalh ); } ); $(c).show('slide', {direction: d},500, function(){ web_full_screen_mode( min_vyska_obsahu, globalh ); } ); /*$(c).animate({ width: [ "toggle", "swing" ] }, 500, 'linear', function(){ web_full_screen_mode( min_vyska_obsahu, globalh ); });/**/ });/**/ $( '*' ).click(function(event){ /*$(".mixpicker__select").click(function() { alert("a"); $( "#wis2-open-booking" ).trigger( "click" ); }); if(!$(".mixpicker_modal").hasClass("active")){ // alert("b"); clearTimeout(specialoffersblock[i].mouse_is_inside_offers_t); }*/ // console.log(event); //alert(specialoffersblock.mouse_is_inside_offers); //console.log( $(event.target).is(c + ',' + c + ' *,' + e + ',' + e + ' *') ); if( !$(event.target).is(c + ',' + c + ' *,' + e + ',' + e + ' *') && !specialoffersblock[i].mouse_is_inside_offers ){ $(e).removeClass('offershow'); //$(c).slideUp(500, function(){ web_full_screen_mode( min_vyska_obsahu, globalh ); } ); if( $(c).css('display') != "none" ){ $(c).hide('slide', {direction: d},500, function(){ web_full_screen_mode( min_vyska_obsahu, globalh ); } );/**/ /*$(c).animate({ width: [ "toggle", "swing" ] }, 500, 'linear', function(){ web_full_screen_mode( min_vyska_obsahu, globalh ); });/**/ } } });/**/ } function contentShowHide(){ var c_maxh = $('#middle').height() - $('#top').height() - $('#footer').height(); var c_bottomh = $('#footer').height()+20; var c_height = $('#content_in').height(); var c_animh = 450; //( c_maxh < c_height+c_bottomh ? c_maxh : c_height ); var c_speed = 600; $('#content_in').height(c_animh); $('#content.c_open').animate({ height: c_animh+c_bottomh }, c_speed, function(){ $(this).removeClass('c_open').addClass('c_close'); callscroll(); }); $('#content.c_close').animate({ height: 0 }, c_speed, function(){ $(this).removeClass('c_close').addClass('c_open'); callscroll(); }); } function callscroll(){ $('#text_w,#text_w2').jScrollPane({ showArrows:false, verticalDragMinHeight: 25, verticalDragMaxHeight: 25 }); } //$.event.special.swipe.horizontalDistanceThreshold = 100; //$.event.special.swipe.verticalDistanceThreshold = 150; function swipeleftHandler( event ){ $('#superbgimage').prevSlide(); ga('send', 'event', 'swipe bg foto', 'swipe left - prev'); } function swiperightHandler( event ){ $('#superbgimage').nextSlide(); ga('send', 'event', 'swipe bg foto', 'swipe right - next'); }