
var image1 = $('<img />').attr('src', '/images/common/sign-up-button-hover.png');

function validate_signup() {
	if ( $('#account_email').val() == '' ) {
		alert('Your email address is requred.'); return false; }

	if ( $('#account_login').val() == '' ) {
		alert('Your login name is requred.'); return false; }

	if ( $('#account_password').val() == '' ) {
		alert('Your password is requred.'); return false; }

	if ( $('#account_first_name').val() == '' || $('#account_last_name').val() == '' ) {
		alert('Your first and last name are requred.'); return false; }

	if ( $('#account_cc_number').val() == '' ) {
		alert('A valid credit card number is requred.'); return false; }
		
	if ( $('#account_cc_cvv2').val() == '' ) {
		alert('Your credit card\'s CVV2 (security code) is required.'); return false; }
	
	if ( $('#account_billing_zip').val() == '' ) {
		alert('Your billing zip (postal) code is requred.'); return false; }
	
	if ( $('#account_agree_to_terms').val() == 0 ) {
		alert('You must agree to the Terms of Service and Privacy policy to use PacsDrive.'); return false; }
		
	return true;
}

$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade', timeout: 8000, speed:2000 // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
});

function clear_me(formObj, text) {
	if( $(formObj).val() == text ) {
		$(formObj).css( 'color', '#333' );
		$(formObj).val("");
	}
}

function unclear_me(formObj, text) {
	if( $(formObj).val() == '' ) {
		$(formObj).css( 'color', '#aaa' );
		$(formObj).val(text);	
	}
}

function confirm_exit() {
	if(!confirm("Are you sure you want to exit the customer portal without logging out?"))
		return false;
}
