/**
 * Using jQuery in requires noConflict() mode
 */
jQuery(function($){
		//console.log('Running common');

		//List decorator
		$('ul').find('> li:last').addClass('last');
		$('ul').find('> li:first').addClass('first');
				
		//Form input show/hide text
		$('.replace-once').focus(function(){
			if (this.value == this.defaultValue) {
			this.value='';
		}
		});
		$('.replace-once').blur(function(){
			if($.trim(this.value) == ''){
			this.value = this.defaultValue;
		}
		}) 		
		
		//Move the book reviews from the footer to the header
		//This stops facebook + google from indexing the book-reviews ahead of the content
		$('#book-reviews').html($('#footer-book-reviews').html());
		
		//Setup cycle animation on book reviews	
		//Attach Cycle to each gallery classes, then pause them.
		$('ul#book-reviews').each(function(){
			$(this).cycle({ 
		    fx:      'fade', 
		    speed:    700, 
		    timeout:  10000,
			});
		});			
	}
 );
