// JavaScript Document
var mouseover_1 = false;
var mouseover_2 = false;
var down = false;

$(document).ready(function(){
	//$("a.fancybox").fancybox({'autoScale':false,'overlayColor':'#000000','titlePosition':'inside','cyclic':'true','margin':10});
	$("a.fancybox").lightBox({fixedNavigation:true});

$("#cart_block").mouseover(function(){
		mouseover_1 = true;
		down = true;
		$("#cart_block_list").slideDown();
});
$("#cart_block_list").mouseover(function(){
		down = true;								 
		mouseover_2 = true;
});

$("#cart_block").mouseout(function(){
		mouseover_1 = false;
});
$("#cart_block_list").mouseout(function(){
		mouseover_2 = false;
});

setInterval(
			function() {
				if (down == true) {
					if (mouseover_1 == false && mouseover_2 == false) {
						$("#cart_block_list").slideUp();
						down = false;
					}
				}
			}
			, 1500
			);


/*	$("#cart_block").mouseover(function(){
		$("#cart_block_list").show();
		setInterval(
			function() {
				if (mouseover == false) {
					$("#cart_block_list").hide();
				}
			},
			3000
		);
	});
	$("#cart_block_list").mouseover(function() {
		mouseover = true;
	});
	$("body").mouseover(function() {
		mouseover = false;
	});*/
});
