$(document).ready(function() {
	$('input').hover(function(){
		$(this).addClass('hover');
	},function(){
		$(this).removeClass('hover');
	});
	$('ul li:last-child, ol li:last-child').addClass('end');
	$('a.current').click( function(){
		return false;							   
	});
	$("#viral_print").click( function() {
		window.print();
		return false;
	});
	$('.greycurves').append('<div class="grey_bottom"></div>').prepend('<div class="grey_top"></div>');
	$('.whitecurves').append('<div class="white_bottom"></div>').prepend('<div class="white_top"></div>');
	$('#fname, #lname, #email, #message, #recipient, #captcha').focus(function(){
		var clearText = $(this).attr('value');
		$(this).removeClass('default').removeClass('error').addClass('focus');
		if(clearText == "First Name" || clearText == "Last Name"){
			$(this).attr('title', clearText);
			$(this).attr('value', '');
		}
	}).blur(function(){
		var clearText = $(this).attr('title');
		var thisValue = $(this).attr('value');
		$(this).removeClass('focus').removeClass('error').addClass('default');
		if((clearText == "First Name" || clearText == "Last Name") && thisValue == ""){
			$(this).attr('value',clearText);
			$(this).attr('title','');
		}
	});
	
	// Homepage slideshow
	if( $('#show').length > 0){
		$('#show') 
			.cycle({ 
    		fx:     'fade', 
    		speed:  '1100', 
    		timeout: 10000, 
    		pager:  '#tabs', 
			next:  '#button_r a',
			prev:  '#button_l a',
			pause: 1
		});	
	}
});