﻿$(function(){
    initFlashBorders();
    initClearInputs();
});

/* Flash Border Removal
===================================================================================== */
function initFlashBorders(){
    if ($.browser.msie){
        $("object[@type='application/x-shockwave-flash']").each(function(){
                var h = this.outerHTML ;
				var params = '' ;
				var j = this.childNodes.length - 1 ;
				do {
					var p = this.childNodes[j] ;
					if (p.tagName == "PARAM") params += p.outerHTML ;
				} while (j--) ;
				var tag = h.split(">")[0] + ">" ;
				this.outerHTML = tag + params + this.innerHTML + " </object>" ;
            });
    }
}

/* Form Element Methods
===================================================================================== */
function initClearInputs(){
    $("input.autoClear").each(function(){
            $(this).attr("default",$(this).val());
            $(this).focus(function(){if($(this).val() == $(this).attr("default")) $(this).val("");});
            $(this).blur(function(){if ($(this).val() == "") $(this).val($(this).attr("default"));});
        });
}
