function menu (id) {	var display = $("#"+id+" > .child").css('display');
	if (display=='block') {		$('.menu_left -> .child').hide();		$('#'+id+' > .child').hide();
        $('#'+id+' > .parent').css('background-position','0 0');
	}
	else {		$('.menu_left > .child').hide();
		$('.menu_left > .parent').css('background-position','0 0');		$('#'+id+' > .child').css('display','block');
		$('#'+id+' > .parent').css('background-position','0 -78px');
	}
}

/*
 * Image preview script
 * powered by jQuery (http://www.jquery.com)
 *
 * written by Alen Grakalic (http://cssglobe.com)
 *
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
this.imagePreview = function(){
	/* CONFIG */
		xOffset = 90;
		yOffset = 20;
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
	/* END CONFIG */
	$("a[name='preview']").hover(function(e){
		$("body").append("<p id='preview'><img src='"+ this.href +"' /></p>");
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");
    },
	function(){
		$("#preview").remove();
    });
	$("a[name='preview']").mousemove(function(e){
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});
};
// starting the script on page load
$(document).ready(function(){
	imagePreview();
});
