﻿/*<![CDATA[*/
$(function () {
    //Get our elements for faster access and set overlay width
    var div = $('div.sc_menu'),
    		ul = $('ul.sc_menu'),
    		ulPadding = 15;

    //Get menu width
    var divWidth = div.width();

    //Remove scrollbars	
    div.css({ overflow: 'hidden' });

    //Find last image container
    var lastLi = ul.find('li:last-child');

    //When user move mouse over menu
    div.mousemove(function (e) {
        var ulWidth = lastLi[0].offsetLeft + lastLi.outerWidth() + ulPadding;
        var left = (e.pageX - div.offset().left) * (ulWidth - divWidth) / divWidth;
        div.scrollLeft(left);
    });
});
/*]]>*/
$(document).ready(function () {

    $(document).pngFix();

    $("#menu a").fadeTo("fast", 1);
    $("#menuhome img").fadeTo("fast", 1);

    $("#menuhome img").hover(function () {
        $(this).fadeTo("fast", 0.6);
    }, function () {
        $(this).fadeTo("fast", 1);
    });

    $("#menu a").hover(function () {
        $(this).fadeTo("fast", 0.6);
    }, function () {
        $(this).fadeTo("fast", 1);
    });

    $("#accochannel img").fadeTo("fast", 1);

    $("#accochannel img").hover(function () {
        $(this).fadeTo("fast", 0.6);
    }, function () {
        $(this).fadeTo("fast", 1);
    });

});
$(function () {

    $('.novita0').show();

    var elemento = $('.novita0')

    var evento = document.getElementById("evento")

    $('#novita img').click(function () {
        if (elemento != "") {

            $(elemento).hide();

            elemento = '.' + $(this).attr("id");

            $(elemento).fadeTo("slow", 1);
        }

    })
});
