$(document).ready(function(){
	// Standard Round Corners
	$('.round,.browse').corner("10px");
	
	// Use top, bottom, tl, tr, bl, br to identify which corner to style
	$('.round2').corner("20px tl br");
	
	// drop down nav
	$('#NavBar ul div').hide();
	$('#NavBar ul li a,#NavBar ul li div').hover(
		function() { $(this).parent('li').children('div').show(); },
		function() { $(this).parent('li').children('div').hide(); }
	);
	
	// project gallery slideshow
	$('#projectSlideshow').cycle({
		height:  'auto',	// container height 
	    fade:     1,		// true for fade, false for slide 
	    speed:    2000,		// any valid fx speed value 
	    timeout:  4000,		// ms duration for each slide 
	    random:   0,       // true for random, false for sequence 
	    fit:      0,       // force slides to fit container 
	    pause:    0,       // true to enable "pause on hover" 
	    autostop: 0        // true to end slideshow after X slides have been shown (where X == slide count) (note that if random == true not all slides are guaranteed to have been shown) 
	});
	
	// project detail images
	$('#projectLargeImage div.projectImage:first').show();
	$('#projectThumbs a:first').addClass('selected');
	$('#projectThumbImages a').hover(function() {
		$(this).addClass('hover');
	}, function() {
		$(this).removeClass('hover');
	});
	
	$('#projectThumbImages a').click(function(){
		$('#projectLargeImage div.projectImage').hide();
		$('#projectThumbImages a').removeClass('selected');
		$(this).addClass('selected');
		var strImageToShow = $(this).attr('rel');
		$('#'+strImageToShow).fadeIn();
	});	
});
