// JavaScript Document
jQuery(document).ready(function(){
	
	// slider at home
	
		$('.slides_container').cycle({ 
    			
			timeout: 3000,  
			fx:     'scrollHorz', 
			prev:   '.prev', 
			next:   '.next'
		});
		
		
		$('.excerpt-container').cycle({ 
			timeout: 3000,
			fx:     'scrollVert', 
			prev:   '.prev', 
			next:   '.next' 
			
		});
				
	
	//this function attached focus and blur events with input elements
	var addFocusAndBlur = function($input, $val){
		
		$input.focus(function(){
			if (this.value == $val) {this.value = '';}
		});
		
		$input.blur(function(){
			if (this.value == '') {this.value = $val;}
		});
	}

	// example code to attach the events
  	addFocusAndBlur(jQuery('.subs-bar'),'subscribe to our Newsletter');
	
});
