﻿$(document).ready(
function()
{

    $(".menu_group > .inactive")
        .mouseover(function()
        {
            $(this).animate({ marginLeft: '10px', opacity: .9 }, 300);
        })
        .mouseout(function()
        {
            $(this).stop()
                   .animate({ marginLeft: '0px', opacity: .6 }, 300);
        });

    $(".anim_link")
        .mouseover(function()
        {
            $(this).animate({ paddingLeft: '10px' }, 300);
        })
        .mouseout(function()
        {
            $(this).stop()
                   .animate({ paddingLeft: '0px' }, 300);
        });
        
        
});

function submitFeedback()
{
    $("#feedbackResult").html("Sender din melding, vennligst vent...");
    $("#submitBtn").attr('disabled', 'disabled');

    var form = $("#feedbackForm");

    $.ajax({
        type: 'POST',
        url: "/Expose/Feedback/Send.aspx",
        data: form.serialize(),
        dataType: 'json',
        success: function(result)
        {
            $("#feedbackResult").html(result.message);

            if (result.status == 'ok')
            {
                form.find("input").not("#submitBtn").val('');
                form.find("textarea").val('');
            }

            $("#submitBtn").removeAttr('disabled');
        }
    });
}


