jQuery(document).ready(function () {
	jQuery("#menu a").each(function() {
		jQuery(this).mouseenter(function() {
			jQuery(this).find(".on").animate({opacity: 1}, 250);
			jQuery(this).find(".off").animate({opacity: 0}, 250);
		});
		jQuery(this).mouseleave(function() {
			jQuery(this).find(".on").animate({opacity: 0}, 250);
			jQuery(this).find(".off").animate({opacity: 1}, 250);
		});
	});
	
	jQuery("#middle .midleft a.block").each(function() {
		jQuery(this).mouseenter(function() {
			jQuery("#middle .midleft .highlight").css('top',( jQuery(this).position().top - 12)+'px');
			jQuery("#middle .midleft .highlight").fadeIn(250);
		});
		jQuery(this).mouseleave(function() {
			jQuery("#middle .midleft .highlight").fadeOut(250);
		});
	});
	
	jQuery(".sitelength").css('height', jQuery("#content").height()+'px');
	
	if (jQuery("#contentLeft").length > 0) {
		var totalheight = jQuery("#contentLeft").height() + 32;
			if (jQuery("#contentLeft").height() < jQuery("#contentRight").height()) {
				jQuery("#contentLeft").css('height', (jQuery("#contentRight").height() - 32)+'px');
			}
	}
});

function getBaseUrl() {
     urlTokens = window.location.href.split('/');
     url = urlTokens[0]+'//'+urlTokens[2];
     return url;
}
