/*	JS Document 
 *	Author: Tashreek Jackson
 *	Overview: jQuery Functions.	
*/

$(document).ready(function() {
	$('.input-hint').each(function() {
		var default_value = this.value;
		$(this).focus(function(){
			if(this.value == default_value) {
				this.value = '';
			}
		});
		$(this).blur(function(){
			if(this.value == '') {
				this.value = default_value;
			}
		});

	});
	
	$('#hb-container')  
		.cycle({ 
			fx:     'fade', 
			speed:  1000, 
			timeout: 6000,
			pagerAnchorBuilder: function(idx, slide) { 
				// return selector string for existing anchor 
				return '#home-tabs li:eq(' + idx + ') a'; 
    		}
	});
		
	$('#tab1').hover(function() { 
		$('#home-tabs li:eq(1) a').trigger('click'); 
		//return false; 
	}); 
	$('#tab2').hover(function() { 
		$('#home-tabs li:eq(2) a').trigger('click'); 
		//return false; 
	}); 
	$('#tab3').hover(function() { 
		$('#home-tabs li:eq(3) a').trigger('click'); 
		//return false; 
	}); 
	
	
	$('.slideshow')  
		.cycle({ 
			fx:     'fade', 
			speed:  700, 
			timeout: 5000, 
			pager:  '.slideshow-ctrl' 
	});
	
	$('.slideshow-small')  
		.cycle({ 
			fx:     'fade', 
			speed:  700, 
			timeout: 5000, 
			pager:  '.slideshow-ctrl' 
	});
	
});

Cufon.replace('h2', { fontFamily: 'din-cond-bold', hover: true });
