function start_app() { /*$(".alvireembeddedplayerbutton").attr("style", "cursor:pointer;"); $(".alvireembeddedplayerbutton").each(function() { var EmbeddedObj = $(this); var videocode = EmbeddedObj.data("videocode"); jQuery.ajax({ type: "POST", url: "https://www.alvire.com/player/embeddedplayer.php?button&videocode=" + videocode + "&get", dataType: "html" }).done(function(data) { if (data != "") { EmbeddedObj.html(data); } }).fail(function() {}); }); $(".alvireembeddedplayercustom").on("click", function() { var EmbeddedObj = $(this); var target = EmbeddedObj.data("target"); var videocode = EmbeddedObj.data("videocode"); $(".playermodal").remove(); $("#alvireplayer_" + videocode).remove(); jQuery.ajax({ type: "POST", url: "https://www.alvire.com/player/embeddedplayer.php?videocode=" + videocode, dataType: "html" }).done(function(data) { if (data != "") { EmbeddedObj.before(data); $("#alvireplayer_" + videocode).modal("show"); $('.remove_modal').on('click', function() { $("#alvireplayer_" + videocode).modal("hide"); $(".playermodal").remove(); }); } }).fail(function() {}); }); $("#play-button").on("click", function() { var EmbeddedObj = $(this); var target = EmbeddedObj.data("target"); var videocode = EmbeddedObj.data("videocode"); $(".playermodal").remove(); $("#alvireplayer_" + videocode).remove(); jQuery.ajax({ type: "POST", url: "https://www.alvire.com/player/embeddedplayer.php?videocode=" + videocode, dataType: "html" }).done(function(data) { if (data != "") { EmbeddedObj.before(data); $("#alvireplayer_" + videocode).modal("show"); $('.remove_modal').on('click', function() { $("#alvireplayer_" + videocode).modal("hide"); $(".playermodal").remove(); }); } }).fail(function() {}); });*/ $(".alvireembeddedplayer").attr("style", "cursor:pointer;"); $(".alvireembeddedplayer").hover(function() { $(this).find(".alvirevideodetail_innner").addClass("lowerOpacity"); $(this).find(".fadedelement").show(); }, function() { $(this).find(".alvirevideodetail_innner").removeClass("lowerOpacity"); $(this).find(".fadedelement").hide(); }); $(".alvireembeddedplayer").each(function() { var EmbeddedObj = $(this); var videocode = EmbeddedObj.data("videocode"); jQuery.ajax({ type: "POST", url: "https://www.alvire.com/player/embeddedplayer.php?videocode=" + videocode + "&get", dataType: "html" }).done(function(data) { if (data != "") { EmbeddedObj.html(data); } }).fail(function() {}); }); $(document).on('click', "#play-button", function() { var EmbeddedObj = $(this).parents('.alvireembeddedplayer'); var target = EmbeddedObj.data("target"); var videocode = EmbeddedObj.data("videocode"); $(".playermodal").remove(); $("#alvireplayer_" + videocode).remove(); jQuery.ajax({ type: "POST", url: "https://www.alvire.com/player/embeddedplayer.php?videocode=" + videocode, dataType: "html" }).done(function(data) { if (data != "") { EmbeddedObj.before(data); $("#alvireplayer_" + videocode).modal("show"); $('.remove_modal').on('click', function() { $("#alvireplayer_" + videocode).modal("hide"); $(".playermodal").remove(); }); } }).fail(function() {}); }); } (function AddListener() { thisPageUsingOtherJSLibrary = false; // injection technique borrowed from http://stackoverflow.com/questions/840240/injecting-jquery-into-a-page-fails-when-using-google-ajax-libraries-api window.onload = function() { var script = document.createElement("script"); script.src = "https://code.jquery.com/jquery-2.1.4.min.js"; script.onload = script.onreadystatechange = function() { $(document).ready(function() { var scr_1 = document.createElement('script'); scr_1.src = 'https://www.alvire.com/player/js/alvirelib/libalvire.js'; scr_1.type = 'text/javascript'; document.getElementsByTagName('head')[0].appendChild(scr_1); var scr_2 = document.createElement('script'); scr_2.src = 'https://www.alvire.com/player/js/alvirelib/alvireproplay.src.min.js'; scr_2.type = 'text/javascript'; document.getElementsByTagName('head')[0].appendChild(scr_2); var scr_3 = document.createElement('script'); scr_3.src = 'https://www.alvire.com/player/js/bootstrap.min.js'; scr_3.type = 'text/javascript'; document.getElementsByTagName('head')[0].appendChild(scr_3); var bootstrapcss = document.createElement("link"); bootstrapcss.setAttribute("rel", "stylesheet"); bootstrapcss.setAttribute("type", "text/css"); bootstrapcss.setAttribute("href", "https://www.alvire.com/player/css/bootstrap.min.css"); document.getElementsByTagName('head')[0].appendChild(bootstrapcss); var fontawesomecss = document.createElement("link"); fontawesomecss.setAttribute("rel", "stylesheet"); fontawesomecss.setAttribute("type", "text/css"); fontawesomecss.setAttribute("href", "https://www.alvire.com/player/css/font-awesome.min.css"); document.getElementsByTagName('head')[0].appendChild(fontawesomecss); var alvireproplaycss = document.createElement("link"); alvireproplaycss.setAttribute("rel", "stylesheet"); alvireproplaycss.setAttribute("type", "text/css"); alvireproplaycss.setAttribute("href", "https://www.alvire.com/player/js/alvirelib/alvireproplay.css"); document.getElementsByTagName('head')[0].appendChild(alvireproplaycss); //var stylecss = document.createElement("link"); //stylecss.setAttribute("rel", "stylesheet"); //stylecss.setAttribute("type", "text/css"); //stylecss.setAttribute("href", "https://www.alvire.com/player/css/style.css"); //document.getElementsByTagName('head')[0].appendChild(stylecss); start_app(); }); }; document.body.appendChild(script); }; })()