try{document.execCommand("BackgroundImageCache",false,true);}catch(err){}var foregroundImages=new Array();var backgroundImages=new Array();var hideinstructions=false;var imageLoadNum=10;var imageLoadingCounter=0;var numImagesLoaded=0;function cancelImageDrag(){return false;}function generatepopup(_1,_2,_3,_4,_5,_6,_7){$("div#timeline-popup-content").css("border-color",_1);$("div#timeline-popup-content h1").text(_4);$("div#timeline-popup-content h4").text(_3);$("div#timeline-popup-content h3").text(_2);$("div#timeline-popup-content h3").css("color",_1);$("div#timeline-popup-content p").text(_5);$("div#timeline-popup-content img").attr("src",_7);$("div#timeline-popup-content a.more").attr("href",_6);$("div#timeline-popup-content a.more").text("Find out more");$("div#timeline-popup-content a.close").text("Close");$("div#timeline-popup-background").height($("div#timeline-holder").height());$("div#timeline-popup-background").width($("div#timeline-holder").width());$("div#timeline-popup-background").css("left","0");$("div#timeline-popup-background").css("top","0");$("div#timeline-popup-background").css("display","block");$("div#timeline-popup").height($("div#timeline-holder").height());$("div#timeline-popup").width($("div#timeline-holder").width());$("div#timeline-popup").css("left","0");$("div#timeline-popup").css("top","0");$("div#timeline-popup").css("display","block");}function loadArtistImagesBasic(){var _8=foregroundImages.length;for(counter=0;counter<(_8);counter++){insertHTML=foregroundImages[counter];$("div#timeline-stage").append(insertHTML);}setTimeout("checkImagesLoaded()",20);}function checkImagesLoaded(){var _9=$("div#timeline-stage img").get();var _a=_9.length;var _b=0;for(counter=0;counter<(_a);counter++){if(_9[counter].complete){_b++;}}$("div#timeline-popup-loading h4").text("Loading: "+parseInt(_b/_a*100)+"%");if(_b>=_a){$("div#timeline-stage img").each(function(){var _c=$(this).get()[0].id;$(this).mouseover(function(){$("div#timeline-stage a.artist-popup").remove();insertHTML="<a href=\"javascript: void(0)\" class=\"artist-popup\">";insertHTML+="<h2>"+$(this).attr("longdesc").split("#")[5]+"</h2>";insertHTML+="<span class=\"relatedimageid\" title=\""+"img#foreground"+_c.slice(10)+"\"></span>";insertHTML+="</a>";$("div#timeline-stage").append(insertHTML);$("div#timeline-stage a.artist-popup").css("left",(parseInt($(this).css("left"))+70)+"px");$("div#timeline-stage a.artist-popup").click(function(){var _d=$($(this).find("span.relatedimageid").attr("title"));window.location=$(_d).attr("longdesc").split("#")[3];return false;generatepopup("#aaaaaa","Artist Bio",$(_d).attr("longdesc").split("#")[1],$(_d).attr("longdesc").split("#")[5],$(_d).attr("longdesc").split("#")[2],$(_d).attr("longdesc").split("#")[3],$(_d).attr("longdesc").split("#")[4]);});return false;});});$("div#full-image-holder").addClass("load-full-background");$("div#timeline-popup-background").css("left","-5000px");$("div#timeline-popup-background").css("display","none");$("div#timeline-popup-loading").css("left","-5000px");$("div#timeline-popup-loading").css("display","none");$("div#timeline-holder").append("<div id=\"timeline-instructions\"></div>");$("div#timeline-instructions").click(function(){$(this).fadeOut("slow",function(){$(this).remove();});});for(i=0;i<document.images.length;i++){document.images[i].onmousedown=cancelImageDrag;document.images[i].onmousemove=cancelImageDrag;}hideinstructions=true;return;}else{setTimeout("checkImagesLoaded()",20);}}function loadArtistImages(_e){if(_e>=foregroundImages.length){$("div#full-image-holder").addClass("load-full-background");$("div#timeline-popup-background").css("left","-5000px");$("div#timeline-popup-background").css("display","none");$("div#timeline-popup-loading").css("left","-5000px");$("div#timeline-popup-loading").css("display","none");$("div#timeline-holder").append("<div id=\"timeline-instructions\"></div>");$("div#timeline-instructions").click(function(){$(this).fadeOut("slow",function(){$(this).remove();});});for(i=0;i<document.images.length;i++){document.images[i].onmousedown=cancelImageDrag;document.images[i].onmousemove=cancelImageDrag;}hideinstructions=true;return;}$("div#timeline-popup-loading").height($("div#timeline-holder").height());$("div#timeline-popup-loading").width($("div#timeline-holder").width());$("div#timeline-popup-loading").css("left","0");$("div#timeline-popup-loading").css("top","0");$("div#timeline-popup-loading").css("display","block");percentLoaded=parseInt((_e)/(foregroundImages.length)*100);$("div#timeline-popup-loading h4").text("Loading: "+percentLoaded+"%");var _f=0;var _10="";var _11=0;for(_11=_e;_11<(_e+imageLoadNum);_11++){if(_11<foregroundImages.length){_10=foregroundImages[_11];$("div#timeline-stage").append(_10);$("div#timeline-stage img#foreground"+_11).load(function(){var _12=$(this).get()[0].id;$(this).mouseover(function(){$("div#timeline-stage a.artist-popup").remove();_10="<a href=\"javascript: void(0)\" class=\"artist-popup\">";_10+="<h2>"+$(this).attr("longdesc").split("#")[5]+"</h2>";_10+="<span class=\"relatedimageid\" title=\""+"img#foreground"+_12.slice(10)+"\"></span>";_10+="</a>";$("div#timeline-stage").append(_10);$("div#timeline-stage a.artist-popup").css("left",(parseInt($(this).css("left"))+70)+"px");$("div#timeline-stage a.artist-popup").click(function(){var _13=$($(this).find("span.relatedimageid").attr("title"));window.location=$(_13).attr("longdesc").split("#")[3];return false;generatepopup("#aaaaaa","Artist Bio",$(_13).attr("longdesc").split("#")[1],$(_13).attr("longdesc").split("#")[5],$(_13).attr("longdesc").split("#")[2],$(_13).attr("longdesc").split("#")[3],$(_13).attr("longdesc").split("#")[4]);});return false;});numImagesLoaded++;if(numImagesLoaded>=foregroundImages.length){setTimeout("loadArtistImages("+(foregroundImages.length)+")",5);return;}imageLoadingCounter++;if(imageLoadingCounter>=imageLoadNum){imageLoadingCounter=0;setTimeout("loadArtistImages("+(_e+imageLoadNum)+")",5);}});}}}function setup(){if($("div#timeline").css("position")!="relative"){$("div#timeline").css("overflow","visible");$("div#timeline").css("height","auto");return;}$("div#timeline-holder").height("320px");$("div#timeline-popup-background").height($("div#timeline-holder").height());$("div#timeline-popup-background").width($("div#timeline-holder").width());$("div#timeline-popup-background").css("left","0");$("div#timeline-popup-background").css("top","0");$("div#timeline-popup-background").css("display","block");$("div#timeline-popup-loading h4").text("Loading: 0%");$.post("includes/ajax/artistinfo.ajax",function(_14){$("div#timeline-stage").prepend(_14);$("div.timeline-artist-info").each(function(){var _15="<img longdesc=\"";_15+=$(this).find("span.timeline-artist-photographer").attr("title")+"#";_15+="#";_15+=$(this).find("p").text()+"#";_15+=$(this).find("a").attr("href")+"#";_15+=$(this).find("span.timeline-artist-thumbnail").attr("title")+"#";_15+=$(this).find("h2").text()+"\" ";_15+="src=\""+$(this).find("span.timeline-artist-image").attr("title")+"\" ";_15+="id=\"foreground"+foregroundImages.length+"\" ";_15+="style=\"left: "+$(this).find("span.timeline-artist-image-left-offset").attr("title")+"px\" />";foregroundImages[foregroundImages.length]=_15;$(this).hide();});if(window.navigator.userAgent.indexOf("Safari")!=-1){loadArtistImages(0);}else{loadArtistImagesBasic();}});}$(document).ready(function(){if($("div#timeline").css("position")!="relative"){$("div#timeline").css("overflow","visible");$("div#timeline").css("height","auto");return;}$("div#timeline-holder").height("320px");$("div#timeline-popup-background").height($("div#timeline-holder").height());$("div#timeline-popup-background").width($("div#timeline-holder").width());$("div#timeline-popup-background").css("left","0");$("div#timeline-popup-background").css("top","0");$("div#timeline-popup-background").css("display","block");$("div#timeline").each(function(){$(this).css("overflow","hidden");$(this).height("265px");});$("div#timeline-ages-holder").show();$("div#timeline-scrollbar-block").css("display","block");$("timeline-scrollbar").append("<img src=\"assets/timeline/scrollbar.button.gif\"></img>");var _16=false;var _17=285;var _18=0;var _19=1957;var _1a=2007.4;var _1b=false;var _1c=false;var _1d=false;var _1e=false;var _1f=false;var _20=document.getElementById("timeline-scrollbar");var _21=document.getElementById("timeline-scrollbar-holder");var _22=_21.offsetWidth-_20.offsetWidth;var _23=document.getElementById("timeline-stage");var _24=document.getElementById("timeline");var _25=parseInt(_23.offsetWidth)-parseInt(_24.offsetWidth);var _26="";_20.style.left=0;_23.style.left=0;var _27=218-70;function clearinstructions(){if($("div#timeline-instructions")&&hideinstructions){$("div#timeline-instructions").fadeOut("slow",function(){$("div#timeline-instructions").remove();});}}var _28=-((_23.offsetWidth-_24.offsetWidth)/_22);function checkwhere(e){if(document.layers){xCoord=e.x;}else{if(document.all){xCoord=event.clientX;}else{if(document.getElementById){xCoord=e.clientX;}}}return xCoord;}function findPos(obj){var _2b=curtop=0;if(obj.offsetParent){_2b=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){_2b+=obj.offsetLeft;curtop+=obj.offsetTop;}}return [_2b,curtop];}$("body").mouseup(function(){_1d=false;_1e=false;stageDragPosition=false;});$("body").mousemove(function(e){if(_1b){var _2d=checkwhere(e);if(!_1c){_1c=_2d;}var _2e=parseInt(_20.style.left);var _2f=_2e+(_2d-_1c);if(_2f<0){_2f=0;}if(_2f>_22){_2f=_22;}_1c=_1c+(_2f-_2e);_20.style.left=_2f+"px";_23.style.left=Math.round(_2f*_28)+"px";}if(_1d){var _30=checkwhere(e);var _31=_30-_1e+_1f;if(_31>0){_31=0;}if(_31<(-_25)){_31=-_25;}_23.style.left=_31+"px";_20.style.left=Math.round((_31)/_28)+"px";}return false;});function animatestageto(_32){_16=true;var _33=Math.round((-_32)/_28);$("div#timeline-stage").animate({left:(-_32)},2000,"",function(){_16=false;});$("div#timeline-scrollbar").animate({left:_33},2000);}$("div#timeline-scrollbar").mouseup(function(e){_1b=false;_1c=false;});$("div#timeline-scrollbar").mousedown(function(e){clearinstructions();_1b=true;});$("html").mouseup(function(e){_1b=false;_1c=false;});$("a.timeline-stage-pointer").click(function(){generatepopup($(this).find("span.timeline-pointer-headline").css("background-color"),$(this).find("span.timeline-age-wording").attr("title"),$(this).find("span.timeline-pointer-date").text(),$(this).find("span.timeline-pointer-headline").text(),$(this).find("span.timeline-pointer-intro").text(),$(this).find("span.timeline-pointer-link").attr("title"),$(this).find("span.timeline-pointer-image").attr("title"));if($(this).attr("name")!="selected"){$(this).find("span.timeline-pointer-headline").hide();$(this).find("span.timeline-pointer-block").hide();$(this).css("z-index","10");}return false;});$("a.timeline-stage-pointer span.timeline-pointer-block").hide();$("a.timeline-stage-pointer").mouseover(function(){if($("div#timeline").css("position")!="relative"){return;}if($(this).attr("name")!="selected"){$(this).find("span.timeline-pointer-block").css("visibility","hidden");$(this).find("span.timeline-pointer-headline").css("visibility","hidden");$(this).find("span.timeline-pointer-block").show();$(this).find("span.timeline-pointer-headline").show();var _37=$(this).find("span.timeline-pointer-headline").get()[0].offsetHeight;var _38=(-_37-16)+"px";$(this).find("span.timeline-pointer-block").css("top",_38);$(this).css("z-index","25");$(this).find("span.timeline-pointer-block").css("visibility","visible");$(this).find("span.timeline-pointer-headline").css("visibility","visible");}});$("a.timeline-stage-pointer").mouseout(function(){if($(this).attr("name")!="selected"){$(this).css("z-index","10");$(this).find("span.timeline-pointer-block").hide();$(this).find("span.timeline-pointer-headline").hide();}});$("div#timeline-ages-holder a").click(function(){clearinstructions();if(_26){$("div#"+_26+"-holder a.timeline-stage-pointer span.timeline-pointer-block").hide();$("div#"+_26+"-holder a.timeline-stage-pointer[@name=selected]").attr("name","").css("z-index","10");$("div.timeline-group-popup").remove();}if($(this).attr("title")=="clear-all"){$("div#timeline-ages-holder a").removeClass("select");return;}$("div#timeline-ages-holder a").removeClass("select");$(this).addClass("select");var _39=$(this).css("background-color");var _3a=$(this).attr("title");_26=_3a;$("div#"+_26+"-holder a.timeline-stage-pointer").each(function(){if($(this).attr("name")!="selected"){var _3b=$(this).parent().get()[0];if(_3b.className=="pointer-group"){var _3c="<div class='timeline-group-popup'>";var _3d=$(this).parent().find("a.timeline-stage-pointer");var _3e=_3d.length;var i=0;for(i=0;i<_3e;i++){var _40=_3d[i];_3c+="<a name='"+i+"' href='"+$(_40).find("span.timeline-pointer-link").attr("title")+"'>";_3c+=$(_40).find("span.timeline-pointer-headline").text()+"</a>";if(i<_3d.length-1){_3c+="<div></div>";}}$(this).parent().find("a.timeline-stage-pointer").attr("name","selected");$(this).parent().append(_3c);$(this).parent().find("div.timeline-group-popup").css("background-color",_39);$(this).parent().find("div.timeline-group-popup").css("z-index","20");var _41=(parseInt($(this).css("left"))+7)+"px";$(this).parent().find("div.timeline-group-popup").css("left",_41);var _42=(parseInt($(this).css("top"))-$(this).parent().find("div.timeline-group-popup").height()-15);$(this).parent().find("div.timeline-group-popup").css("top",_42);$(this).parent().find("div.timeline-group-popup").show();$(this).parent().find("a.timeline-stage-pointer span.timeline-pointer-block").css("top","-15px");$(this).parent().find("a.timeline-stage-pointer span.timeline-pointer-block").show();$(this).parent().find("div.timeline-group-popup a").click(function(){var _43=$(this).parent().parent().find("a.timeline-stage-pointer")[parseInt($(this).attr("name"))];generatepopup($(this).parent().css("background-color"),$(_43).find("span.timeline-age-wording").attr("title"),$(_43).find("span.timeline-pointer-date").text(),$(_43).find("span.timeline-pointer-headline").text(),$(_43).find("span.timeline-pointer-intro").text(),$(_43).find("span.timeline-pointer-link").attr("title"),$(_43).find("span.timeline-pointer-image").attr("title"));return false;});}else{$(this).find("span.timeline-pointer-block").show();$(this).find("span.timeline-pointer-headline").show();var _44=$(this).find("span.timeline-pointer-headline").get()[0].offsetHeight;var _45=(-_44-16)+"px";$(this).find("span.timeline-pointer-block").css("top",_45);$(this).css("z-index","20");$(this).attr("name","selected");}}});var _46="div#timeline-band-"+$(this).attr("title");animatestageto(parseInt($(_46).css("left"))-100);});$("div#timeline-popup-content a.close").click(function(){$("div#timeline-popup").css("left","-5000px");$("div#timeline-popup").css("display","none");$("div#timeline-popup-background").css("left","-5000px");$("div#timeline-popup-background").css("display","none");});$("div#timeline").mousedown(function(e){clearinstructions();_1d=true;_1e=checkwhere(e);_1f=parseInt(_23.style.left);return false;});$("div#timeline").mouseup(function(e){_1d=false;_1e=false;_1f=false;return false;});$("div#timeline-scrollbar").click(function(){return false;});$("div#timeline-scrollbar-block").click(function(e){clearinstructions();var _4a=Math.round((checkwhere(e)*_28)+390);if(_4a>0){_4a=0;}if(_4a<(-_25)){_4a=-_25;}animatestageto(-_4a);});});