$('#accessories').hover(
	function()
	{
		var shell = $(this).find('.absoluteshell');
		shell.removeClass('empty');
		shell.addClass('full');
	},
	function()
	{
		var shell = $(this).find('.absoluteshell');
		shell.removeClass('full');
		shell.addClass('empty');
	}
);

//Hover over Phones, Plans, or Extras Button
$('.subitems').each(function()
{
	var target = $(this).parent().parent().parent();
	target.hoverIntent(
	{
		sensitivity: 5,
		interval: 75,
		over:
		function() 
		{
			if(target.hasClass('animating'))
				return;
			var shell = target.find(".absoluteshell");
			target.addClass('animating');
			shell.removeClass('empty');
			shell.addClass('full');
			
			var shellheight = shell.css("maxHeight") + "";
			shellheight = shellheight.replace(/\D/gi, "");
			if(shellheight != "")
				shellheight = parseInt(shellheight);
			else
				shellheight = 149;
			
			shell.animate({height:shellheight,bottom:"10px"}, {duration: 300});
			target.find("ul.subitems").css({"display":"block"});
		},
		out: 
		function() 
		{
			if(!target.hasClass('animating'))
				target.addClass('animating');
				
			var shell = target.find(".absoluteshell");
			shell.animate({height:"69",bottom:"-1px"}, 
				{
					duration: 300,
					complete: function() 
					{
						shell.removeClass('full');
						shell.addClass('empty');
						target.removeClass('animating');
						target.find("ul.subitems").css({"display":"none"});
					}
				});
		}
	});
});