/*	=========================
	
	scripts.js
	
	Put scripts here.
	
	Last edited: 10/14/09 by Dan
	
	========================= */
	
	/* define: primetime rotator, testimonial rotator, superfish menu, flickr _blank, columnator, column equalizer, form input cleanser, inline validation (floating), inline validation (to the side) */

jQuery(document).ready(function($){

	jQuery(function(){
		jQuery('ul.sf-menu').superfish( {
		
			animation: { opacity:'show', height:'show' }, 
			speed: 'fast'
		
		});
	});
	
	$('#testimonial-rotator>div').cycle({
		fx: 'fade',
		speed: 'fast',
		timeout: 12000
	});
	
	$('#pt-content').after('<div id="pt-pager"></div>').cycle({
		fx: 'fade',
		speed: 'fast',
		timeout: 8000,
		pager: '#pt-pager'
	});
	
	
	
	$('div.flickr_badge_image a').attr("target","_blank");

	if($('#home-news').height() < $('#content').height()) {
		$('#home-news .content').height($('#content').height()-40);
	}

	if($('#content').height() < $('#sidebar').height()) {
		$('#content').height($('#sidebar').height());
		$('#content .content').height($('#content').height()-40);
	}
	else if($('#content').height() > $('#sidebar').height()) {
		$('#sidebar').height($('#content').height());
	}
	
	$('#signup-form input:text').each(function() {
		
		//alert($(this).val());
		
		$(this).data("originalValue",$(this).val());
		
		$(this).click(function() {
			
			if($(this).val() == $(this).data("originalValue")) {
				$(this).val('');
			}
			
		});
		
		$(this).blur(function() {
		
			if($(this).val() == '') {
				$(this).val($(this).data("originalValue"));
			}
			
		});
	
	});

});

