if(typeof Cufon=="function"){Cufon.replace("#sub-featured-items th h3");Cufon.replace("#sub-featured-items th h4");Cufon.replace(".main h1");Cufon.replace("#main-season h2");Cufon.replace("#main-generic h2");Cufon.replace("#main-generic-wide h2");Cufon.replace("#main-dancer h2");Cufon.replace("#main-staff h2");Cufon.replace("#main-artist-list h2");Cufon.replace("#main-production .tab-content h3");};var calendars=[];var photocreditTimeout;function popColouringBook(imagePath){var width=370;var height=500;var x=Math.round((screen.availWidth-width)/2);var y=Math.round((screen.availHeight-height)/2);var myWindow;myWindow=window.open(imagePath,'colouringBook','width=370,height=500,resizable=0,toolbar=0,status=1,scrollbars=1,left='+x+',top='+y);myWindow.focus();}
function armCalendar(calID){if($(calID+' .mini-cal').length===1){$(calID+' .next').hide();$(calID+' .prev').hide();calendars[calID]["currentMonth"]=0;}else{$(calID+' .next').show();$(calID+' .prev').hide();$(calID+' .mini-cal:first ~ .mini-cal').hide();calendars[calID]["currentMonth"]=0;}
$(calID+" .next").live("click",function(){$(calID+' .prev').show();var next=calendars[calID]["currentMonth"]=calendars[calID]["currentMonth"]+1;if(next===($(calID+" .mini-cal").length-1)){$(calID+' .next').hide();}
$(calID+" .mini-cal").each(function(index){if(index!==next){$(this).hide();}else{$(this).show();}});return false;});$(calID+" .prev").live("click",function(){$(calID+' .next').show();var prev=calendars[calID]["currentMonth"]=calendars[calID]["currentMonth"]-1;if(prev===0){$(calID+' .prev').hide();}
$(calID+" .mini-cal").each(function(index){if(index!==prev){$(this).hide();}else{$(this).show();}});return false;});$(calID+" .mini-cal .show a").live("click",function(){if($(this).next().html()!==null){$(calID+' .mini-cal-date-details .show-details').html($(this).next().html());$(calID+' .mini-cal-date-details').show();return false;}else{return true;}});$(calID+" .mini-cal-date-details .mini-cal-details-close a").live("click",function(){$(calID+' .mini-cal-date-details').hide();return false;});}
$(document).ready(function(){if(window._gaq!==undefined){$("#iphone-link").click(function(){_gaq.push(['_trackEvent','Footer Links',document.location.pathname+document.location.search+document.location.hash,'Mobile: App Store']);});$("#fb-link").click(function(){_gaq.push(['_trackEvent','Footer Links',document.location.pathname+document.location.search+document.location.hash,'Social Media: Facebook']);});$("#tw-link").click(function(){_gaq.push(['_trackEvent','Footer Links',document.location.pathname+document.location.search+document.location.hash,'Social Media: Twitter']);});$("#yt-link").click(function(){_gaq.push(['_trackEvent','Footer Links',document.location.pathname+document.location.search+document.location.hash,'Social Media: YouTube']);});$("#fl-link").click(function(){_gaq.push(['_trackEvent','Footer Links',document.location.pathname+document.location.search+document.location.hash,'Social Media: Flickr']);});$('#tab-nav1 a').click(function(){_gaq.push(['_trackPageview',document.location.pathname+document.location.search+$(this).attr('href')]);});$('#featured-items .first-block a').click(function(){_gaq.push(['_trackEvent','Homepage',document.location.pathname+document.location.search+document.location.hash,'Homepage: Features: Link: '+$(this).attr('href')]);});$('#featured-items a.brightcove-launcher').click(function(){if($(this).next('object').attr('id')!=="undefined"){_gaq.push(['_trackEvent','Homepage',document.location.pathname+document.location.search+document.location.hash,'Homepage: Features: Video: '+$(this).next('.brightcove-video object,.brightcove-video video').attr('id')]);}});$('#sub-featured-items a.action-link').click(function(){_gaq.push(['_trackEvent','Homepage',document.location.pathname+document.location.search+document.location.hash,'Homepage: Sub-Features: Primary Link: '+$(this).attr('href')]);});$('#sub-featured-items a:not(.action-link)').click(function(){if($('img.hero',$(this)).length>0){_gaq.push(['_trackEvent','Homepage',document.location.pathname+document.location.search+document.location.hash,'Homepage: Sub-Features: Hero Image: '+$(this).attr('href')]);}else{_gaq.push(['_trackEvent','Homepage',document.location.pathname+document.location.search+document.location.hash,'Homepage: Sub-Features: Other Link: '+$(this).attr('href')]);}});}
$('#secondary-nav ul.sf-menu').superfish({speed:$.browser.msie?0:'fast',delay:200,disableHI:true,onHide:function(){$(this).next('.ieShadow').hide();$(this).next('.ieShadow').css({'visibility':'hidden'});},onShow:function(){$(this).next('.ieShadow').height($(this).outerHeight());$(this).next('.ieShadow').width($(this).outerWidth());$(this).next('.ieShadow').show();$(this).next('.ieShadow').css({'visibility':'visible'});$(this).next('.ieShadow').height($(this).outerHeight());}});$(".media-tab-nav a").each(function(){$(this).attr("href",$(this).attr("href")+"Container");});$('.media-list .EktronEditorsMenuMarker').remove();$('.media-list .EktronEditorsMenu').remove();var shared_gallery_config={panel_width:480,panel_height:270,frame_width:80,frame_height:70,lightbox_overlay_opacity:0.85,overlay_opacity:0.85,nav_width:50,nav_height:40,pointer_size:0,pointer_offset_left:-40,panel_scale:'nocrop',slide_method:'pointer',transition_speed:300,lightbox_margin_bottom:10,strip_size:7};if($('#main-production').length<=0){shared_gallery_config.strip_size=6;}
if($('#main-generic').length>0||$('#main-generic-wide').length>0||$('#main-virtual-museum').length>0){shared_gallery_config.strip_size=5;}
$('ul.image-list').each(function(){$(this).galleryView($.extend({display_loader:false,onGalleryBuilt:function(gallery){$('<div></div>').addClass('pointer_inner').appendTo($('.pointer',gallery));$('<div></div>').addClass('pointer_inner').appendTo($('.hover_pointer',gallery));}},shared_gallery_config));});$('ul.video-list').each(function(){$(this).galleryView($.extend({show_captions:false,fade_panels:false,lightbox_fadeout:false,display_loader:false,onGalleryBuilt:function(gallery){$('<div></div>').addClass('pointer_inner').appendTo($('.pointer',gallery));$('<div></div>').addClass('pointer_inner').appendTo($('.hover_pointer',gallery));function getHref(el){hash=$(el).find('a').attr('href');return hash?hash.substring(0,hash.length-4):false;}
$(".media-tab-nav").find('li').each(function(){if($(this).hasClass('active')){$(getHref(this)).show();$(this).next().addClass('active-sib');}else{$(getHref(this)).hide();}});}},shared_gallery_config));});$(".media-tab-nav").tabify();$(".tab-nav").tabify(true);var liWidths=0;$(".tab-nav li").each(function(index){liWidths=liWidths+$(this).outerWidth();if(liWidths>$(".tab-nav").outerWidth()){$(this).addClass('no-shadow');return false;}});$('.media-tab-nav li.active').next().addClass('active-sib');$('.tab-nav li.active').next().addClass('active-sib');$('#featured-items').codaSlider({autoHeight:false,autoSlide:true,autoSlideInterval:4000,autoSlideStopWhenClicked:true,dynamicArrows:false,dynamicTabs:false,onSlideTransition:function(slider){$('.brightcove-video').each(function(){$(this).hide();$(this).prev().show();if(window.bc_stopVideo){bc_stopVideo($(this).find('object').attr('id'));}});},slideEaseDuration:700,slideEaseFunction:"linear",slideEaseTransition:"fade"});$(".brightcove-launcher").click(function(e){$(this).next('.brightcove-video').show();$(this).hide();});$('.mini-cal-wrapper').each(function(index){calendars["#"+$(this).attr("id")]=[];armCalendar("#"+$(this).attr("id"));});$('#search input').clearField();$('#search .submit').click(function(event){event.preventDefault();window.location="/SearchResults.aspx?SearchText="+$('#search #searchText').val();return false;});$('#search #searchText').keydown(function(event){if(event.keyCode==="13"){$('#search .submit').click();}});$('.photocredit-btn').mouseover(function(e){$(this).parent().find('.photocredits').show();clearTimeout(photocreditTimeout);});$('.photocredits').mouseover(function(e){clearTimeout(photocreditTimeout);});$('.photocredit-btn').mouseout(function(e){photocreditTimeout=setTimeout("$('.photocredits').hide()",500);});$('.photocredits').mouseout(function(e){photocreditTimeout=setTimeout("$('.photocredits').hide()",500);});if($(".production-list").length){$(".production-list a:odd").addClass("odd");}
$(".production:last-child",$("#content .production-tab")).addClass("last");$(".archive-table").tablesorter({sortList:[[0,0]]});if($("#main-generic").length||$("#main-generic-wide").length){$("img",$("#main-generic #content, #main-generic-wide #content")).each(function(index){if($(this).attr("src")==="/WorkArea/images/English/btn_logout.gif"){$(this).parent().prepend('Logout');$(this).parent().addClass('action-btn');$(this).remove();}
if($(this).attr("src")==="/WorkArea/images/English/btn_login.gif"||$(this).attr("src")==="/WorkArea/images/application/btn_login.gif"){$(this).parent().prepend('Login');$(this).parent().addClass('action-btn');$(this).remove();}});}
if($('.searchResults').length){$('a',$('.searchResults')).each(function(index){if($(this).attr("href")==="#"){$(this).remove();}});}});
