$( document ).ready( function() { addBehaviour( $( 'body' ) ); });

function addBehaviour( element ) {

	$( 'a[rel*=facebox]' ).facebox();

	$( 'form.validateThisForm', element ).bind( "submit", function(e) {
			if( !this.id ) { alert( 'Specificati un ID pentru formular! Thx ;)' ); return false; }
			if ( typeof( error_msg ) == 'undefined' ) { error_msg = 0; }
			return validateForm( this.id, error_msg, 0, 'form-field-error' );
	} );



	
}
