/**
* @author dondon
*/
$(function(){
	$("#favsite-carousel").jCarouselLite({
	    auto: 7000,
	    speed: 1500,
		visible: 1,
		mouseWheel: true
	});
		   // speed: 1000,
	try{	
	$('.home_featured_content_item').conner('7px bottom');
	$('.home_featured_content_item_2').corner('7px bottom');	
	} catch(e){
	
	}
	
	$("#savenotify").click(function(){addNotificationSubscriber();});	
	
	$("#searchbox").blur(function(){if($(this).val()==''){$(this).val('where do you want to go?');}});
	$("#searchbox").focus(function(){if($(this).val()=='where do you want to go?'){$(this).val('');}});
	
	function addNotificationSubscriber(){
		$.post(
		pageURL+"/addsubscriber",
		$("form[name=home-form-subscribe]").serialize(),
		function(data){
			//$(".form-check-notify").css({display: "none"});
			if(data == "TRUE"){
				$("input[name=notify_email]").val('');
				alert("Subscription successful. A confirmation email has been sent to your account.");
			} else if(data == 'EMAIL_SND_ERROR') {
				$("input[name=notify_email]").val('');
				alert("Subscription saved.");
			} else {
				alert("Subscription Error.");
			}
		});
	}
	try{$('#trans1').corner('10px bottom')}catch(e){}
	try{$('#whitepad3').corner('10px')}catch(e){}
	try{$('#whitepad2').corner('10px right')}catch(e){}
	try{$('#whitepad1').corner('10px left')}catch(e){}
});