$(document).ready(function() {
	$('li.droptab').each(function () {
	    // options
	    var distance = 0;
	    var time = 0;
	    var hideDelay = 0;

	    var hideDelayTimer = null;

	    // tracker
	    var beingShown = false;
	    var shown = false;

	    var trigger = $('.droptoplink', this);
	    var popup = $('.dropmenu', this).css('opacity', 0);

	    // set the mouseover and mouseout on both element
	    $([trigger.get(0), popup.get(0)]).mouseover(function () {
			  popup.css({
	           display: 'block', // brings the popup back in to view
			   opacity: 1
	          })
	    }).mouseout(function () {
				popup.css({
					display: 'none',
					opacity: 0
				})
			});
	 });
	
	$('ul.dropmenu li').prepend("<div class='menuitembg'></div>");
	$('.dropmenu a').hover(function(){
		$(this).siblings().css("display","block");
	},
	function(){
		$(this).siblings().css("display","none");
	});
});

