// JavaScript Document MoveEffect_selfref=new Array(); function RemoteEffects(){ //this.axis; this.x_distance; this.y_distance; this.total_distance; this.time; this.interval; this.MoveEffect = MoveEffectFunc; this.MoveEffectI = MoveEffectInterval; this.Cancel=CancelFunc; this.timePassed=0; this.inter=10; this.vinit=3; this.vfinal=0; this.acc=0; this.x_startpos=0; this.x_sign=1; this.y_sign=1; this.angle=0; this.lastTimestamp; function MoveEffectInterval(cpos){ sr = MoveEffect_selfref[cpos]; td = new Date(); var ctime = td.getTime(); sr.timePassed+=(ctime-sr.lastTimestamp); sr.lastTimestamp = ctime; finished=false; displacement = (sr.vinit * (sr.timePassed/1000))+(.5*(sr.acc)*((sr.timePassed/1000) * (sr.timePassed/1000))) x_displacement = Math.cos(sr.angle) * displacement; y_displacement = Math.sin(sr.angle) * displacement; cvel = Number(sr.vinit)+(Number(sr.acc)*Number(Number(sr.timePassed)/1000)) xval=Number(sr.x_startpos)+(Number(x_displacement)*sr.x_sign); yval=Number(sr.y_startpos)+(Number(y_displacement)*sr.y_sign); if(Math.abs(Number(displacement))>=Math.abs(Number(sr.total_distance)) || cvel<=0){ xval=Number(sr.x_startpos)+(Number(sr.x_distance)*sr.x_sign); yval=Number(sr.y_startpos)+(Number(sr.y_distance)*sr.y_sign); finished=true; } sr.domObj.style.left=Math.round(xval)+'px'; sr.domObj.style.top =Math.round(yval)+'px'; if(finished==true){ window.clearInterval(sr.interval); if(typeof(sr.finish) == "function") sr.finish(); } } function CancelFunc(){ window.clearInterval(sr.interval); } function MoveEffectFunc( x_distance, y_distance, time, domObj, finishFunc){ if(x_distance<0) this.x_sign=-1; else this.x_sign=1; if(y_distance<0) this.y_sign=-1; else this.y_sign=1; this.angle = (Math.atan(Math.abs(y_distance/x_distance))); x_distance=Math.abs(x_distance); y_distance=Math.abs(y_distance); this.x_distance = x_distance; this.y_distance = y_distance; this.total_distance = Math.sqrt((x_distance*x_distance)+(y_distance*y_distance)); this.d = new Date(); this.lastTimestamp = this.d.getTime(); this.time = time; this.domObj = document.getElementById(domObj); this.finish = finishFunc; this.timePassed=0; if(this.domObj.style.left) this.x_startpos = MoveEffectRemovePX(this.domObj.style.left); else this.x_startpos=0; if(this.domObj.style.top) this.y_startpos = MoveEffectRemovePX(this.domObj.style.top);else this.y_startpos=0; cpos = MoveEffect_selfref.length; MoveEffect_selfref[cpos]=this; this.vinit = ((this.total_distance*2)/this.time); this.acc = (this.vfinal - this.vinit)/this.time; this.interval = window.setInterval("MoveEffect_selfref["+cpos+"].MoveEffectI("+cpos+")", this.inter); } function MoveEffectRemovePX(strName){ return strName.substring(0, strName.length-2); } } /*# AVOID COLLISIONS #*/ ;if(window.jQuery)(function($){ /*# AVOID COLLISIONS #*/ var smart_tag_counter = 0; //holds the number of the smartobject tags var waitingForImageCounter=0; var l_image = new Array(); //Array of icon images for each SmartObject tool var smart_v_included=false; //flag to set whether to include smart_z_manager script var img_idx; //index of the image in l_image array var finished_adding_images=false; var smartsite_is_IE6 = false; smart_oid = "N1x3z8p6A81"; var flash_support = 0; var evid = getQueryStringParams('evid') , autoplay=getQueryStringParams('playvideoembed'), autoplay_popup=getQueryStringParams('playvideo'); var isMobile = { Android: function() { return navigator.userAgent.match(/Android/i); }, BlackBerry: function() { return navigator.userAgent.match(/BlackBerry/i); }, iOS: function() { return navigator.userAgent.match(/iPhone|iPad|iPod/i); }, Opera: function() { return navigator.userAgent.match(/Opera Mini/i); }, Windows: function() { return navigator.userAgent.match(/IEMobile/i); }, any: function() { return (isMobile.iOS() || isMobile.Android() || isMobile.BlackBerry() || isMobile.Opera() || isMobile.Windows()); } }; $.fn.smartobject = function(){ return this.each(function(){ var e = $(this); var smartconnect_tdiv; switch(e.attr('type')) { //-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- default: break; } smart_tag_counter++; finished_adding_images = true; }); };//end of $.fn.smartobject //Dynamically add an image to a div //-------------------------------------------------------------------------------- $.writeImage = function(imagesrc, divid, width, height, style_extras, extras, imgid){ if(smartsite_is_IE6 && imagesrc.indexOf(".png")!=-1) { $("#"+divid).append(''); } else { $("#"+divid).append(''); } } //Dynamically add an image to the beginning of a div, using browser detection to correct for IE6's lack of support for PNGs //-------------------------------------------------------------------------------- $.writeImageToBeginning = function(imagesrc, divid, width, height, style_extras, extras, imgid){ if(smartsite_is_IE6 && imagesrc.indexOf(".png")!=-1) $("#"+divid).prepend(''); else $("#"+divid).prepend(''); } $.overwriteImage = function(imagesrc, divid, width, height, style_extras, extras, id){ if(smartsite_is_IE6 && imagesrc.indexOf(".png")!=-1) $("#"+divid).html(''); else $("#"+divid).html(''); } $.smartsite_createCookie = function(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } $.smartsite_readCookie = function(name){ var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } //incrementWaitingForImageCounter tracks the number of icon images still to be loaded. Icon images must all be loaded before any tools can be used. //This is because some tools may be set to auto open, and if they try to open before their icons have been loaded, certain values may not be set. //-------------------------------------------------------------------------------- $.incrementWaitingForImageCounter = function(){ waitingForImageCounter++; } //Decrement the count for the number of icon images still loading. Icon images must all be loaded before any tools can be used. //This is because some tools may be set to auto open, and if they try to open before their icons have been loaded, certain values may not be set. //-------------------------------------------------------------------------------- $.decrementWaitingForImageCounter = function(){ waitingForImageCounter--; //If all the images have loaded andthe tools included on the page require smart_z_manager.js, which manages auto-opening, dynamically add smart_z_manager.js //-------------------------------------------------------------------------------- if(waitingForImageCounter==0 && smart_v_included==true && finished_adding_images) { $.addScript("http://www.smartsite.tv/remote/smart_z_managerV2.js", 0); } } //Add a script to the HEAD section of the page dynamically, causing it to run immediately //-------------------------------------------------------------------------------- $.addScript = function(sc_src, clr){ if(clr) $.clearOldScripts(); var oScript= document.createElement("script"); oScript.type = "text/javascript"; oScript.src = sc_src; document.getElementsByTagName('HEAD').item(0).appendChild( oScript ); } //Each time certain SmartConnect tools are used, the smartsite_responder.php script (which outputs javascript) is added to the HEAD section of the page. //This function clears existing script tags referencing the responder scripts, which are no longer needed once they are run once //-------------------------------------------------------------------------------- $.clearOldScripts = function(){ scrs=document.getElementsByTagName("script"); for(var z=0;z0){_19+="flashvars=\""+_1c+"\"";}_19+="/>"; }else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");} _19=""; _19+=""; var _1d=this.getParams(); for(var key in _1d){_19+="";} var _1f=this.getVariablePairs().join("&"); if(_1f.length>0){_19+="";}_19+="";} return _19; },write:function(_20){ if(this.getAttribute("useExpressInstall")){ var _21=new deconcept.PlayerVersion([6,0,65]); if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){ this.setAttribute("doExpressInstall",true); this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl"))); document.title=document.title.slice(0,47)+" - Flash Player Installation"; this.addVariable("MMdoctitle",document.title);}} if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){ var n=(typeof _20=="string")?document.getElementById(_20):_20; n.innerHTML=this.getSWFHTML();return true; }else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}} return false;}}; deconcept.SWFObjectUtil.getPlayerVersion=function(){ var _23=new deconcept.PlayerVersion([0,0,0]); if(navigator.plugins&&navigator.mimeTypes.length){ var x=navigator.plugins["Shockwave Flash"]; if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));} }else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");} catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); _23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";} catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");} catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}} return _23;}; deconcept.PlayerVersion=function(_27){ this.major=_27[0]!=null?parseInt(_27[0]):0; this.minor=_27[1]!=null?parseInt(_27[1]):0; this.rev=_27[2]!=null?parseInt(_27[2]):0; }; deconcept.PlayerVersion.prototype.versionIsValid=function(fv){ if(this.majorfv.major){return true;} if(this.minorfv.minor){return true;} if(this.rev