﻿/* SLIDER */
function formatText(index, panel) {
  return index + "";
}

$(function () {
    $(".anythingSlider").anythingSlider({
        easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
        autoPlay: false,                // This turns off the entire FUNCTIONALY, not just if it starts running or not.
        delay: 3000,                    // How long between slide transitions in AutoPlay mode
        startStopped: false,            // If autoPlay is on, this can force it to start stopped
        animationTime: 1000,             // How long the slide transition takes
        hashTags: true,                 // Should links change the hashtag in the URL?
        buildNavigation: false,          // If true, builds and list of anchor links to link to each slide
		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
		startText: "Go",                // Start text
        stopText: "Stop",               // Stop text
        navigationFormatter: formatText // Details at the top of the file on this use (advanced use)
    });

    $(".anythingSlider #hp_slider_1_1_img").hover(function() {
        $("div#hp_slider_1_2_content").fadeOut("fast");
        $("div#hp_slider_1_3_content").fadeOut("fast");
        $("div#hp_slider_1_1_content").fadeTo("slow", 0.75);
    });

    $(".anythingSlider #hp_slider_1_2_img").hover(function() {
        $("div#hp_slider_1_1_content").fadeOut("fast");
        $("div#hp_slider_1_3_content").fadeOut("fast");
        $("div#hp_slider_1_2_content").fadeTo("slow", 0.75);
    });

    $(".anythingSlider #hp_slider_1_3_img").hover(function() {
        $("div#hp_slider_1_1_content").fadeOut("fast");
        $("div#hp_slider_1_2_content").fadeOut("fast");
        $("div#hp_slider_1_3_content").fadeTo("slow", 0.75);
    });
});




/* POPUP WMC */
function wmc(newurl) {
    window.open(newurl, "nomepopupwmc", "toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width=338,height=365");
}

/* GIOBITTA RANDOM FOOTER */
var footer = new Array();
footer[0] = new Footer("/img/Giobitta1.png");
footer[1] = new Footer("/img/Giobitta_vela.png");
footer[2] = new Footer("/img/Giobitta_carnevale.png");
footer[3] = new Footer("/img/Giobitta_computer.png");
footer[4] = new Footer("/img/Giobitta_pattini.png");
footer[5] = new Footer("/img/Giobitta_sport.png");
footer[6] = new Footer("/img/Giobitta_cinema.png");
footer[7] = new Footer("/img/Giobitta_tuffo.png");
footer[8] = new Footer("/img/Giobitta_sdraio.png");
footer[9] = new Footer("/img/Giobitta_libri.png");

function Footer(url) {
    this.url = url;
    return this;
}
var bNum = Math.round(Math.random() * (footer.length - 1));

