// disable firebug errors showing up in ie
function log(obj)
{
        if (window.console && console.log) console.log(obj);
}

function deactivateSend()
{
        $('#bt_contact').attr('disabled', 'disabled');
        $('#bt_contact').css('border-color', '#c00').css('background', '#ccc');
}
function activateSend()
{
        $('#bt_contact').removeAttr('disabled');
        $('#bt_contact').css('border-color', '#333').css('background', '#666'); 
}


$(document).ready(function()
{
        if ($("#form_contact").length) {
                deactivateSend();
                $('#form_contact .required').blur(function()
                {
                        if ($(this).val() == '') {
                                $(this).css('border-color', 'red');
                                deactivateSend();
                        } else {
                                $(this).css('border-color', '#999');
                                activateSend();
                        } 
                });
        }
        $('#print a').click(function(){
                window.print();
                return false;
        });
});