﻿// JavaScript Document

function closeOverlays() {
	
	$(".overlay").hide();
	$("#overSignup").hide();
	
}	

$(document).ready(function() {
	
	
	$("#signupButton").click(function(){
		$(".overlay").show();
		$("#overSignup").show();
	});
	
	$(".overlay").click(function(){ closeOverlays(); });
	$(".closeOverlays").click(function(){ closeOverlays(); });
	$(document).keyup(function(e) { if (e.which == 27) { closeOverlays(); }	});
	
	
	$(".albumHover").css({opacity: '0.5'});
	
	
	$('.nav_dd').hover(function(){
		var navleft = $(this).position().left;
		var navdrop = $(this).attr('rel');
		navleft = navleft - 10;
		$("#" + navdrop).css({'left': '' + navleft + 'px'});
		$("#" + navdrop).stop(true,true).fadeIn(250);
	}, function() {
		var navdrop = $(this).attr('rel');
		$("#" + navdrop).stop(true,true).delay(100).fadeOut(150);
	});
	
	$(".drop_menu").hover(function(){
		$(this).stop(true,true).show();
	}, function () {
		$(this).stop(true,true).delay(100).fadeOut(150);
	});
	

	
	$(".albumHover").hover(function(){
		$(this).stop(true,true).animate({opacity: '1'}, 250);
	}, function () {
		$(this).stop(true,true).animate({opacity: '0.8'}, 250);
	});
	

});
