if(typeof SF == "undefined" || !SF){
	var SF = {};
}
(function() {
SF.OvLinks = {
	init: function(){
		$("body").append($("#ov_holder"));
		$("#ov_shadow").css("opacity", 0.65);
		$("#ov_shadow").height($(document).height());
		$("#ov_holder").hide();
		$("#ov_holder").removeClass("hidden");
		SF.OvLinks.centerOv();
		$(window).resize(function(){
			$("#ov").height(parseInt($(window).height()*0.92));
			$("#ov_content iframe").height($("#ov_content").height()-40);
			$("#ov_shadow").height($(document).height());
			SF.OvLinks.centerOv();
		});
		$(window).scroll(SF.OvLinks.centerOv);
		return true;
	},
	centerOv: function(){
		var margin=parseInt($(window).height()*0.04);
		$("#ov").css("top", (margin+$(window).scrollTop())+"px");
	},
	openOv: function(link, title){
		$("#ov_title").html(title);
		$("#ov_content").html("<iframe frameborder='0' src='"+link+"&printable=TRUE&portrait_or_landscape=portrait'> </iframe>");
		$("#ov_holder").removeClass("hidden");
		$("#ov_holder").fadeIn("fast");
		$("#ov_content iframe").height($("#ov_content").height()-40);
		return false;
	},
	closeOv: function(){
		$("#ov_holder").fadeOut("normal");
	}
}
$(document).ready(SF.OvLinks.init);

})();