if (window.location.hash == '#_=_') { window.location.hash = ''; // for older browsers, leaves a # behind history.pushState('', document.title, window.location.pathname); // nice and clean // e.preventDefault(); // no page reload } function logout(caller){ var query = '' if (caller != null) query = caller; window.location = "/lib/oauthlogin/logout.php"+query; fbLogout(); } function openform(k,n,c){ window.open("https://www.beachandbubbles.com/user/?k="+k+"&n="+n+"&c="+c,"_self") } function openprivacy(){ $.fancybox({ width: 1000, autoSize: true, href: '/documents/privacy.php', type: 'ajax' }); } function opengeneralterms(){ $.fancybox({ width: 1000, autoSize: true, href: '/documents/generalterms.php', type: 'ajax' }); } function closeFancyboxAndRedirectToUrl(url){ $.fancybox.close(); window.location = url; } function geop1ugin_cookieConsent () { // console.log('you need cookie consent!'); return 'true'; } $(function() { geop1ugin_cookieConsent(); //$(".cc_message").click(function(){ // console.log(1); //}); $(".open_fancybox").fancybox({ type: 'iframe', openEffect : 'elastic', closeEffect : 'elastic', width : "100%", height : "100%", maxWidth :770, minHeight: 650, afterClose : function() { // location.reload(true); // return; } }); }); function get_visited(){ $(function() { $.ajax({ url: "../../visited.php", success: function(data) { $("#div_submenu_visited").html(data); } }); }); } function get_favorites(){ $(function() { $.ajax({ url: "../../favorites.php?action=list", success: function(data) { $("#div_submenu_favorites").html(data); } }); }); } function get_myclub(){ $(function() { $.ajax({ url: "../../myclub.php", success: function(data) { $("#div_submenu_myclub").html(data); } }); }); } function goto_result(kind,id,name){ window.open('/'+kind+'/'+id+'/'+name+'.html','_blank'); } function deletefav(caller,id,name,nameclub){ $(function(){ $('#dialogdelfav').html("Are you sure to delete '"+ nameclub + "' from your favorites?"); $('#dialogdelfav').attr('title', 'Delete').dialog(); $( "#dialogdelfav" ).dialog({ modal: true, buttons: { "closebtn" : { text: "Close", id: "closebtn", click: function(){ $( '#dialogdelfav' ).dialog( "close" ); } }, "okbtn" : { text: "OK", id: "okbtn", click: function(){ $.ajax({ url: "favorites.php?action=deletefromfav&id="+caller, data:"json", success: function(data) { var alerttext = ''; if (data.noc==1) alerttext = nameclub + " is deleted from your favorites"; if (data.noc==0) alerttext = nameclub + " is already deleted from your favorites!"; $('#dialogdelfav').html(alerttext); $( '#closebtn' ).show(); $( '#okbtn' ).hide(); $( '#cancelbtn' ).hide(); } }); } }, "cancelbtn" : { text: "Cancel", id: "cancelbtn", click: function(){ $( '#dialogdelfav' ).dialog( "close" ); } } } }); }); $( '#closebtn' ).hide(); }