$(document).ready(function(){
	/* see http://bxslider.com/ for more details on this plugin.
		In this templated, I'm using it for the testimonials in the sidebar.
	*/
	$('.scroller').bxSlider({
		auto: true,
		autoControls: false,
		autoHover: true,
		pager: false,
		pause: 6000,
		controls: false
	});
	
	
	/* For articles and text, if you wrap a short phrase with 
		<span class="pullquote">in a span like this</span>, then whatever appears 
		in the span will become an eye-catching pull quote on the page. So that 
		it will be noticed when the page first loads, the pull quote inserted in
		a fixed spot in teh markup. For best effect, use no more than once per page. */
	$('span.pullquote').each(function() {
		text = $(this).text();
		// Get rid of unwanted charactors
		text=text.replace( /\((.*)\)/gi, " " );
		h1 = $(this).parent().prevUntil('h1');
		h1.next('p').eq('2').before('<blockquote class="pullquote"><p>&quot;'+ text +'&quot;</p></blockquote>');
	});
});

