//adds CSS stylesheet that hides the elements. Gets rid of flicker before page loads!
(function () {
	var head = document.getElementsByTagName("head")[0];
	if (head) {
		var scriptStyles = document.createElement("link");
		scriptStyles.rel = "stylesheet";
		scriptStyles.type = "text/css";
		scriptStyles.href = "../styles/flicker.css";
		head.appendChild(scriptStyles);
	}
}());


$(document).ready(function(){
 	$(".dropdown-box").click(function(){
		
		$(".dropdown-box").children(".dropdown").css("display", "none"); //reset all dropdowns
		
		if($(this).hasClass('show-dropdown')){
			$(".dropdown-box").removeClass('show-dropdown'); //reset all dropdowns' classes
			
		}else{
			$(".dropdown-box").removeClass('show-dropdown'); //reset all dropdowns' classes
			$(this).addClass('show-dropdown');
			$(this).children(".dropdown").slideDown("medium");
		}
	});	
});


