function OpenSlideShow() {
}
	
	
var snapshot_window;
var popup_delay;
var imgs;
var cursor_x;
var cursor_y;
var snapshot_x;
var snapshot_y;
var img_num = 0;

$(document).ready(function() {
	
	
	// Snapshot Popup
	$('#snapshots').click(function(e){
	
		var snapshots = document.getElementById("snapshots");
		imgs = snapshots.getElementsByTagName("img");
		
		var relativeX = e.pageX - $(this).offset().left;
		var relativeY = e.pageY - $(this).offset().top;
		
		rel_x = Math.ceil(relativeX / 57);
		rel_y = Math.ceil(relativeY / 57);
			
		if (rel_x > 2) { rel_x = 2 }
		if (rel_y > 3) { rel_x = 3 }
		
		
		if (rel_x == 1 && rel_y == 1) { img_num = 0 }
		if (rel_x == 1 && rel_y == 2) { img_num = 2 }
		if (rel_x == 1 && rel_y == 3) { img_num = 4 }
		if (rel_x == 2 && rel_y == 1) { img_num = 1 }
		if (rel_x == 2 && rel_y == 2) { img_num = 3 }
		if (rel_x == 2 && rel_y == 3) { img_num = 5 }
		
		
		snapshot_window = window.open("/tour/slideshow.html?img_num=" + img_num,"PopupWindow","width=500,height=600,resizable=1,scrollbars=1,toolbar=0,location=0,directories=0,status=0,menubar=0");
		snapshot_window.focus();
	});

});
