
function preloader() {

Image1= new Image();
Image1.src = "http://forextradersacademy.com/wp-content/themes/forex/images/forextradersheader.jpg";

Image2 = new Image();
Image2.src = "http://forextradersacademy.com/wp-content/themes/forex/images/forextradersheader2.jpg";

Image3 =new Image();
Image3.src = "http://forextradersacademy.com/wp-content/themes/forex/images/forextradersheader3.jpg";

Image3 =new Image();
Image3.src = "http://forextradersacademy.com/wp-content/themes/forex/images/forextradersheader4.jpg";
}

$(document).ready( function(){  $('#portfolio').innerfade({ speed: 'slow', timeout: 8000, type: 'sequence', containerheight: '226px' }); $('.fade').innerfade({ speed: 'slow', timeout: 4000, type: 'sequence', containerheight: '1.5em' }); } ); 




//Hide that gay conflict from jQuery Gallery and video lightbox.
function handleError()
{
return true;
}
window.onerror = handleError;


function myvalid(){ 

    			var r_firstname = new LiveValidation( 'r_firstname', { validMessage: '.', wait: 500} );

    			r_firstname.add( Validate.Presence, {failureMessage: "." }  );

    			var r_lastname = new LiveValidation( 'r_lastname', { validMessage: '.', wait: 500});

    			r_lastname.add( Validate.Presence, {failureMessage: "."} );

    			var r_email = new LiveValidation( 'r_email', { validMessage: '.', wait: 500});

    			r_email.add( Validate.Presence, {failureMessage: "."}  );

				r_email.add( Validate.Email, {failureMessage: "."}  );				

          var automaticOnSubmit = r_firstname.form.onsubmit;

          r_firstname.form.onsubmit = function(){

	          var valid = automaticOnSubmit();

	          if(valid){ 

			

return true;

			  }

			  

			  else {

				 alert('Please fill in required fields');return false;

			  }
          }
}   

$(document).ready(function(){
			$("a[rel^='prettyOverlay'],a[rel^='prettyPhoto']").prettyPhoto({
				animationSpeed: 'normal', /* fast/slow/normal */
				padding: 40, /* padding for each side of the picture */
				opacity: 0.35, /* Value betwee 0 and 1 */
				showTitle: true, /* true/false */
				allowresize: true /* true/false */
			});
		});
