if( document.addEventListener ) document.addEventListener( 'DOMContentLoaded', cmxform, false );

function cmxform(){
  // Hide forms
  $( 'div.cmxform' ).hide().end();
  
  // Processing
  $( 'div.cmxform' ).find( 'li/label' ).not( '.nocmx' ).each( function( i ){
    var labelContent = this.innerHTML;
    var labelWidth = document.defaultView.getComputedStyle( this, '' ).getPropertyValue( 'width' );
    var labelSpan = document.createElement( 'span' );
        labelSpan.style.display = 'block';
        labelSpan.style.width = labelWidth;
        labelSpan.innerHTML = labelContent;
    this.style.display = '-moz-inline-box';
    this.innerHTML = null;
    this.appendChild( labelSpan );
  } ).end();
  
  // Show forms
  $( 'div.cmxform' ).show().end();
}

if( document.addEventListener ) document.addEventListener( 'DOMContentLoaded', dbfform, false );

function dbfform(){
  // Processing
  $( 'fieldset' ).find('span.dbf-label').each( function( i ){
	var labelContent = this.innerHTML;
    var labelWidth = document.defaultView.getComputedStyle( this, '' ).getPropertyValue( 'width' );
    var labelSpan = document.createElement( 'span' );
        labelSpan.style.display = 'block';
        labelSpan.style.width = labelWidth;
        labelSpan.innerHTML = labelContent;
    this.style.display = '-moz-inline-box';
    this.innerHTML = null;
    this.appendChild( labelSpan );
  } ).end();
}

$(document).load(function()
{
	$( '.yellow-hover' ).hover( function(){
		this.$old = this.style.backgroundColor;
		this.style.backgroundColor = "#ffc";
	},function(){
		this.style.backgroundColor = this.$old;
	});
});

