// =================================================================== /* Make jQuery not butt heads with Prototype */ jQuery.noConflict(); // =================================================================== /* Quick IE sniff */ var isMSIE = /*@cc_on!@*/false; // =================================================================== /* Random logo */ function randomLogo(n) { new_logo = Math.floor(Math.random() * (n + 1)); return new_logo; } var logoimage = new Array(); logoimage[0] = 'http://alt.coxnewsweb.com/activedayton/images/logo-light_blue.png'; logoimage[1] = 'http://alt.coxnewsweb.com/activedayton/images/logo-light_yellow.png'; logoimage[1] = 'http://alt.coxnewsweb.com/activedayton/images/logo-light_pink.png'; logoimage[2] = 'http://alt.coxnewsweb.com/activedayton/images/logo-light_red.png'; logoimage[3] = 'http://alt.coxnewsweb.com/activedayton/images/logo-light_orange.png'; logoimage[4] = 'http://alt.coxnewsweb.com/activedayton/images/logo-light_green.png'; if (isMSIE) { document.write('#ad_logo h1 a {background:none !important;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='+logoimage[randomLogo(logoimage.length - 1)]+', sizingMethod=\'image\');<'+'\/style'+'>'); } else { document.write('#ad_logo h1 a {background:url('+logoimage[randomLogo(logoimage.length - 1)]+') top left no-repeat transparent;text-indent:-9999px;<'+'\/style'+'>'); } // =================================================================== /* Nav dropdown menus */ jQuery(document).ready(function(){ jQuery("#ad_nav li").hover( function(){ jQuery("ul", this).show(); }, function() { jQuery("ul", this).hide(); } ); if (document.all) { jQuery("#ad_nav li").hoverClass("sfHover"); } }); jQuery.fn.hoverClass = function(c) { return this.each(function(){ jQuery(this).hover( function() { jQuery(this).addClass(c); }, function() { jQuery(this).removeClass(c); } ); }); }; // =================================================================== /* Tabs */ jQuery(document).ready(function(){ jQuery(".ad_tabs").each(function(){ var w = 0; var p = 0; jQuery(this).find(".ad_tab .ad_tab_label").each(function(){ // Set position based on width after browser rendering p = p + w; jQuery(this).css("display","block"); jQuery(this).css("left",p); w = jQuery(this).width() + Number(jQuery(this).css("padding-left").replace(/px/,'')) + Number(jQuery(this).css("padding-right").replace(/px/,'')) + Number(jQuery(this).css("padding-left").replace(/px/,'')); // Set onclick behavior to toggle tabs if(!jQuery(this).hasClass("follow")) { jQuery(this).click( function() { jQuery(this).parents(".ad_tabs").children(".ad_tab").each(function(){ jQuery(this).removeClass("default"); }); jQuery(this).parents(".ad_tab").addClass("default"); return false; } ); } }); }); }); // =================================================================== /* Default text in forms: - put default text in the title attribute (e.g. tag with the class "text" *and* "default" (i.e. tags with class of "mediaplayer" * (2) Change all "viewMovie" links to "viewShowTimes" for usability. * We consolidate these so we don't have to iterate thru links more than once. */ function attachMP_and_checkForViewMovieLink(){ for(i=0;i 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 { // couldn't find date on the page return false; } 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: "/dayton/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: "/dayton/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 = '