// ----------------------- // --- jQuery settings --- // ----------------------- jQuery.fx.interval = 33; // ----------------------------- // --- Document ready events --- // ----------------------------- jQuery(function($){ // --- jScrollPane --- // createScrollbars(); // --- Supersize --- var randNum = 3; var imgRoot = '/wp-content/themes/aiola/'; $.supersized({ slideshow : 1, autoplay : 0, start_slide : randNum, slide_interval : 99999, slide_links : 'blank', transition : 0, transition_speed : 0, random : 0, slides : [ {image : imgRoot+'images/41/JMK_3411.jpg', title : ''}, {image : imgRoot+'images/41/JMK_3819.jpg', title : ''}, {image : imgRoot+'images/41/JMK_3506.jpg', title : ''}, {image : imgRoot+'images/41/JMK_3885.jpg', title : ''}, {image : imgRoot+'images/41/JMK_3893.jpg', title : ''}, {image : imgRoot+'images/41/Claudia-Magas-Photography--1_DxOFP_start.jpg', title : ''}, {image : imgRoot+'images/41/JMK_3406.jpg', title : ''} ] }); // --- Switch mouseover --- $('#switch').mouseover(function() { $(this).animate({'width': 30}, 50, 'easeInOutExpo'); }).mouseout(function(){ $(this).animate({'width': 30}, 50, 'easeInOutExpo'); }); flap1(300); $(document).ready(function(){ if(getCookie("cookie_accept")!=1){ $('.cookie-notice').show(); } $('.cookie-notice-pdf').click(function(e){ e.preventDefault(); window.open("/AiolaImSchlossDatenschutz.pdf"); }); $('.cookie-notice-button').click(function(e){ e.preventDefault(); $('.cookie-notice').hide(); var d = new Date(); d.setTime(d.getTime() + (90*24*60*60*1000)); var expires = "expires="+ d.toUTCString(); document.cookie = "cookie_accept=1;" + expires + ";path=/"; }); }); }); // ------------------------------ // --- Random supersize image --- // ------------------------------ function randStart(){ var excluded = ''; var total = 6; var result = Math.floor(Math.random()*total); for(i=0; i <= total; i++) { if(excluded.search(result) != -1){ return randStart({exclude: excluded, images: total}); } } return result; } function reflap1(){ $("#page-flap-level-1").animate({ left: '-500px' }); } function flap1(wid){ $("#page-flap-content-1").css("width",wid); $("#page-flap-deckel-1").css("width",wid+9); $("#page-flap-level-1").css("width",wid+25); $("#page-flap-content-1").css("height",window.innerHeight - 60); $("#page-flap-level-1").animate({ left: '125px' }); $("#page-flap-close-1").show(); }; window.onresize = function() { $("#page-flap-content-1").css("height",window.innerHeight - 60); $("#page-flap-content-2").css("height",window.innerHeight - 60); } function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i