$(function(){	   
	// insert quote element
	$('blockquote div > p:first-child').wrapInner('<q></q>');
	// add hr markup
	$('hr:not(hr.dash)').wrap('<div class="hRule"></div>');
	$('hr.dash').wrap('<div class="hRule dash"></div>');
	// scroll to free trial section
	if('body#home'){
		$('#siteNav li#tab5 a, #sidebar li:nth-child(8) a, a[href=#free_trial]').click(function(){		
			$.scrollTo('h2#free_trial', 'slow');
			return false;
		});
	}
	// scroll to top of page
	$('a[href=#top]').click(function(){								   
		$.scrollTo(0, 'slow');
		return false;
	});
	// add table striping
	$('#sample tr:nth-child(even)').addClass('alt-bg');
	// insert warning icon
	$('<img src="images/tradetiming_warning_icon.png" alt="" />').prependTo('#formError p');
	// clear value in 'Subject' input box
	$('input#subject')
		.focus(function(){
			if($(this).val() == $(this).attr('defaultValue')){
				$(this).val('');
			}	
		})	
		.blur(function(){
			if($(this).val() == ''){
				$(this).val($(this).attr('defaultValue'));	
			}
		});  
	// display Print window   
	$('#printMe').click(function(e){
		e.preventDefault();		
		printPage(); 		
	});
	function printPage(){ 
 		window.print(); 
 		return false;
	} 
});

