What Is Kundalini Yoga? History and Practice Guide


15 && !qualified_view) { qualified_view = true; //console.log(“dataLayer: qualified view…”); dataLayer.push({ ‘event’: ‘customEvent’, ‘eventCategory’: ‘video playback’, ‘eventAction’: ‘watched’, ‘eventLabel’: ‘qualified view’ }); } // Track the completion of the current video if (Math.ceil(myPlayer.currentTime()) >= Math.floor(duration) && complete === false && duration !== 0) { // Player has reached end of video playback complete = true; dataLayer.push({ ‘event’: ‘customEvent’, ‘eventCategory’: ‘video playback’, ‘eventAction’: ‘watched’, ‘eventLabel’: ‘complete’ }); } }); myPlayer.on(‘loadstart’, function () { // set duration/length of vid //console.log(‘mediainfo’, myPlayer.mediainfo.duration); duration = myPlayer.mediainfo.duration; }); }); }); ]]>

MORNING PRACTICE FOR A BETTER DAY

‘); } } } // Article Icon if (data.type === “article”) { var icon_html = ”; if (data.path) { icon_html = ‘‘; } icon_html += ‘]]>‘; if (data.path) { icon_html += ”; } $target.find(‘.main-box’).append(icon_html); } // Free Banner if (!$.fn.isLoggedIn() && data.feature && data.feature.isFree === true) { $target.find(‘.main-box’).append(‘

FREE

‘); } // Buttons if (data.type === “product_video”) { if ($target.attr(‘data-type’) === ‘nid’ || $target.attr(‘data-type’) === ‘sid’) { $target.find(‘.btn-box’).append(”) } $target.find(‘.btn-box’).append(”); // Add/Remove Playlist Item if ($.fn.isLoggedIn()) { $target.find(‘.btn-box’) .append(”).end() .find(‘.playlist-btn’) .click(function () { var pnid = $(this).closest(‘.item-content’).attr(‘data-value’), ptitle = $target.find(‘.title-box .title:first-child’).text(); if ($(this).find(‘i’).hasClass(‘fa-plus’)) { // add to playlist $(this).playlistUtils(‘add’, pnid, ptitle); } else { // remove from playlist $(this).playlistUtils(‘remove’, pnid, ptitle); } }) .on(“playlist:updatePlaylist”, function (e) { var pnid = $target.attr(‘data-value’); $(this).playlistUtils(‘exists’, pnid, function (exists) { if (exists) { $target.find(‘.btn-box’) .find(‘.playlist-btn i’) .removeClass(‘fa-plus’) .addClass(‘fa-minus’) .end() .find(‘.playlist-btn’).attr(‘title’, ‘REMOVE FROM PLAYLIST’); } else { $target.find(‘.btn-box’) .find(‘.playlist-btn i’) .removeClass(‘fa-minus’) .addClass(‘fa-plus’) .end() .find(‘.playlist-btn’).attr(‘title’, ‘ADD TO PLAYLIST’); } }); }) .on(“playlist:addedItem”, function (e, nid) { //console.log(“addedItem event: closest-> “,$target.closest(‘.item-content’).attr(‘data-value’), ” nid-> “, nid); if ($target.closest(‘.item-content’).attr(‘data-value’) === nid) { var msg = “Item has been added to your playlist.”; $target.find(‘.alert-info’).text(msg).fadeIn(‘slow’).delay(‘2000’).fadeOut(‘slow’); } }) .on(“playlist:removedItem”, function (e, nid) { if ($target.closest(‘.item-content’).attr(‘data-value’) === nid) { var msg = “Item has been removed from your playlist.”; $target.find(‘.alert-info’).text(msg).fadeIn(‘slow’).delay(‘2000’).fadeOut(‘slow’); } }); } else { //console.log(“not logged in plist…”); } } else if (data.type === “article”) { $target.find(‘.btn-box’).append(”); } /* — Start Title Box — */ // Content Details based on media type if (data.type === “product_video”) { // Series if (data.series && data.series.path) { $target.find(‘.title-box’).append(”); } else if (data.series) { $target.find(‘.title-box’).append(‘

‘ + data.series.title + ‘

‘); } // Content Title if (data.title && data.path) { $target.find(‘.title-box’).append(‘

‘ + data.title + ‘

‘); } else if (data.title) { $target.find(‘.title-box’).append(‘

‘ + data.title + ‘

‘); } // Season # if (data.fields.season && data.fields.season[0].value) { $target.find(‘.title-box’).append(‘

S’ + data.fields.season[0].value + ‘:Ep’ + data.fields.episode[0].value + ‘

‘); } // Episode # if (!data.fields.season && data.fields.episode && data.fields.episode[0].value) { $target.find(‘.title-box’).append(‘

Episode: ‘ + data.fields.episode[0].value + ‘

‘); } // Duration if (data.feature && data.feature.duration) { var seconds = data.feature.duration; var date = new Date(seconds * 1000); var hh = date.getUTCHours(); var mm = date.getUTCMinutes(); var ss = date.getSeconds(); var dur = ”; //if (hh 1) { dur += hh + ” hrs, “; } else if (hh > 0) { dur += hh + ” hr, “; } dur += mm + ” mins”; $target.find(‘.title-box’).append(‘

‘ + dur + ‘

‘); } } else if (data.type === “article”) { // Author //$html += ‘

‘ + data.article_author.name + ‘

‘; /* TODO: Look for usage case for above … */ // Publish Date (Creation Date) if (data.created) { var d = new Date(0); d.setUTCSeconds(data.created); var arr_months = [“January”, “February”, “March”, “April”, “May”, “June”, “July”, “August”, “September”, “October”, “November”, “December”]; $target.find(‘.title-box’).append(‘

‘ + arr_months[d.getMonth()] + ‘ ‘ + d.getDay() + ‘, ‘ + d.getFullYear() + ‘

‘); } // Content Title if (data.title && data.path) { $target.find(‘.title-box’).append(‘

‘ + data.title + ‘

‘); } else if (data.title) { $target.find(‘.title-box’).append(‘

‘ + data.title + ‘

‘); } // Description if (data.fields.body && data.fields.body[0].value) { var desc = data.fields.body[0].value; // ensure the shorten the text desc = $.trim(desc).substring(0, 155).split(” “).slice(0, -1).join(” “) + “…”; $target.find(‘.title-box’).append(‘

‘ + desc + ‘

‘); } } } function getAPIData(purl, callback) { //console.log(“getAPIData purl: “, purl); $.ajax({ method: “GET”, url: purl, dataType: ‘json’, success: function (data, textStatus, jqXHR) { //console.log(“multi content getAPIData: “, data); // determine the series episode id if (data) { callback(data); } else { callback(); } //console.log(“Data: “, data); //check_content_loaded(‘layer-{ { loop.index0 }}’, $(‘.layer–{ { loop.index0 }}’)); }, error: function (jqXHR, textStatus, errorThrown) { console.log(“Error: “, textStatus, ” errorThrown: “, errorThrown); // if fail, continue load process check_content_loaded(‘layer-5’, $(‘.layer–5’)); } }); } function build_UI() { // Loop and load all elements in U block $(‘.layer–5 .item-content’).each(function () { //console.log(“Element/Layer Data value: “, $(this).attr(‘data-value’)); var $target = $(this), $html = ”, player_mode = ($.fn.isLoggedIn()) ? ‘?fullplayer=feature’ : ‘?fullplayer=preview’, api_url = “https://brooklyn.gaia.com”; if ($(this).attr(‘data-value’)) { //console.log(“switch Data Type: “, $(this).attr(‘data-type’)); switch ($(this).attr(‘data-type’)) { case ‘sid’: //$target.addClass(‘.loading’); var purl = api_url + “/v2/videos/series/” + $(this).attr(‘data-value’) + “/featured”; // first we have to get the NID of target episode getAPIData(purl, function (pdata) { if (pdata) { // console.log(“Series Obj: “, pdata); // console.log(“Featured NID: “, pdata.featuredVideo.id); if (pdata.featuredVideo && pdata.featuredVideo.id) $target.attr(‘data-value’, pdata.featuredVideo.id); var nurl = api_url + “/node/” + pdata.featuredVideo.id; getAPIData(nurl, function (ndata) { if (ndata) { //console.log(“fNID Data: “, ndata); draw_media_asset(ndata, $target); } else { console.log(“WARNING: No nid data was returned. Data undefined…”); } }); } else { console.log(“WARNING: No sid data was returned. Data undefined…”); } check_content_loaded(‘layer-5’, $(‘.layer–5’)); }); break; case ‘nid’: // Node ID from Gaia Drupal CMS var purl = api_url + “/node/” + $(this).attr(‘data-value’); getAPIData(purl, function (pdata) { if (pdata) { //console.log(“Normal NID: “,pdata); draw_media_asset(pdata, $target); } else { console.log(“WARNING: No nid data was returned. Data undefined…”); } check_content_loaded(‘layer-5’, $(‘.layer–5’)); }); break; case ‘yt’: // youtube content check_content_loaded(‘layer-5’, $(‘.layer–5’)); break; case ‘bc’: // brightcove content if ($(this).attr(‘data-value’)) { var purl = api_url + “/node/” + $(this).attr(‘data-value’); getAPIData(purl, function (pdata) { if (pdata) { // console.log(“Normal NID: “,pdata); draw_media_asset(pdata, $target); } else { console.log(“WARNING: No nid data was returned. Data undefined…”); } check_content_loaded(‘layer-5’, $(‘.layer–5’)); }); } break; case ‘img’: // static images check_content_loaded(‘layer-5’, $(‘.layer–5’)); break; } } else { console.log(“WARNING: data id was not found for this content.”); check_content_loaded(‘layer-5’, $(‘.layer–5’)); } }); } build_UI(); //console.log(“Content Loaded Check arr_loop_count: “, arr_loop_count); });

Source

Leave a comment

Your email address will not be published. Required fields are marked *