$(document).ready(function() {

    if (($.browser.browser() == 'Internet Explorer') && ($.browser.version.number() < 7)) {
	    $("*").each(function() {
		    if($(this).css('float')=='left' || $(this).css('float')=='right') {
				$(this).css("display", "inline");
		    }
	    });
	}
	
    $(".swap-labels").find("input[type=text], textarea").each(function () {                              
        if(!$(this).parent().hasClass("ignore"))
        {
            var v;                               
            v = $("label[for=" + $(this).attr("id") + "]");                               
            v.addClass("hide-me");
            
            this.value = v.text();              
            
            $(this).focus(function(){
                if(this.value == v.text())
                {
                    this.value = "";
                }
            });
               
            $(this).blur(function(){                
                if(this.value == "")
                {
                    this.value = v.text();
                }
            });
        }
    });   
    
    $(".submit-button").mousedown(function() {
        $(".swap-labels").find("input[type=text], textarea").each(function () {                              
        
            var v;                               
            v = $("label[for=" + $(this).attr("id") + "]");                                                      
                           
            if(this.value == v.text())
            {
                this.value = "";
            }
        }); 
    });
    
    $('.faqs').accordion({ header: 'h3' });   
});
