﻿/// <reference path="jquery-1.3.2.min-vsdoc.js" />
$(function() {
$("#distributor-links ul li a").mouseenter(function() {
        $(this).parent().css({ "background-color": "#666666" });
        $(this).css("color", "#EEEEEE");
    });
    $("#distributor-links ul li a").mouseleave(function() {
        $(this).parent().css({ "background-color": "#EEEEEE" });
        $(this).css("color", "#333333");
    });
    $("#distributor-links ul li a").click(function() {
        var subject = $(this).html();
        //alert($('input[name="RequestType"]').val());
        $('input[name="RequestType"]').val(subject);
        //alert(subject);
        return true;
    });
    $("#distributor-form").submit(function() {
        $.ajax({
            type: 'post',
            url: '/Request/RequestInformation/',
            data: $("#distributor-form").serialize(),
            success: function(data, status) {
                self.parent.tb_remove();
                $("#form-results").hide();
                $("#form-results").html("<h3>Your submission was successful, we will contact you soon</h3>").fadeIn("slow");
            }
        });
        return false;
    });
});