
jQuery.fn.extend({
	getAnchor: function()
	{
		if(window.location.href.indexOf("#") != -1)
		{
			var url = window.location.href;
			var uanchor = window.location.href.split("#");
			if(uanchor[1])
			{
				return uanchor[1];
			}
		}
	}
});

function initMenu() 
{
  $('#cart .featured_content').hide();
  $('#cart .prod_text').hide();
  $("#cart .prod_image").hide();
  
  var tag = $(document).getAnchor();
  if(tag)
  {
  	$("#"+tag+" .featured_content").show();
  }
  else
  {
	  $('#cart .featured_content:first').show();
  }
  
  $('#cart .title').click(
    function() {
      var checkElement = $(this).next();
      if((checkElement.is('div.featured_content')) && (checkElement.is(':visible'))) {
        return false;
        }
      if((checkElement.is('div.featured_content')) && (!checkElement.is(':visible'))) {
        $('#cart .featured_content:visible').slideUp('normal');
        checkElement.slideDown('normal');
        return false;
        }
      }
    );
  }
$(document).ready(function() 
{
	initMenu();
});