this.screenshotPreview = function(){
	xOffset = 10;
	yOffset = 20;
	$("a.screenshot").hover(function(e){
		this.t = this.title;
		this.title = "";
		var c = (this.t != "") ? "" + this.t : "";
		$("body").append("<div id='screenshot'><img src='"+ this.rel +"' alt='Loading...'/><div>"+ c +"</div></div>");
		$("#screenshot")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");
    },
	function(){
		this.title = this.t;
		$("#screenshot").remove();
    });	
	$("a.screenshot").mousemove(function(e){
		$("#screenshot")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});
};
this.tooltip = function(){
	xOffset = 10;
	yOffset = 20;
	$("a.tooltip").hover(function(e){
		this.t = this.title;
		this.title = ""; 
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");
    },
	function(){
		this.title = this.t;
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};
$(document).ready(function(){
	screenshotPreview();
	tooltip();
	
	$("a[rel='img1']").colorbox({width:"75%",height:"75%"});
	$("a[rel='trailer']").colorbox({width:"875px",height:"675px", iframe:true});
	$("a[rel='basket']").colorbox({width:"875px",height:"675px", iframe:true});
/**
	$(document).click(function(event){
		var target = $(event.target);
		if (target.parents("#nicemenu").length == 0) {
			$("#nicemenu div.sub_menu").hide();
		}
	});
	
	$("li.menu").mouseover(function(){
	//	alert(\'#id_menu_\'+this.id);
		if(document.willhide) clearTimeout(document.willhide);
		$(".sub_menu").hide();
		$("#id_menu_"+this.id).show();
	});
	$("li.menu").mouseout(function(){
		document.willhide = setTimeout(function() {

			$("div.sub_menu").hide();
		},450);
	});
	
	$("div.krums div.sub_menu").mouseover(function(){
		if(document.willhide) clearTimeout(document.willhide);
	});
	
	$("div.krums div.sub_menu").mouseout(function(){
		document.willhide = setTimeout(function() {
			$("div.sub_menu").hide();
		},450);
	});
 **/	
});