jQuery(window).load(function() {

/*	
	$("#heatmapOverlay").css({
		'width' 	: $("#heatmap").width(),
		'height'	: $("#heatmap").height(),
		'opacity'	: 0.5 
	});

	// remove overlay
	$("#fjernOverlay").click( function(){
		$(".heatmapDot").fadeOut();
		$('#heatmapOverlay').fadeOut();
	});	

	// remove all positions from DB
	$("#resetPositions").click( function(){
		// functions to handler json data from PHP
		$.get('funktioner/heatmap/ajax/ajaxFunctions.php?reset=1', function(data) {
			$("#status").html(data + "<br />");
			$("#status2").html('0, 0');
			$(".heatmapDot").fadeOut();
			$('#heatmapOverlay').fadeOut();
		  });
	});	
*/
	

	// debug - show pos of clicks in status2 div
	$("#heatmap").click(function(e){
			
		var menu_id = $(this).attr("rel");
		
		var x = e.pageX - this.offsetLeft;
		var y = e.pageY - this.offsetTop;

		$.post(
			"funktioner/heatmap/ajax/ajaxFunctions.php", 
			{ x: x, y: y, 'menu_id': menu_id }, 
			function(data) {
			}			
		);
   });
});
