$(document).ready(function(){

    if ($.browser.msie && $.browser.version == "6.0") {
        if (DD_belatedPNG) {
            DD_belatedPNG.fix('.pngfix');
        }
    }
    
    if ($('#texto_twitter2').length) {
		/*
        $.get('wp-content/themes/kraft/proc/proc_twitter.php', {
            procesa: 'usuario-sintag',
            name: 'mundophilly'
        }, function(data){
			$('#texto_twitter2').html(data);
        });
 		*/
    }
    
    
    
    
    $(".abrirVideo").fancybox({
        overlayColor: '#000000',
        overlayOpacity: 0.5,
        width: 531,
        height: 550,
        autoScale: false,
        padding: 0,
        scrolling: 'no',
        transitionIn: 'none',
        transitionOut: 'none',
        hideOnContentClick: false
    });
    $('input.inputBox').inputBox();
    $('select.selectBox').selectBox();
    
    var zIndex = 500;
    $('.ubicacor_inputs').each(function(){
        $(this).css({
            position: 'relative',
            zIndex: zIndex--
        });
    });
    
    $('.inputBUscador').focus(function(){
        if ($(this).attr("value") == "Buscar por palabras") {
            $(this).val("");
        }
    });
    
    $('.inputBUscador').blur(function(){
        if ($(this).attr("value") == "") {
            $(this).val("Buscar por palabras");
        }
    });
    
    $('#submitForm').click(function(){
        $('#buscadorAvanzado').submit();
        return false;
    });
    
});

//fecha comentarios
$(document).ready(function(){
    $('.comentario_fecha').each(function(){
        var asd = ["", "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"];
        var fecha = $(this).text().split('-');
        
        var out = fecha[0] + " de " + asd[parseInt(fecha[1])] + " de " + fecha[2];
        $(this).html(out);
    });
});

function soloAlfabetico(evt){
    var key = evt.keyCode ? evt.keyCode : evt.which;
    return (key <= 32 || (key >= 65 && key <= 90) || (key >= 97 && key <= 122) || (key >= 192 && key <= 256));
}

