$(document).ready(function () {

    //Open External Links In a New Tab
    $('a[rel=external]').attr('target', '_blank')

    //Remove Skype Phone Number Detection
    window.setTimeout(function () {
        $('.skype_pnh_container').html('');
        $('.skype_pnh_print_container').removeClass('skype_pnh_print_container');
    }, 800);

    //Create xhtml strict friendly iframe
    $('a[rel=youtube]').each(
		function (i) {
		    $(this).replaceWith("<iframe src='" + this.getAttribute("href") + "&rel=0&wmode=transparent' width='320' height='240' frameborder='0' scrolling='no' allowfullscreen></iframe>");
		}
	);
});


// Função que recebe o elemento a ser limpo, com o texto default de exibição. De acordo com o foco (0 ou 1)
// é feita a limpeza ou não do campo
function limpaElemento(elemento, texto, foco) {

    if (foco == 0) {
        elemento.value = texto;
    } else {
        if (elemento.value == "") {
            elemento.value = texto;
        }
    }
}
