﻿

function CheckSilverlightInstalled() {
    var isSilverlightInstalled = false;
    try {
        try {
            var slControl = new ActiveXObject('AgControl.AgControl')//IE
            isSilverlightInstalled = true;
        }
        catch (e) {
            if (navigator.plugins["Silverlight Plug-In"]) //FF&Safari
            {
                isSilverlightInstalled = true;
            }
        }
    }
    catch (e) { }
    return isSilverlightInstalled;
}

function showVideoSmall(id) {

    var flash = 'silverlight';
    if (!CheckSilverlightInstalled()) flash = 'flash';

    // Can add a parameter to this to remove the html header and stuff...
    $.post('/small-video/' + id + '/', { vidtype: flash, id: id }, function(popup) {
        $('.videoContainer').append($(popup));
    });
}
