var hovel = {
	openLinks: Array(),
	showHoverLink: function(name)
	{
		if(!$('#' + name + 'HoverSection').is(':hidden')) {
			return;
		}
		
		var startPixels = (($(window).width() - 650) / 2);
		
		var endWidth = 271;
		
		if (startPixels < 271) {
			endWidth = startPixels - 8;
		}
		
		var endPixels = startPixels - endWidth;
		
		if ($('#' + name + 'HoverSection').parent().hasClass('rightHoverContainer')) {
			startPixels += 650 - endWidth;
			endPixels = startPixels + endWidth + 11;
		}
		
		$('#' + name + 'HoverSection')
			.css('left', startPixels)
			.css('display', 'block')
			.css('width', endWidth - 30);
		
		hovel.closeOpenLinks();
		
		$('#' + name + 'HoverSection').animate({
			left: endPixels
		}, 'fast');
		
		hovel.openLinks.push(name);
	},
	hideHoverLink: function(name)
	{
		var endWidth = 271;
		var start = (($(window).width() - 650) / 2);
		
		if (start) {
			endWidth = start - 8;
		}
		
		var endPixels = start + endWidth;
		
		if ($('#' + name + 'HoverSection').parent().hasClass('rightHoverContainer')) {
			endPixels -= endWidth;
		}
		
		$('#' + name + 'HoverSection').animate({
			
		}, 'fast', function() {$('#' + name + 'HoverSection').css('display', 'none')});
	},
	closeOpenLinks: function()
	{
		var openCount = hovel.openLinks.length;
		
		for (var i = 0; i < openCount; i++) {
			hovel.hideHoverLink(hovel.openLinks[i]);
		}
		
		hovel.openLinks = Array();
	}
};
