$(document).ready(function(){
	// drop down nav
	$('ul#nav li').hover(
		function(){ $(this).children('ul').show(); },
		function(){ $(this).children('ul').hide(); }
	);
	
	$('ul.in-page-nav li:first').addClass('first');	
	$('ul.in-page-nav li').each(function(){
		iTop = $(this).offset().top;
		try {iNextTop = $(this).next().offset().top;} catch(e) {iNextTop = -1;}
		if (iTop != iNextTop) $(this).addClass('last');
	});
	
	// Standard Round Corners
	$('.round, .green-box').corner("10px");
	// Use top, bottom, tl, tr, bl, br to identify which corner to style
	$('.round2').corner("20px tl br");
	$('#nav').corner("10px tl tr");
	
	// sidebar slideshow
	$('#sidebarSlideshow').cycle({
		height:  'auto',	// container height 
	    fade:     1,		// true for fade, false for slide 
	    speed:    2000,		// any valid fx speed value 
	    timeout:  5000,	// ms duration for each slide 
	    random:   1,       // true for random, false for sequence 
	    fit:      0,       // force slides to fit container 
	    pause:    0,       // true to enable "pause on hover" 
		cleartype: 1,	   // true to enable cleartype corrections
	    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) 
	});
	
	// testimonials slideshow
	$('#testimonialSlideshow').cycle({
		height:  '230px',	// container height 
	    fade:     1,		// true for fade, false for slide 
	    speed:    2000,		// any valid fx speed value 
	    timeout:  8000,	// ms duration for each slide 
	    random:   1,       // true for random, false for sequence 
	    fit:      0,       // force slides to fit container 
	    pause:    0,       // true to enable "pause on hover" 
		cleartype: 1,	   // true to enable cleartype corrections
	    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) 
	});
	
});
	
