//IE detection var SCMMusicPlayer_isIE = true; document.write(''); window.SCMMusicPlayer = window.SCMMusicPlayer || { init:function(dataStr){ if(typeof hypsterBarConfig != "undefined") dataStr = hypsterBarConfig; if(!document.body || !document.body.firstChild) { alert("The hypster music player must be placed after the tag."); return; } this.dataStr = dataStr; this.data = eval('('+dataStr+')'); this.url = 'http://scm.hypster.com/container.php?url='+ escape( location.href.replace(/scmplayer\=true/g, 'scmplayer=false')) +'&place='+this.data.placement+'&showplaylist='+this.data.showplaylist; this.hasFrame = window.parent!=window; this.frameBgColor = '#FFF'; if(this.data.backgroundColor) this.frameBgColor = this.data.backgroundColor; if(navigator.userAgent.match(/iPad|iPhone|Android|Blackberry|mobile/i) == null){ if(!this.hasFrame || location.href.indexOf("scmplayer=true")>0){ if(!SCMMusicPlayer_isIE) this.codeNonIE(); else this.codeIE(); this.initEventsWithPlayer(); }else{ this.initEventsWithoutPlayer(); } } }, codeNonIE:function(){ var scmCSSCode = ''; document.write(scmCSSCode); var scmCSS = document.createElement('div'); scmCSS.id="scmCSS"; scmCSS.innerHTML = scmCSSCode; var scmFrame = document.createElement('iframe'); scmFrame.frameBorder = 0; scmFrame.id = "scmFrame"; scmFrame.name = "scmFrame"; var scmSendData = document.createElement('form'); scmSendData.action = this.url; scmSendData.method = "post"; scmSendData.id = "scmSendData"; if(!this.hasFrame) scmSendData.target = "scmFrame"; else scmSendData.target = "_self"; var scmData = document.createElement('input'); scmData.id = "scmData"; scmData.name = "scmData"; scmData.type = "hidden"; scmData.value = this.dataStr; scmSendData.appendChild(scmData); document.body.insertBefore(scmFrame,document.body.firstChild); document.body.insertBefore(scmSendData,document.body.firstChild.nextSibling); document.body.insertBefore(scmCSS,document.body.firstChild.nextSibling); document.getElementById('scmSendData').submit(); //remove all redundant nodes this.addEvent(window,'load',function() { var current = document.body.lastChild; while(current.id!="scmCSS"){ document.body.removeChild(current); current = document.body.lastChild; } current = document.body.firstChild; while(current.id!="scmFrame"){ document.body.removeChild(current); current = document.body.firstChild; } },false); }, codeIE:function(){ var scmCode=''; scmCode+='