jQuery.noConflict(); // =================================================================== /* The Greene CDL showtimes: * This loads Digital and Directors Hall showtimes for the Greene via AJAX. * Formerly, those were only available on separate pages because of how * The Greene submits its showtimes to the Tribune Feed. We use AJAX to * append them to our main page for this movie theater to improve usability. * If the AJAX requests fails, we include a link to the dedicated pages * for Digital and Directors Hall shows. */ function testForMovieFixConditions(path) { if(!window.jQuery || !document.getElementById('ohlegal')) { setTimeout("theGreene('"+path+"')", 500); return false; } else { return true; } } function theGreene(path) { if(!testForMovieFixConditions(path)) return; if(!jQuery("#mvCurrentShowtimes")) { // couldn't find mvContent div return false; } var mvDateIndex = path.indexOf('date='); if(mvDateIndex > 0) { var mvDate = path.substring((mvDateIndex+5),(mvDateIndex+15)); } else if(jQuery('#date option:first-child').val()) { var mvDate = jQuery('#date option:first-child').val(); } else { var now = new Date(); var tmnth = (((now.getMonth() + 1).toString().length < 2) ? '0' : '') + (now.getMonth() + 1); var tdate = ((now.getDate().toString().length < 2) ? '0' : '') + now.getDate(); var tyear = now.getFullYear(); var mvDate = tmnth+'/'+tdate+'/'+tyear; } jQuery("#mvCurrentShowtimes").append("

Digital Shows<\/h3>

Loading showtimes for digital features...<\/p><\/div>"); jQuery("#mvCurrentShowtimes").append("

Directors Halls<\/h3>

Loading showtimes for Directors Halls...<\/p><\/div>"); jQuery("#mvCurrentShowtimes").append("

<\/div>"); var digitalURL = "theaterId=76461&date="+mvDate; var directorsURL = "theaterId=76462&date="+mvDate; jQuery.ajax({ type: "GET", url: "/e/movies/etc/viewShowTimes.jspd?no_owrap=true", data: digitalURL, dataType: "html", timeout: 25000, success: function(html, textStatus){ jQuery("#mvTempLoader").html(html); jQuery("#mvTempLoader #mvCurrentShowtimes").clone().appendTo("#mvDigitalShows"); jQuery("#mvDigitalShows p:first-child").remove(); jQuery("#mvDigitalShows h2:first-child").remove(); jQuery("#mvTempLoader").empty(); }, error: function(XMLHttpRequest, textStatus, errorThrown){ jQuery("#mvDigitalShows").html("

Digital Projection showtimes at The Greene for "+mvDate+"<\/a><\/p>"); } }); jQuery.ajax({ type: "GET", url: "/e/movies/etc/viewShowTimes.jspd?no_owrap=true", data: directorsURL, dataType: "html", timeout: 25000, success: function(html, textStatus){ jQuery("#mvTempLoader").html(html); jQuery("#mvTempLoader #mvCurrentShowtimes").clone().appendTo("#mvDirectorsHalls"); jQuery("#mvDirectorsHalls p:first-child").remove(); jQuery("#mvDirectorsHalls h2:first-child").remove(); jQuery("#mvTempLoader").empty(); }, error: function(XMLHttpRequest, textStatus, errorThrown){ jQuery("#mvDirectorsHalls").html("

Directors Halls showtimes at The Greene for "+mvDate+"<\/a><\/p>"); } }); } if(location.href.match('theater(Id|ID)=239(&|$)')) { jQuery(document).ready(function(){ theGreene(unescape(location.href)); }); } // =================================================================== /* This adds a link to the main Greene page on the Digital & Directors pages */ if(location.href.match('theater(ID|Id)=(76461|76462)(&|$)')) { jQuery(document).ready(function(){ jQuery("#mvContent").append("

View all showtimes at Cinema de Lux 14: The Greene<\/a><\/p>"); }); } // =================================================================== /* Should someone stumble upon one of the "viewMovie" pages, this redirects */ function moviePageRedirectToShowtimes() { location.href = location.href.replace(/viewMovie/, "viewShowTimes"); } if(location.href.match('viewMovie')) { moviePageRedirectToShowtimes(); } // =================================================================== /* This hides a couple of things on the viewShowTimes pages */ function adjustViewShowtimesLayout() { // Hide text about buying tickets jQuery("#mvHeader p:first").hide(); // Hide Search Results header jQuery("#mvResultsMovie h2:first").hide(); } /* This adds a dropdown to change the date on our viewShowTimes pages */ function addMovieDatesDropdownToViewShowtimes(){ if(jQuery("#date").length < 1) return; if(jQuery("#mvShowTimeResults p:first").length < 1) return; if(!location.href.match("movieId")) return; jQuery("#mvShowTimeResults p:first strong").remove(); var activeDate = jQuery.trim(jQuery("#mvShowTimeResults p:first").text()); var pageURL = unescape(location.href); var dateDropdown = ''; dateDropdown += jQuery("#date").html(); dateDropdown += '<\/select>'; jQuery("#mvCurrentShowtimes h2:first").prepend('