/* 2010 by Mark de Jong @ Eggplant Digital */
jQuery(document).ready(function(){
	var delay=300;
});

var curr_no=1;
var timer_no=1;
var rotate_timer="";
var timer=1000;
var sh;

function showItem(no){
	if(curr_no!=no){
		resetItems();
		jQuery("#slide-"+no).fadeIn();
		curr_no=no;
	}
}

function resetItems(){
	jQuery("#slide-"+curr_no).fadeOut();
}
function autoRotate(){
	showItem(timer_no);
	timer_no++;
	if(timer_no > jQuery("#caroussel div.slide").length){
		timer_no=1;
	}
}

sh = setInterval(autoRotate, timer);

// Clear the input field
jQuery(document).ready(function(){
	jQuery('#s').focus(function(){		
		if(jQuery(this).val() == 'Type and press enter') {
			jQuery(this).val('');
			jQuery(this).css('color', '#333');
		}
	})
	.blur(function(){		
		if(jQuery(this).val() == '') {
			jQuery(this).val('Type and press enter');
			jQuery(this).css('color', '#999');
		}
	});
	jQuery('.emailaddress').focus(function(){		
		if(jQuery(this).val() == 'E-mail Address') {
			jQuery(this).val('');
			jQuery(this).css('color', '#333');
		}
	})
	.blur(function(){		
		if(jQuery(this).val() == '') {
			jQuery(this).val('E-mail Address');
			jQuery(this).css('color', '#999');
		}
	});
});
