$(document).ready(function(){
	var cnt = 0;
	
	$("#media img").each(function(){
		if(cnt){
			$(this).css('display','none');
		}
		cnt++;
	});
	
	$('#media a').lightBox();
							
	$("#create-account-btn").click(function(){
		var error = [];
		var out = "";

		var fields = {
			fullName : 'Full Name',
			address : 'Address',
			city : 'City',
			state : 'State',
			zip : 'Zip',
			email : 'Email',
			password : 'Password'			
		};

		for(field in fields){
			if( $('input[name=' + field + ']').val() == ""){
				error.push(fields[field]);
			}
		}

		if(error.length)
		{
			for(x = 0; x < error.length; x++){
				out += "Please fill: \t" + $.trim(error[x]) + "\n" ;
			}
			alert(out);
			return false;
		}
		else{
			$("#create-account").submit();
		}
	});

});
