$(document).ready(function(){

	/* awards SCRIPT */
	$('ul.award').click(function(){
		$(this).next('div.awardInfo').slideToggle();
	});
	
	
	
	/* GALLERY SCRIPT */
	
	$("div.info:first").removeClass('hidden');
	
	$('#thumbnails img').hoverIntent( 
		function() {
			$("#thumbnails img").removeClass('currentproject');
			var project = $( this ).attr("alt");
			$("div.info").addClass('hidden');
			$("#"+project).removeClass('hidden');
			$(this).addClass('currentproject');
		},
		function(){}
	);


	$("a[rel='lightbox']").colorbox();


	/* homepage slideshow */
			$(function() {
		    $('#pause').click(function() { $('#slides').cycle('pause'); return false; });
		    $('#play').click(function() { $('#slides').cycle('resume'); return false; });
		    
		    $('.project-link-box a').hide();
		    
				$('#slideshow p, .project-link-box').hover(
		        function() { $(this).find('a').show(); },
		        function() { $(this).find('a').hide(); }
		    );
		    
		    $('#slides').cycle({
		        fx:     'fade',
		        speed:   2000,
		        timeout: 8000,
		        next:   '#next',
		        prev:   '#prev',
		        random:  1,
		        pause:     1, 
		        cleartypeNoBg:true
		    });
		});
		
	/* homepage quote hide */
		$(".whatevs").delay(5000).queue(function(n) {
		  $(this).fadeOut(); 
		  $('#slides').cycle('resume');
		   n();
		});
		
	/* dropdown menu */
		    $('.menu-header').hoverIntent(
		    function() { $('ul', this).stop(true, true).slideToggle(100); },
		    function() { $('ul', this).stop(true, true).slideToggle(100);  }
		   );
		
	/* whole div clickable */
		$(".homebox").click(function() {
		  window.location = $(this).find("h2:first a:first").attr("href");
		});
		
		$(".homebox").hover(
		  function() {
		    $(this).addClass("hover");
		  },
		  function() {
		    $(this).removeClass("hover");
		  }
		);
		

	
	
	
	
	/*  */
		
		
});

