Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: about2 Arguments: Description: Page type: html Render function: Module: maybeathome Page source: <!DOCTYPE html> <webl>WubCall("maybeathome.header", ["about"]);</webl> <style> body .embed-wrapper .embed-responsive .embed-responsive-item, body .embed-wrapper .embed-responsive, .embed-wrapper .embed-responsive iframe{ position: absolute; height: auto; min-height: calc(100vh - 132px); z-index: 0; top: 0; left: 0; width: 100%; } </style> <!-- Embed Wrapper Starts --> <div class="embed-wrapper"> <!-- 16:9 aspect ratio --> <div class="embed-responsive embed-responsive-16by9"> <iframe id="embed-frame" class="embed-responsive-item" src=" <webl> var mode = "user"; var sessionkey = wubinfo.cookies.sessionkey ? nil; var cc = Str_Trim(wubinfo.cookies.countryCode) ? nil; if cc != nil and Str_IndexOf("fr", cc) > 0 then cc = "fr" else cc = "us" end; if (sessionkey != nil) then var userInfo = WubCall("siteutil.getSessionInfo", ["maybeathome", sessionkey]); var arg = Str_ToLowerCase(userInfo.arg0) ? nil; if arg == "professional agent" then mode = "agent" end; end; var url; // US regular if cc == "fr" then if mode == "agent" then url = "https://www.youtube.com/embed/_7hV2yl28nE"; // French agent else url = "http://www.youtube.com/embed/pXBzhcDyIDY"; // French regular end else // us if mode == "agent" then url = "https://www.youtube.com/embed/_VV9r26t7O8"; // US agent else url = "https://www.youtube.com/embed/g4LsEZMQIn0"; // US regular end end; url; </webl>?feature=youtube_gdata&&modestbranding=0&rel=0&fs=0&&autoplay=0&loop=0&enablejsapi=1&showinfo=0&nologo=1&iv_load_policy=3" frameborder="0" allowfullscreen></iframe> </div> <div class="overlay"></div> <div class="embed-inner-wrapper"> <img class="img-responsive center-block" src="assets/images/maybeathome-logo.png" alt="maybeathome-logo"/> <h3 data-localize="buy.slogan">Your House Will Really Feel Like Home</h3> <p data-localize="buy.subslogan"> Maybe@Home lets a prospective buyer rent a house for a few days to make sure the house is right for them. </p> <a data-localize="buy.learnmore" class="learn-more" href="javascript:void(0);">Learn More</a> </div> </div> <!-- Embed Wrapper Ends --> <webl>WubCall("maybeathome.footer", ["about"]);</webl> <!-- Custom Script --> <script> var videoId = "J_WRZtaHk9Q"; //videoUrl = '<?php echo $trimmedOutput; ?>'; var videoUrl = "if (!window['YT']) {var YT = {loading: 0,loaded: 0};}if (!window['YTConfig']) {var YTConfig = {'host': 'http://www.youtube.com'};}if (!YT.loading) {YT.loading = 1;(function(){var l = [];YT.ready = function(f) {if (YT.loaded) {f();} else {l.push(f);}};window.onYTReady = function() {YT.loaded = 1;for (var i = 0; i < l.length; i++) {try {l[i]();} catch (e) {}}};YT.setConfig = function(c) {for (var k in c) {if (c.hasOwnProperty(k)) {YTConfig[k] = c[k];}}};var a = document.createElement('script');a.type = 'text/javascript';a.id = 'www-widgetapi-script';a.src = 'https://s.ytimg.com/yts/jsbin/www-widgetapi-vflvz_Mb_/www-widgetapi.js';a.async = true;var c = document.currentScript;if (c) {var n = c.nonce || c.getAttribute('nonce');if (n) {a.setAttribute('nonce', n);}}var b = document.getElementsByTagName('script')[0];b.parentNode.insertBefore(a, b);})();}"; // console.log(videoUrl); /* $.ajax({ url: "https://www.youtube.com/iframe_api", type: "GET", 'cache': false, 'dataType': "jsonp", "async": true, "crossDomain": true, "headers": { "accept": "application/json", "Access-Control-Allow-Origin":"*" }, success: function (response) { videoUrl = response; alert(videoUrl,videoUrl.status); }, error: function (xhr, status) { alert("error"); } });*/ /*-- Buy Page Video Script --*/ //$(window).load( function(){ var tag = document.createElement('script'); var tagChild = document.createTextNode(videoUrl); tag.id = 'iframe-demo'; tag.type= 'text/javascript'; tag.crossOrigin = 'anonymous'; tag.appendChild(tagChild); //tag.src = videoUrl; //tag.src = 'https://www.youtube.com/iframe_api'; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); //}); var player; function onYouTubeIframeAPIReady() { player = new YT.Player('embed-frame', { videoId: videoId, events: { 'onStateChange': onPlayerStateChange } }); } function onPlayerStateChange(event) { if (player.getPlayerState() == 2) { $(".overlay").removeClass("remove"); $(".embed-inner-wrapper").removeClass("remove"); } if (event.data === 0) { $(".overlay").removeClass("remove"); $(".embed-inner-wrapper").removeClass("remove"); } } $(document).on("click", ".learn-more", function () { player.playVideo(); //setVideoFrame(); $(".overlay").addClass("remove"); $(".embed-inner-wrapper").addClass("remove"); }); $('#embed-frame').load(function () { var iframe = $('#embed-frame').contents(); console.log(iframe); iframe.find("body").hover(function(){ alert("hi"); }); }); </script> </body> </html>