jQuery.noConflict();


jQuery(document).ready(function($){
    $(document).ready( function(){
        $('#header').innerfade({
            speed: 2000,
            timeout: 5000,
            type: 'sequence',
            containerheight: '248px'
        });
    });

    $(function(){
        var w = $("html").width();
        if(w < 1010 && w > 850){
            $("body").css({
                overflowX : "hidden"
            });
        }
        //gestione bordi

        $(".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);
                    }
                }

            });
        });
        $(".model a.text, .model a.transparent").hover(function(){
            $(this).parents(".model").find(".transparent").addClass("hover");
        }, function (){
            $(this).parents(".model").find(".transparent").removeClass("hover");
        });
        $("#top-navigation a.text, #top-navigation a.transparent").hover(function(){
            $(this).parents("li").find(".transparent").addClass("hover");
        }, function (){
            $(this).parents("li").find(".transparent").removeClass("hover");
        });
    });
});