$(document).ready(function(){
    //  The err is depreciated since we have changed how we handle
    //  displaying errors.  Leaving in for backwards compatibility.

	//	Check to make sure we have an err before trying to assign
	//	classes to a non-existant dom node.
	var err = $('tr:has(div.form-warning-inside)');
	if (err) {
		err.addClass('req');
		$("td.labelcell:has(span,req) > label").css("color","red");
		$("td.fieldcell:has(span,req) > label").css("color","red");
	}

    if ($('.tooltip').length > 0) {
        $('.tooltip').cluetip({
            //	character to split title text from body text.
            splitTitle:    '|',
            //	show arrow on sid of cluetip.
            arrows:        true,
            //	hide cluetip on mouseout.
            mouseOutClose: true,
            //	track mouse movement.
            tracking:      true,
            //	keep z index above all elements on page.
            cluezIndex:    10000,
            //	effect to open cluetip with.
            fx:            {open: 'fadeIn'}
        });
    }
});
