// JavaScript Document
$(document).ready(function() {
	if (document.getElementById("photo_title")) {
		disableSelection(document.getElementById("photo_title"));
	}
	if (document.getElementById("logo")) {
		disableSelection(document.getElementById("logo"));
	}
	$('#top_header').click(function() {
		}).toggle(
			function() {
					$('#top_header').animate({ height: '650px', backgroundPosition: '(0 0)'});
					$("#photo_title").css("display","block");
				}, function() {
					$('#top_header').animate({ height: '200px', backgroundPosition: '(0 '+top_position_px+')'});
					$("#photo_title").css("display","none");
				}
		);
	
	if ($("a.fancybox_iframe").length > 0) {
		$("a.fancybox_iframe").fancybox({
				'hideOnContentClick': false,
				'type' : 'iframe',
				'width' : 1024,
				'height' : 600
		});
	}
});

function disableSelection(target) {
	if (typeof target.onselectstart != "undefined") { //IE route
		target.onselectstart = function() { return false }
	} else if (typeof target.style.MozUserSelect != "undefined") { //Firefox route
		target.style.MozUserSelect="none";
	} else { //All other route (ie: Opera)
		target.onmousedown = function() { return false }
	}
}

