﻿$(document).ready(function() {
    //Translation widget

    $('#translate').toggle(function() {
        $('#MicrosoftTranslatorWidget').show();
    	return false;
    }, function() {
        $('#MicrosoftTranslatorWidget').hide();
    	return false;
    });   

    $('#MSTWGoImage').live('click', function(event) {
	    $('#MicrosoftTranslatorWidget').hide();
    });

});

// v1.0 created by Activepixels 20 Jan 10

$(document).ready(function() {
	setTimeout(initOverLabels, 50);
});

// v1.0 created by Activepixels 30 May 08
// CompactAccessibleForms adapted from AListApart to use jQuery library

function initOverLabels() {
    $('.overlabel').each(
        function() {
            var t = $(this);
            var l = $('#' + $(this).attr('for'));
            $(t).addClass('overlabel-apply');
            if ($(l).val() !== '') {
                $(t).css("textIndent", "-2000px");
            }
            $(l).bind("focus", function(e) {
                $(t).css("textIndent", "-2000px");
            });
            $(l).bind("blur", function(e) {
                if ($(l).val() == '') {
                    $(t).css("textIndent", "0px");
                }
            });
            // Handle clicks to label elements (for Safari).
            $(t).bind("click", function(e) {
                $(l).focus();
            });
        }
    )
}

function renderEmail(){
    user = "sales"; 
    site = "silfox.com"; 
    document.write('<a href=\"mailto:' + user + '@' + site + '\">'); 
    document.write(user + '@' + site + '</a>'); 
}
