// JavaScript Document

$(document).ready(function() {
	var shown = false;
	var timed = 250; // Time delay
	$('.dropdown li').each(function() {
		if (!$(this).hasClass('dropbutton')) {
			$(this).hide();
		}
	});
/**
 * Click effect
 **/
	$('.dropbutton a').click(function() {
		
		if (shown != true) {
			// enable menu
			$('.dropdown li').each(function() {
				$(this).show(timed);
			});
			$(this).css({'color': '#FF0'});
		} else {
			// disable menu
			$('.dropdown li').each(function() {
				if (!$(this).hasClass('dropbutton')) {
					$(this).hide(timed);
				}
			});
			$(this).css({'color': 'white'});
		}
		shown = !shown;
		return false;
	});
/**
 * Hover effect
 ** /
	$('.dropdown').hover(function() {
		// enable menu
		$('.dropdown li').each(function() {
			$(this).show(timed);
		});
		$(this).css({'color': '#FF0'});
	}, function() {
		// disable menu
		$('.dropdown li').each(function() {
			if (!$(this).hasClass('dropbutton')) {
				$(this).hide(timed);
			}
		});
		$(this).css({'color': '#FFF'});
	});
*/
});
