/**********************This script is an updated smart.php script. It supports html5 avatar*****************************/ addEvent(window, 'load', smart_load_funcs, false); function smart_load_funcs() { //load jquery library if it does not exist if(typeof jQuery == 'undefined' || isJqueryOld(jQuery.fn.jquery)) { //write_log('no jquery ... adding jquery '); var oScript = document.createElement("script"); oScript.setAttribute("type","text/javascript"); oScript.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"); if (oScript.readyState) { oScript.onreadystatechange = function () { // For old versions of IE if (this.readyState == 'complete' || this.readyState == 'loaded') { scriptLoadHandler(); } }; } else { // Other browsers oScript.onload = scriptLoadHandler; } document.getElementsByTagName('HEAD').item(0).appendChild(oScript); } else { jQuery = window.jQuery; loadOtherScripts(); } } /******** Called once jQuery has loaded ******/ function scriptLoadHandler() { // Restore $ and window.jQuery to their previous values and store the // new jQuery in our local jQuery variable //console.log("script load handler"); jQuery = window.jQuery.noConflict(true); loadOtherScripts(); } function loadOtherScripts(){ //detect if the current browser supports html5 video var support_html5_video = supports_video(); var disable_flash = 0; var support_flash = supports_flash(); //Check the page that this script has been embedded in to find all 'smartobject' tags in the HTML smart_tags=document.getElementsByTagName("smartobject"); //Create an array to hold references to the 'smartobject' tags s_objs=new Array(); smart_tools = new Array(); //Loop through all the 'smartobject' tags that were found on the page for(i=0;i - auto_open is an attribute) for(j=0;j