jQuery(document).ready(function($) {
	
	//email signup
	$('#signup').submit(function() {
		// update user interface
		$('#response').html('Registrando / Processing...');
		
		// Prepare query string and send AJAX request
		$.ajax({
			url: 'http://capglobal.org/wp-content/themes/gazette/includes/subscribe/store-address.php',
			data: 'ajax=true&email=' + escape($('#email').val()) + '&language=' + escape($('#language').val()),
			success: function(msg) {
				$('#response').html(msg);
			}
		});
	
		return false;
	});
	
	//Countdown to 10-07-2011 - CAP 2011
		$(function () {
			var austDay = new Date();
			austDay = new Date(austDay.getFullYear(), 10-1, 07);
			$('#defaultCountdown').countdown({until: austDay});
			$('#year').text(austDay.getFullYear());
		});
		
	//Dropdown select
	try {
	$("select#language").msDropDown();
	} catch(e) {
	alert(e.message);
	}	
	
	$("a.pset").fancybox({ //Fancybox  
		'overlayColor': '#000',
		'overlayOpacity' : 0.8
    });	
	
	 $(".galleryNav").jCarouselLite({
                btnNext: ".next",
                btnPrev: ".prev",
                easing: "easeinout",
                mouseWheel: true,
                visible:3,
				auto: 3500,
                speed: 800,
                scroll: 1,
				circular:false
            });
        
		
});
