$(document).ready(function() {
	if (document.addEventListener && $.browser.mozilla) {
    	$(window).bind('DOMContentLoaded', function(event){
				  // Hide forms
				  var forms = $( 'form.UIForm' ).hide();
				  
				  // Processing
				  forms.find( 'label' ).not( 'label[class*=customLabel]' ).each( function( i ){
				    var labelContent = this.innerHTML;
				    var labelWidth = document.defaultView.getComputedStyle( this, '' ).getPropertyValue( 'width' );
				    var span = document.createElement( 'span' );
				        span.style.display = 'block';
				        span.style.width = labelWidth;
				        span.innerHTML = labelContent;
				    this.style.display = 'inline-block';
				    this.innerHTML = null;
				    this.appendChild( span );
				  } ).end();
				  
				  // Show forms
				  forms.show();									 									
  	});
  }
});


// jQuery(function($) {
// 	if (document.addEventListener && $.browser.mozilla) {
//     	$(window).bind('DOMContentLoaded', function(event){
// 				  // Hide forms
// 				  var forms = $( 'form.UIForm' ).hide();
// 				  
// 				  // Processing
// 				  forms.find( 'li label' ).not( 'label[class*=customLabel]' ).each( function( i ){
// 				    var labelContent = this.innerHTML;
// 				    var labelWidth = document.defaultView.getComputedStyle( this, '' ).getPropertyValue( 'width' );
// 				    var span = document.createElement( 'span' );
// 				        span.style.display = 'block';
// 				        span.style.width = labelWidth;
// 				        span.innerHTML = labelContent;
// 				    this.style.display = '-moz-inline-box';
// 				    this.innerHTML = null;
// 				    this.appendChild( span );
// 				  } ).end();
// 				  
// 				  // Show forms
// 				  forms.show();									 									
//   	});
//   }
// });

