锘?(function () { // 澶氳棰戞樉绀哄垏鎹€ $(".switchVideo").eq(0).addClass("curSelectedVideo"); $(".switchVideo").click(function () { var videoUrl = $(this).data("url"); $(".switchVideo").removeClass("curSelectedVideo"); $(this).addClass("curSelectedVideo"); $("#videoPlayUrl").val(videoUrl); var videoAll = $.find(".videoPlay"); $(".videoPlay").next().remove(); videoPlay(videoAll); }); function videoPlay(videoAll) { var videoPlayUrl = $("#videoPlayUrl").val(); var waitPlayPhoto = $("#waitPlayPhoto").val(); var photoJson = $("#photoJson").val(); var poster = ''; if (photoJson) { var flieName = videoPlayUrl.substring(videoPlayUrl.lastIndexOf("/") + 1); flieName = flieName.substring(0, flieName.lastIndexOf("_")); var photos = JSON.parse(photoJson); for (var i = 0; i < photos.length; i++) { if (photos[i].FileName.indexOf(flieName) !== -1) { poster = photos[i].PhotoUrl; break; } } } else { poster = waitPlayPhoto; } $.each(videoAll, function (i, val) { var src = videoPlayUrl; var $width = $("#videoWidth").val(); var $height = $("#videoHeight").val(); var boarddiv = '
'; $(this).after(boarddiv); $(this).hide(); }); // 鍔犺浇瑙嗛鎾斁.js鏂囦欢 var myHead = document.getElementsByTagName('HEAD').item(0); var myScript = document.createElement("script"); myScript.type = "text/javascript"; myScript.src = "/content/_common/base/js/power.videoreversion.js"; myHead.appendChild(myScript); } });