    	jQuery(document).ready(	
			function() {
	

       jQuery('#left_scroll img').fadeTo(0,0.8);
       jQuery('#right_scroll img').fadeTo(0,0.8);

           var current_page = 1;
		   var total_pages = jQuery(".gform_body > ul.gform_fields").size();
			var anim=false;
			jQuery('#left_scroll img').fadeTo(0,.4);
			jQuery('div.progress-'+current_page).addClass('on');
			
jQuery('#right_scroll').click(
    function() {
		if ((current_page < 3) && (anim !=true)) {

			anim=true;
            jQuery('#right_scroll img').fadeTo(200, 1);
			jQuery('div.progress-'+current_page).removeClass('on');

            current_page = current_page + 1;
             var item_width = jQuery('.gform_body ul').outerWidth() + 10;
           //calculae the new left indent of the unordered list
            var left_indent = parseInt(jQuery('.gform_body').css('left')) - item_width;
            
                          
//            jQuery('h4.page_list').html('Page '+current_page+' of '+total_pages);

       //get the width of the items ( i like making the jquery part dynamic, so if you change the width in the css you won't have o change it here too ) '
            jQuery('#left_scroll img').fadeTo(200, .8);

            jQuery('.gform_body:not(:animated)').animate({'left' : left_indent},'slow',function(){    
			            anim=false});
	 if (current_page > 2) {jQuery('#right_scroll').fadeTo(100, .4)};
     if (current_page < total_pages) {jQuery('#right_scroll').fadeTo(100, .8)};


}});       
	
    
            
    
jQuery('#left_scroll').click(
    function() {
		if ((current_page > 1) && (anim !=true)) {
			anim=true;
            jQuery('#left_scroll img').fadeTo('fast', 1);
			jQuery('div.progress-'+current_page).removeClass('on');
            current_page = current_page - 1;
            jQuery('h4.page_list').html('Page '+current_page+' of '+total_pages);
            
            var item_width = jQuery('.gform_body ul').outerWidth();

          var left_indent = parseInt(jQuery('.gform_body').css('left')) + item_width + 10;
              
            jQuery('.gform_body:not(:animated)').animate({'left' : left_indent},'slow',function(){    
            jQuery('#left_scroll img').fadeTo('fast', .8);
			            anim=false;
    if (current_page < 2) {jQuery('#left_scroll').fadeTo(100, .4)};
     if (current_page < total_pages) {jQuery('#right_scroll').fadeTo(100, .8)};

     

            });
            

    };
    
});


function checkPass(){
      //Store the password field objects into variables ...

      
      var pass1 = document.getElementById('password1');
      var pass2 = document.getElementById('password2');
      //Store the Confimation Message Object ...
      var message = document.getElementById('confirmMessage'); 
      //Set the colors we will be using ...
      var goodColor = "#66cc66";
      var badColor = "#ff6666";
      //Compare the values in the password field and the confirmation field
      if(pass1.value == pass2.value){
        //The passwords match.
        //Set good color and inform user of correct password
        pass2.style.backgroundColor = goodColor;
        message.style.color = goodColor;
 
        message.innerHTML = "Passwords Match!"
      }else{
        //The passwords do not match.
        //Set bad color and notify the user.
        pass2.style.backgroundColor = badColor;
        message.style.color = badColor;
        message.innerHTML = "Passwords Do Not Match!"
      }
    }
/*
var validator = $(".wpcf7-form").bind("invalid-form.validate", function() {
			$("#summary").html("Your form contains " + validator.numberOfInvalids() + " errors, Please fill in all fields highlighted in red.");
			alert("Your form contains" + validator.numberOfInvalids() + " errors, Please fill in all fields highlighted in red.");
		}).validate({
			debug: true,
			errorElement: "em",
			errorContainer: $("#summary"),
			errorPlacement: function(error, element) {
				error.appendTo( element.parent("td").next("td") );
			},
			success: function(label) {
				label.text("ok!").addClass("success");
			},
				rules: {
			"firstname": "required",
			"lastname": "required",
			"date-of-birth": "required",
			"street_address": "required",
			"city": "required",
			"state": "required",
			"zip_code": "required",
			"phone-area": {
				required:true,
				digits:true
			},
			"phone-prefix":  {
				required:true,
				digits:true
			},
			"phone-suffix":  {
				required:true,
				digits:true
			},
			"height_foot": "required",
			"height_inches": "required",
			"weight": "required",
			"primary_doctor": "required",
			"gender": "required",
			"name_signature_1": "required",
			"signature_date_1": "required",
			"name_signature_2": "required",
			"signature_date_2": "required",
			"email": {
				required: true,
				email: true
			}
		}
	
});
*/
});

   
  

function init() {
	jQuery('#gform_1 .gform_footer').addClass('old');
    jQuery('#gform_1 .gform_footer').clone().appendTo('#submit_destination');
	jQuery('#submit_destination > .gform_footer').removeClass('old');
	jQuery('#gform_1 .gform_footer.old').remove();
		jQuery("#uniform-gform_submit_button_1 span").click(function(){
			
			jQuery('form').submit();
		}, function(){});
//		jQuery('#checkout').remove();

}
window.onload = init; 


