﻿var IgniteSite = { };

$(document).ready(function () {
    (function () {
        var a_match = (new RegExp('MSIE [0-9]{1,}[\.0-9]{0,}')).exec(navigator.userAgent);
        IgniteSite.VersionIE = (a_match ? parseInt(a_match.toString().substring(5)) : -1);
    })();

    IgniteSite.QueryString = {};
    (function () {
        var e, a = /\+/g, r = /([^&=]+)=?([^&]*)/g, d = function (s) { return decodeURIComponent(s.replace(a, ' ')); }, q = window.location.search.substring(1);
        while (e = r.exec(q)) IgniteSite.QueryString[d(e[1])] = d(e[2]);
    })();

    initializeRollovers();
});

function initializeRollovers() {
    //preload
    $(window).load(function () {
        $(".rollover").each(function () { $("<img>").attr("src", $(this).attr("src").replace("-off.", "-on.")); });
    });

    $(".rollover").hover(
        function () { $(this).attr("src", $(this).attr("src").replace("-off.", "-on.")); },
        function () { $(this).attr("src", $(this).attr("src").replace("-on.", "-off.")); }
    );
}
