﻿key = "HasSilverLight";
minVersion = "2.0.50727";
function HasSilverLight(version)
{
    if(typeof(version) != "undefined" && version != null)
        minVersion = version;

    cookie = $.cookie(key)
    if(cookie != null && cookie == "true")
    {
        return true;
    }
    else if(cookie != null)
    {
        return false;
    }
    else
    {
        $.getScript("/SilverLight.js", checkVersion);
    }
}
function checkVersion()
{
    options = { path: '/', expires: 10 }
    $.cookie(key, Silverlight.isInstalled(minVersion), options);
    //window.location.reload();
}
