//Gestine PNG con JS
//Attivazione CufOn
//OnFocus input

$(function(){
    if($.browser.version < 7){
        pngfix();
    }
    Cufon.replace("#bottom strong, .love span, .sidebar .title, #footer .title", {
        fontFamily: 'Futura XBlk BT',
        hover : true
    });
    Cufon.replace("#header .title", {
        fontFamily: 'Futura XBlk BT',
        hover : true,
        color: '-linear-gradient(rgb(199, 231, 249), rgb(161, 214, 245))'
    });
    $(".delme").focus(function(){
        if ($(this).is('input')) {
            var orival = $(this).val();
            $(this).val("");
        }else{
            var orival = $(this).html();
            $(this).html("");
        }

        $(this).blur(function(){
            if($(this).is('input')){
                if ($(this).val() != "" && $(this).val() != orival) {
                    $(this).removeClass('delme').unbind('blur').unbind('focus');
                }else{
                    $(this).val(orival);
                }
            }else{
                if ($(this).html() != "" && $(this).html() != orival) {
                    $(this).removeClass('delme').unbind('blur').unbind('focus');
                }else if ($.browser.safari && $(this).val() != "" && $(this).val() != orival) {
                    $(this).removeClass('delme').unbind('blur').unbind('focus');
                }else{
                    $(this).html(orival);
                }
            }

        });
    });
    $(".copyright li").hover(function(){
        $(this).addClass('hover');
    }, function(){
        $(this).removeClass('hover');
    });
    $(".home .posts .post:last").addClass("last");
    $(".last-comments ul li:first").addClass("first");
    $("#comments ul.single-comments li:first").addClass("first");
    $("ul.comment-children li:last").addClass("last");    
    // Verificare se l'ultimo elemento é DISPARI
    
    $(".archives ul li:last").addClass("last");
});

