$.fn.accordion = function() {

	if(!$('#productSidebar ul').is(':animated')) {
		var ul = $(this).next('ul');
		toClose = $(this).parent().children('ul').not(':hidden');
		ul.slideDown(400);
		if (toClose.get(0) != (ul.get(0))) {
			toClose.slideUp(400);
			toClose.removeClass('open');			
		}			
	};
};

$(document).ready(function(){
	
	$("#navDropDownBtn").click(function(event) {
		event.preventDefault();
	})

	$("#navDropDownArea").mouseenter(function() {
		$("#navDropDown").slideDown(200);
	});
	
	$("#header").mouseleave(function() {
		$("#navDropDown").slideUp(200);
	});

	$("#productSidebar a.category").mouseover(function() { $(this).accordion(); });
	
	

});
function isArray(obj) {
	   if (obj.constructor.toString().indexOf("Array") == -1)
	      return false;
	   else
	      return true;
	}

function oc(a)
{
  var o = {};
  for(var i=0;i<a.length;i++)
  {
    o[a[i]]='';
  }
  return o;
}
	

