﻿$(document).ready(function () {

    $(".topMenu > li:eq(0) a").not("ul li ul a").css("color", "#00adee")
    $(".topMenu > li:eq(1) a").not("ul li ul a").css("color", "#eb008b")
    $(".topMenu > li:eq(2) a").not("ul li ul a").css("color", "#fef100")
    $(".topMenu > li:eq(3) a").not("ul li ul a").css("color", "#797979")

    $('#slider').nivoSlider({
        effect: 'fade', //Specify sets like: 'fold,fade,sliceDown'
        controlNav: false,
        directionNav: false
    });

    $("#extras h4:eq(0)").css('background', 'none');

});

function AddSubscriber() {
    var name = $("#txtNewsName").attr("value");
    var company = $("#txtNewsCompany").attr("value");
    var email = $("#txtNewsEmail").attr("value");

    $.ajax({
        type: "POST",
        url: "/Newsletter",
        data: "name=" + name + "&company=" + company + "&email=" + email,
        dataType: "html",
        success: function (result) {
            var domElement = $(result); // create element from html
            $("#FooterNewsletterContainer").html(domElement); // append to end of list     
        }
    });
}
