jQuery(document).ready(function() {
	
	// Cycle Feature Box 
	$('#feature_box') 
		.cycle({ 
		    fx:     'fade', 
		    speed:  1000, 
		    timeout: 5000, 
		    pager:  '#feature_box_pager',
			pause:   1 
	});
	
	
	$('#feature_scroller_homepage').cycle({ 
		fx:      'scrollHorz',
		speed:  500, 
	    prev:   '.previous_feature_entrepreneur', 
	    next:   '.next_feature_entrepreneur', 
	    after:   onAfter, 
	    timeout: 0 
	});
	
	function onAfter(curr, next, opts) {
	    var index = opts.currSlide;
	    $('.previous_feature_entrepreneur')[index == 0 ? 'hide' : 'show']();
	    $('.next_feature_entrepreneur')[index == opts.slideCount - 1 ? 'hide' : 'show']();
	}
	
	
	// Replace text in input
	$('.inputs_text_replacing').focus(function() {
		if ($(this).val() == $(this)[0].title) {
				$(this).removeClass("suggested_text");
				$(this).val("");
			}
		});
		$('.inputs_text_replacing').blur(function() {
			if ($(this).val() === "") {
				$(this).val($(this)[0].title);
				$(this).addClass("suggested_text");
			}
		});
	
	$.each($('.inputs_text_replacing'), function() {
		$(this).blur();
	});
	// Add Title to Input field
	
	
	$("table tr:odd").addClass("odd");
	
});

