﻿function SelectMenu(item) {
    $(item).addClass("selected");
}

var carousels = [];
function RegisterCarousel(id) {
    carousels.push(id);
}
function StartCarousels() {
    $.each(carousels, function(i, id) {
        $('#' + id + ' ul').roundabout(
                    { tilt: 0,
                        btnNext: '#' + id + '-next',
                        btnPrev: '#' + id + '-prev',
                        clickToFocus: false,
                        maxZ: 40,
                        minZ: 1,
                        minOpacity: 1
                    }
                );
    });
}
function ShowNews() {
    $box = $("#news-box");
    $div = $("<div></div>");
    $div.attr("title", $(".title", $box).html());

    $div.append("<p>" + $(".subtitle", $box).html() + "</p>");
    $div.append("<p>" + $(".text", $box).html() + "</p>");
    $div.dialog({
        modal: true,
        buttons: {
            Chiudi: function() { $div.dialog("close"); }
        }
    });
}
function zoom(code, pos) {
    $("a." + code + ".pos" + pos).trigger("click");
}