$("#wrapper #holderbg_h #bigshowimage #nownext .showroll").mouseover(function() {
	$("#wrapper #holderbg_h #bigshowimage #nownext .showroll").removeClass("over");
	$(this).addClass("over");
	$("#wrapper #holderbg_h #bigshowimage #nownext #nnimage img").attr("alt", $("img.showimg", this).attr("alt"));
	$("#wrapper #holderbg_h #bigshowimage #nownext #nnimage img").attr("src", $("img.showimg", this).attr("src"));
});
$("#wrapper #holderbg_h #bigshowimage #nownext .showroll").click(function() {
	window.location = $("a.details", this).attr("href");
});

(function(B){B.dimensions={version:"1.2"};B.each(["Height","Width"],function(D,C){B.fn["inner"+C]=function(){if(!this[0]){return }var F=C=="Height"?"Top":"Left",E=C=="Height"?"Bottom":"Right";return this.is(":visible")?this[0]["client"+C]:A(this,C.toLowerCase())+A(this,"padding"+F)+A(this,"padding"+E)};B.fn["outer"+C]=function(F){if(!this[0]){return }var H=C=="Height"?"Top":"Left",E=C=="Height"?"Bottom":"Right";F=B.extend({margin:false},F||{});var G=this.is(":visible")?this[0]["offset"+C]:A(this,C.toLowerCase())+A(this,"border"+H+"Width")+A(this,"border"+E+"Width")+A(this,"padding"+H)+A(this,"padding"+E);return G+(F.margin?(A(this,"margin"+H)+A(this,"margin"+E)):0)}});B.each(["Left","Top"],function(D,C){B.fn["scroll"+C]=function(E){if(!this[0]){return }return E!=undefined?this.each(function(){this==window||this==document?window.scrollTo(C=="Left"?E:B(window)["scrollLeft"](),C=="Top"?E:B(window)["scrollTop"]()):this["scroll"+C]=E}):this[0]==window||this[0]==document?self[(C=="Left"?"pageXOffset":"pageYOffset")]||B.boxModel&&document.documentElement["scroll"+C]||document.body["scroll"+C]:this[0]["scroll"+C]}});B.fn.extend({position:function(){var H=0,G=0,F=this[0],I,C,E,D;if(F){E=this.offsetParent();I=this.offset();C=E.offset();I.top-=A(F,"marginTop");I.left-=A(F,"marginLeft");C.top+=A(E,"borderTopWidth");C.left+=A(E,"borderLeftWidth");D={top:I.top-C.top,left:I.left-C.left}}return D},offsetParent:function(){var C=this[0].offsetParent;while(C&&(!/^body|html$/i.test(C.tagName)&&B.css(C,"position")=="static")){C=C.offsetParent}return B(C)}});function A(C,D){return parseInt(B.curCSS(C.jquery?C[0]:C,D,true))||0}})(jQuery);(function(A){A.fn.equalizeCols=function(){var B=0;return this.css("height","auto").each(function(){B=Math.max(B,A(this).outerHeight())}).css("height",B)}})(jQuery);(function(A){jQuery.fn.toggleVal=function(B,C){this.each(function(){this.defaultValue=C;A(this).val(this.defaultValue);A(this).focus(function(){if(A(this).val()==this.defaultValue){A(this).val("")}if(B){A(this).addClass(B)}}).blur(function(){if(A(this).val()==""){A(this).val(this.defaultValue)}if(B){A(this).removeClass(B)}})})}})(jQuery);(function(A){A.fn.superfish=function(F){var C=this,E={hoverClass:"sfHover",pathClass:"overideThisToUse",delay:800,animation:{opacity:"show"},speed:"normal",onshow:function(){}},D=function(){clearTimeout(this.sfTimer);A(this).showSuperfishUl(F).siblings().hideSuperfishUl(F)},B=function(){var G=A(this);if(!G.is("."+F.bcClass)){this.sfTimer=setTimeout(function(){G.hideSuperfishUl(F);var H=G.parents("ul.superfish:first")[0];if(!A("."+F.hoverClass,H).length){D.call(H.o.$currents.hideSuperfishUl(F))}},F.delay)}};A.fn.extend({hideSuperfishUl:function(G){return this.removeClass(G.hoverClass).find(">ul").hide().css("visibility","hidden").end()},showSuperfishUl:function(G){return this.addClass(G.hoverClass).find(">ul:hidden").css("visibility","visible").animate(G.animation,G.speed,function(){G.onshow.call(this)}).end()},applySuperfishHovers:function(){return this[(A.fn.hoverIntent)?"hoverIntent":"hover"](D,B)}});return this.addClass("superfish").each(function(){F=A.extend({bcClass:"sfbreadcrumb"},E,F||{});F=A.extend(F,{$currents:A("li."+F.pathClass,this)});this.o=F;if(F.$currents.length){F.$currents.each(function(){A(this).removeClass(F.pathClass).addClass(F.hoverClass+" "+F.bcClass)})}var G=A("li:has(ul)",this).applySuperfishHovers(D,B).not("."+F.bcClass).hideSuperfishUl(F).end();A("a",this).each(function(){var H=A(this),I=H.parents("li");H.focus(function(){D.call(I);return false}).blur(function(){I.removeClass(F.hoverClass)})})})};A(window).unload(function(){A("ul.superfish").each(function(){A("li:has(ul)",this).unbind("mouseover").unbind("mouseout");this.o=this.o.$currents=null})})})(jQuery);(function(A){A.fn.newsTicker=A.fn.newsticker=function(B){B=B||4000;initTicker=function(C){stopTicker(C);C.items=A("li",C);C.items.not(":eq(0)").hide().end();C.currentitem=0;startTicker(C)};startTicker=function(C){C.tickfn=setInterval(function(){doTick(C)},B)};stopTicker=function(C){clearInterval(C.tickfn)};pauseTicker=function(C){C.pause=true};resumeTicker=function(C){C.pause=false};doTick=function(C){if(C.pause){return }C.pause=true;A(C.items[C.currentitem]).fadeOut("slow",function(){A(this).hide();C.currentitem=++C.currentitem%(C.items.size());A(C.items[C.currentitem]).fadeIn("slow",function(){C.pause=false})})};this.each(function(){if(this.nodeName.toLowerCase()!="ul"){return }initTicker(this)}).addClass("newsticker").hover(function(){pauseTicker(this)},function(){resumeTicker(this)});return this}})(jQuery);$("#news ul").newsticker();$("#events ul").newsticker();if(jQuery.fn.flash){jQuery("#homepage .flash").flash({src:"/swf/homepage/test3.8.swf",width:525,height:324,wmode:"transparent",flashvars:{pathxml:"/swf/homepage/data.xml"}},{version:"7",expressInstall:true,expressInstallPath:"/sfUFOPlugin/swf/expressinstall.swf"});jQuery(".mp3").flash({src:"/swf/mp3player/mp3player.swf",height:20,width:"100%",wmode:"transparent"},{version:7},function(A){$this=$(this);A.flashvars.file=$this.attr("href");A.flashvars.name="Hello";$this.replaceWith($.fn.flash.transform(A))});jQuery(".videoBox").flash(null,{version:8},function(B){var C=jQuery(this);B.src="/swf/flvplayer/player_flv_maxi.swf";B.width=C.width();B.allowFullScreen=true;B.wMode="transparent";var A=20;if(C.hasClass("nobar")){B.flashvars.showplayer="never";A=0}if(C.hasClass("widescreen")){B.height=C.width()/1.77+A}else{if(C.hasClass("panavision")){B.height=C.width()/2.39+A}else{B.height=C.width()/1.33+A}}if(C.hasClass("embed")){B.flashvars.configxml="/video/"+this.id+"/xml/embed"}else{B.flashvars.configxml="/video/"+this.id+"/xml"}this.innerHTML='<div class="alt">'+this.innerHTML+"</div>";C.addClass("flash-replaced").prepend($.fn.flash.transform(B))})}jQuery(document).ready(function(){if(jQuery.browser.msie){if(jQuery.browser.version<7){}}jQuery("#sfWebDebugBar #sfWebDebugDetails").css("display","none");jQuery("#header_search_q").toggleVal(null,"Site Search");jQuery(".site_search_query").toggleVal(null,"Site Search");jQuery(".course_search_query").toggleVal(null,"Course Search");jQuery(".news_search_query").toggleVal(null,"News Search");jQuery(".events_search_query").toggleVal(null,"Events Search");jQuery("#image_search").toggleVal(null,"Image Search");function A(){jQuery(".epBasketAdd").bind("click",function(){jQuery.get(this.href,{"_":""},function(F,E){jQuery("#course_basket_contents").replaceWith(F);B()});return false})}function B(){jQuery(".epBasketRemove").bind("click",function(){jQuery.get(this.href,{"_":""},function(F,E){jQuery("#course_basket_contents").replaceWith(F);B()});return false})}B();A();jQuery(".closeBox").find(".toggle").css("cursor","pointer").bind("click",function(){$(this).parents(".closeBox").find(".closeBoxContent").toggle();return false});jQuery(".closeBox").children(".closeBoxContent").hide();jQuery(".nav").superfish({animation:{opacity:"show",height:"show"}});jQuery("#navigation li a[href$="+document.location.pathname.replace(/\/index.htm/,"/")+"]").parents("li").addClass("open");if(jQuery.historyInit){if(document.getElementById("course_info")){function D(E){jQuery("#course_info .coursePage").addClass("hiddenPage");jQuery("#course_tabs .active").removeClass("active");if(E){jQuery("#"+E).removeClass("hiddenPage");jQuery("#course_tabs a[href$='#"+E+"']").addClass("active")}else{jQuery(".coursePage:first").removeClass("hiddenPage");jQuery("#course_tabs a:first").addClass("active")}}jQuery("#course_tabs a").click(function(){var E=this.href;E=E.replace(/^.*#/,"");$.historyLoad(E);return false});jQuery.historyInit(D);jQuery("#course_info .coursePage h2").addClass("hiddenHeading")}if(document.getElementById("atoz")){function C(E){if(E&&E!="atoz"){jQuery(".letter_link_on").removeClass("letter_link_on");jQuery("#sidebar a[href$='#"+E+"']").addClass("letter_link_on");jQuery(".letter_list").hide();jQuery("#"+E).show()}else{jQuery(".letter_list").show();jQuery(".letter_link_on").removeClass("letter_link_on");jQuery("#sidebar a[href$='#atoz']").addClass("letter_link_on")}}jQuery("a.letter_link").click(function(){var E=this.href;E=E.replace(/^.*#/,"");$.historyLoad(E);return false});jQuery.historyInit(C)}}if(!window.ehCalendarDate){window.ehCalendarDate=new Date()}if(jQuery("#sidebar #calendar")&&($.datepicker)){$.getJSON("/events/json",function(F){var E=F;jQuery("#calendar").datepicker({onSelect:function(G){document.location="/events/"+G},beforeShowDay:function(G){for(i=0;i<E.length;i++){if(String("0"+(G.getMonth()+1)).slice(-2)==E[i].start_date.substr(5,2)&&String("0"+G.getDate()).slice(-2)==E[i].start_date.slice(-2)){return[true,"event"]}}return[true,""]},dateFormat:"yy/mm/dd",firstDay:1,changeFirstDay:false,defaultDate:ehCalendarDate})})}jQuery(".autoselect").focus(function(){jQuery(this).select();return false});if(document.getElementById("my-timeline")){loadtl()}})


// JavaScript Document
/*
 * Image preview script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
 
this.imagePreview = function(){	
	/* CONFIG */
		
		xOffset = 10;
		yOffset = 30;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	$("area.tour").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='preview'><img src='"+ this.href +"' alt='Image preview' />"+ c +"</p>");								 
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#preview").remove();
    });
	$("area.tour").click( function() {
			if ($(this).hasClass("vfoyer")) {
				window.location = "/tour/lower-foyer";
				return false;
			} else if ($(this).hasClass("vtheatre")) {
				window.location = "/tour/main-theatre";
				return false;
			} else if ($(this).hasClass("vstudio")) {
				window.location = "/tour/studio-theatre";
				return false;
			} else if ($(this).hasClass("vbar")) {
				window.location = "/tour/upper-foyer";
				return false;
			} else if ($(this).hasClass("vinteract")) {
				window.location = "/tour/tour-interact";
				return false;
			} else {
				return false;
			}
	});
	$("area.tour").mousemove(function(e){
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


// starting the script on page load
$(document).ready(function(){
	imagePreview();
});