//----------------------------------------------------------------- // 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.6)', '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':'#fff', '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 gup( name ){ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null ) return ""; else return results[1]; } 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() { // Options for SuperBGImage $.fn.superbgimage.options = { slideshow: 1, // 0-none, 1-autostart slideshow slide_interval: 6000, // interval for the slideshow transition: 1, transitionout: 0, speed: 2000 // animation speed }; // initialize SuperBGImage });