$(document).ready(function() { $('#hiddendiv').hide(); $('#winkelwagenmain').load('/getww.php'); $('#topright_info').hover(function(){ info_open()}, function(){info_timer()}); $('#desitesdiv').hover(function(){ info_open()}, function(){info_timer()}); }); var timeout = 400; var closetimer = 0; var open = 0; function info_open() { info_canceltimer(); $('#desitesdiv').slideDown(500); open = 1; } function info_close() { $('#desitesdiv').slideUp(500);open=0;} function info_timer() { if (open==1) closetimer = window.setTimeout(info_close, timeout);} function info_canceltimer() { if(closetimer) { window.clearTimeout(closetimer); closetimer = null;} } document.onclick = info_close; function addproduct(p) { $('#wwmelding').html(' ').load('/wwactions.php?addproduct='+p); fadeww(); } function fadeww() { $('#wwmelding').fadeIn(500); $('#loadingww').show(); setTimeout("$('#winkelwagenmain').load('/getww.php')",500); $('#loadingww').fadeOut(500); } function legen() { $('#loadingww').show(); $('#hiddendiv').load('/wwactions.php?legen'); setTimeout("$('#winkelwagenmain').load('/getww.php')",500); $('#loadingww').fadeOut(500); } function tggleFaq(id) { $('#faqitem'+id).slideToggle(800).focus(); } this.imagePreview = function(xOffset, yOffset){ $("a.preview").hover(function(e){ this.t = this.title; this.title = ""; var c = (this.t != "") ? "
" + this.t : ""; $("body").append("

Image preview"+ c +"

"); $("#preview") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px") .fadeIn("fast"); }, function(){ this.title = this.t; $("#preview").remove(); }); $("a.preview").mousemove(function(e){ $("#preview") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px"); }); }; this.kortingPreview = function(xOffset, yOffset){ $("span.kpreview").hover(function(e){ this.t = this.title; this.title = ""; var c = (this.t != "") ? this.t : ""; $("body").append("
"+ c +"
"); $("#kpreview") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px") .fadeIn("fast"); }, function(){ this.title = this.t; $("#kpreview").remove(); }); $("span.kpreview").mousemove(function(e){ $("#kpreview") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px"); }); };