﻿if(navigator.userAgent.indexOf("AppleWebKit") > -1 && navigator.userAgent.indexOf("Safari") > -1 && navigator.userAgent.indexOf("iPad") > -1){
	//if(navigator.userAgent.indexOf("IE")<=-1){
		if(window.location.href.indexOf("m.9911")>-1){
			window.location.replace("http://www.9911.com/");
		}
		if($("mblog_top_flash")){
			$("mblog_top_flash").setStyle('background-image','url(http://xfiles.cdnmyspace.cn/dir/9911/v3/images2/ani.png)');
		}
		var flashEmbed=$$("embed");
		var flashMsEmbed=[];
		flashEmbed.each(function(ele){
			if(ele.getAttribute("id")&&ele.get("flashvars").indexOf("location")>-1){
				flashMsEmbed.push(ele);
			}
		});
		if(flashMsEmbed.length!==0){
		flashMsEmbed.each(function(ale){
			var flashvars=decodeURIComponent(ale.get("flashvars"));
			var flashvarsd=flashvars.substring(flashvars.indexOf("[")+1, flashvars.lastIndexOf("]"));
			var flashAudioSrc=JSON.decode(flashvarsd).location;
			var flashAudioName=JSON.decode(flashvarsd).name;
			var audioHtml5=new Element("audio");
			audioHtml5.className="ipadaudio";
			//alert(flashvarsd);
			audioHtml5.setProperties({
				src:flashAudioSrc,
				controls:"controls",
				text:"对不起，您的浏览器不支持此播放器",
				title:flashAudioName
			});
			//ale.replaceWith($(audioHtml5));
			audioHtml5.injectBefore(ale);
			ale.destroy();
		});
		}
	}