$(document).ready(function(){
	// round corners
	$('.RoundCorner').corner("10px");
	
	// drop down nav
	$('ul#nav li a:last').addClass('last');
	$('ul#nav li').hover(
		function(){ $(this).children('ul').show(); },
		function(){ $(this).children('ul').hide(); }
	);	
	
	// home slideshow
	$('#homeSlideshow').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:   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) 
	});
	
	// testimonial slideshow
	$('#testimonialSlideshow').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:   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) 
	});
	
	// scrollpane
	$('#scroll-pane-holder').jScrollPane({ 
		scrollbarWidth:20,
		dragMaxHeight:20,
		scrollbarMargin:10
	});
	$('#scroll-pane-holder-short').jScrollPane({ 
		scrollbarWidth:20,
		dragMaxHeight:20,
		scrollbarMargin:20
	});
	$('#scroll-pane-holder-contact-left').jScrollPane({ 
		scrollbarWidth:20,
		dragMaxHeight:20,
		scrollbarMargin:20
	});
	$('#scroll-pane-holder-contact-right').jScrollPane({ 
		scrollbarWidth:20,
		dragMaxHeight:20,
		scrollbarMargin:20,
		enableKeyboardNavigation:false
	});
	$('#scroll-pane-holder-testimonials').jScrollPane({ 
		scrollbarWidth:20,
		dragMaxHeight:20,
		scrollbarMargin:20
	});
	
	// anti spam form validation
	$('input,textarea').keypress(function(){
		this.form.elements.pv.value='verified';
	});
	
	// png fix for old IE browsers
	$(document).pngFix();
});
