$(document).ready(function() {
	if (opener) {
		$("#link").css("display", "block");
	}
	else {
		$("#link").css("display", "none");
	}

	$(".aloupe").click(function() {
		if (opener) {
			opener.location = $(this).attr('href');
			opener.focus();
			return false;
		}
	});

	function getHelp() {
		return $("#helpdiv").html();
	}
	$("#helpdiv").jqm( {
		trigger: '.help'
	});

	shortcut.add("U",function() {
		showurl();
	});
	shortcut.add("H",function() {
		$("#helpdiv").jqm().jqmShow();
	});
	shortcut.add("0", function() {
		window.location = $(".togglemodebtn").attr('href');
	});
	shortcut.add("1",function() {
		window.location = $(".photobtn").attr('href');
	});
	shortcut.add("2",function() {
		window.location = $(".datebtn").attr('href');
	});
	shortcut.add("P",function() {
		$.scrollTo('.probant', { axis: 'xy', speed: '1000' } );
	});
	shortcut.add("D",function() {
		$("html, body").animate({ scrollLeft: "+" + $(window).width()/2 }, 500);
	});
	shortcut.add("G",function() {
		$("html, body").animate({ scrollLeft: 0, scrollTop: 0 }, 500);
	});
	shortcut.add("A",function() {
		$("html, body").animate({ scrollLeft: "-" + $(window).width()/2 }, 500);
	});
	shortcut.add("W",function() {
		$("html, body").animate({ scrollTop: "-" + $(window).height()/2 }, 500);
	});
	shortcut.add("S",function() {
		$("html, body").animate({ scrollTop: "+" + $(window).height()/2 }, 500);
	});
	shortcut.add("Q",function() {
		$("html, body").animate({ scrollLeft: "-" + $(window).width()/2, scrollTop: "-" + $(window).height()/2 }, 500);
	});
	shortcut.add("E",function() {
		$("html, body").animate({ scrollLeft: "+" + $(window).width()/2, scrollTop: "-" + $(window).height()/2 }, 500);
	});
	shortcut.add("Z",function() {
		$("html, body").animate({ scrollLeft: "-" + $(window).width()/2, scrollTop: "+" + $(window).height()/2 }, 500);
	});
	shortcut.add("C",function() {
		$("html, body").animate({ scrollLeft: "+" + $(window).width()/2, scrollTop: "+" + $(window).height()/2 }, 500);
	});

});

