﻿var flashVersion = "0,0,0";
var flashAvailable = false;
try
{
    var Plugin = navigator.plugins['Shockwave Flash'] || ActiveXObject;
    flashVersion = Plugin.description || (function () {
		try {
			return (new Plugin('ShockwaveFlash.ShockwaveFlash')).GetVariable('$version');
		}
		catch (eIE) {}
	}());
	
	if (flashVersion == undefined)
	{
	    "0,0,0";
	}
	
	flashVersion = flashVersion.match(/^[A-Za-z\s]*?(\d+)[\.|,](\d+)(?:\s+[d|r]|,)(\d+)/);
	
	flashAvailable = flashVersion != undefined && flashVersion[1] > 0 ? true : false;
}
catch(e)
{
    flashAvailable = false;
}   

var $j = jQuery.noConflict(); // Use jQuery via $j(...) to avoid Prototype library conflict

if (flashAvailable == true) {
    $j(".getFlash").each(function(i) {
        $j(this).hide();
    });
}
else {
    $j(".getFlash").each(function(i) {
        $j(this).show();
    });
}
