﻿/* Frontpage Load */
$(document).ready(function() {
    $(".frontpage .elements .fire").click(function() { window.location = '/Fire/'; });
    $(".frontpage .elements .earth").click(function() { window.location = '/Earth/'; });
    $(".frontpage .elements .water").click(function() { window.location = '/Water/'; });
    $(".frontpage .elements .ice").click(function() { window.location = '/Ice/'; });

    $(".frontpage .elements .slider").css({ backgroundPosition: "0 135px" }).mouseover(ElementOn).mouseout(ElementOff);

    $("#s3slider").s3Slider({
        timeOut: 4000
    });

});

function ElementOn() {
    $(this).stop().animate({ backgroundPosition: "(0 0)" }, {duration:500} );
}

function ElementOff() {
    $(this).stop().animate({ backgroundPosition: "(0 135px)" }, { duration: 500 });
}
