﻿/// <reference path="jquery-1.4.1.js" />
$(function() {
    $("#features div").mouseenter(function() {
        $(this).append("<img alt=\"&nbsp;\" src=\"/Media/Images/featurebackground.png\" />");
        $("#homepage_content p").stop().animate({ opacity: 0.1 }, 200, "linear");
        if ($(this).attr("id") == "feature_1") {
            $("#feature_bolt").css("left", "150px").css("display", "block");
        }
        if ($(this).attr("id") == "feature_2") {
            $("#feature_bolt").css("left", "480px").css("display", "block");
        }
        if ($(this).attr("id") == "feature_3") {
            $("#feature_bolt").css("left", "800px").css("display", "block");
        }
    }).mouseleave(function() {
        $(this).children("img").remove();
        $("#feature_bolt").css("display", "none");
        $("#homepage_content p").stop().animate({ opacity: 1.0 }, 200, "linear", function() {
            $("#homepage_content p").removeAttr("style");
        });
    });
    $("#feature_1").click(function() {
        window.location = "/SurgeOverview.aspx";
    });
    $("#feature_2").click(function() {
        window.location = "/ServicesOverview.aspx";
    });
    $("#feature_3").click(function() {
        window.location = "/ServicesOverview.aspx";
    });
});