$(document).ready(function() {
	$('#bookacruise-submit').click(function() {
	    err = 0;
	    agency = $("#agency").val();
	    email = $('#agency_email').val();
        country = $('#country').val();
        contact = $('#contact').val();
        comment = $("#comment").val();
	    // agency not set
	    if (agency == '') {
	        $('.err-agency').show();
	        err += 1;
	    } else {
	    	$('.err-agency').hide();
	    }
	    
	    // email not set
	    if (email == '') {
	        $('.err-email').show();
	        err += 1;
	    } else {
	    	$('.err-email').hide();
	    }
        
        // country not set
        if (country == '') {
	        $('.err-country').show();
	        err += 1;
	    } else {
	    	$('.err-country').hide();
	    }
        
        // contact not set
        if (contact == '') {
	        $('.err-contact').show();
	        err += 1;
	    } else {
	    	$('.err-contact').hide();
	    }
        
        // comment not set
        if (comment == '') {
	        $('.err-comment').show();
	        err += 1;
	    } else {
	    	$('.err-comment').hide();
	    }
	    
	    // email not valid
	    if (email != '' && email.match(/^[a-z0-9_.\-]+@[a-z0-9_.\-]+\.[a-z0-9_.\-]+$/i) == null) {
	        $('.err-email_not_valid').show();
	        err += 1;
	    } else {
	    	$('.err-email_not_valid').hide();
	    }
	    
	    if (err > 0) {			
	        return false;
	    }
	    
	});
});