//EVENTS
jQuery(document).ready(
	function() {
		try {
			
			//Cufon replacements
			Cufon.replace("#Navigation li a, #FeatureBlurb",
				{ fontFamily : "NeoSansStdRegular", hover : true }
			);
			Cufon.replace("#Blurb, #Main h3",
				{ fontFamily : "NeoSansStdLight", hover : true }
			);
			
			if(jQuery("body.Normal #Content div.text").height() < 200) {
				jQuery("body.Normal #Tower img").attr("src", "/themes/eclipse/images/building_eclipse_nobase.png");
				jQuery("body.Normal #Tower").css("height", "527px");
				jQuery("body.Normal #Tower img").attr("height", "527");
			}
			
			//Tooltips over gallery
			jQuery("#ImageGallery li a").tooltip({
				delay : 50,
				track : true,
				//bodyHandler: function() { return jQuery("<div/>").html(jQuery(this).attr('title')); },
				showURL: false,
				top : -28
			});
			
		} catch (e) {
			//console.log(e);
		}
});

function sb_onfinish(e) {
	jQuery('#sb-body').click(
		function() {
			window.open(e.content, 'sbraw');
		}
	);
}