$(function(){breakout_of_frame();easteregg();$(".noscript1").hide();$(".noscript2").hide()});function start(){breakout_of_frame();easteregg()}function easteregg(){var today=new Date();if(today.getMonth()+1==12){if(today.getDate()==17){document.getElementById("footmiddle").innerHTML="happy b-day!"}}else{if(today.getMonth()+1==6){if(today.getDate()==27){document.getElementById("footmiddle").innerHTML="happy anniversary to me!"}}}}$(function(){$.get("pmenu.xml",function(d){var xml=d;var prevlevel=1;var html="";var x;$(xml).find("pmenuitem").each(function(){var menulevel=+$(this).attr("level");var href=$(this).find("href").text();var title=$(this).find("title").text();var text=$(this).find("text").text();for(x=prevlevel;x>menulevel;x--){html=html+"</ul></li>"}html=html+'<li><a href="'+href+'" title="'+title+'">'+text+"</a>";if(href=="#"){html=html+"<ul>"}else{html=html+"</li>"}prevlevel=menulevel});html=html+"</ul></li>";$("ul.pmenu").append($(html));pullpitMenu()});loadInitialContent()});function pullpitMenu(){$(".pmenu ul").hide();$(".pmenu li a").click(function(e){$(this).next().slideToggle("fast");var href=$(this).attr("href");if(href.slice(href.length-1)!="#"){if(href.slice(href.length-8)=="home.htm"){if($("iframe.contentframe").is(":visible")){$("iframe.contentframe").attr("src","blank.htm").fadeOut(2000)}loadInitialContent()}else{if((href.indexOf("blog.bp-n.com")!=-1)||(href.indexOf("scrapbook")!=-1)){$("div.contentframe").hide();$("iframe.contentframe").attr("src",href).fadeIn(2000)}else{if($("iframe.contentframe").is(":visible")){$("iframe.contentframe").attr("src","blank.htm").fadeOut(2000)}$("div.contentframe").load(href,function(){$(this).show()})}}}return false})}function loadInitialContent(){$("div.contentframe").load("home.htm",function(){$(this).slideDown(2000);animate()})}function animateRow1(){$("#box1b").delay(5000).show("scale",1000,function(){$("#box2i").show("drop",1000,function(){$("#box3l").show("bounce",300,function(){$("#box4l").show("clip",1000)})})})}function animateRow2(){$("#box8n").delay(6200).show("fold",2000,function(){$("#box7a").show("slide",1000,function(){$("#box6m").show("pulsate",300,function(){$("#box3l").fadeOut(2000,function(){$("#box5l").fadeIn(1000,function(){$("#box3l").addClass("box3u");$("#box3l").fadeIn(2000,function(){$("#box2i").addClass("box2p",200,function(){$(this).delay(2000).hide("fold",2000,function(){animatex()})})})})})})})})}function animatex(){$("#animationboxoverlays div").show("explode",6000,function(){$("#animationboxletters div div").each(function(){$(this).fadeOut(2000);$(this).css("display","none")});$("#box3l").removeClass("box3u");$("#box2i").removeClass("box2p")}).delay(2000).hide("blind",2000)}function animate(){animateRow1();animateRow2();setTimeout(function(){animate()},28000)}function filmography(){$("#floading").css("background","#000 url(ajax-loader-bar.gif) no-repeat center 20%").show();$.get("filmography/filmography.xml",function(d){var xml=d;var xcount=0;var html="";$(xml).find("ftitle").each(function(){var fcaption=$(this).find("fcaption").text();var images=$(this).find("images").text();xcount++;if(xcount==1){html=html+'<div class="fitems"><div>'+fcaption+"<span>"+images+"</span></div>"}else{if(xcount==10){xcount=0;html=html+"<div>"+fcaption+"<span>"+images+"</span></div></div>"}else{html=html+"<div>"+fcaption+"<span>"+images+"</span></div>"}}});if(xcount>0){html=html+"</div>"}$("#fscroll").append($(html));initScroll();$("#floading").fadeOut()})}function initScroll(){$("#fscroll").cycle({fx:"scrollHorz",prev:"#filmographybody #fprev",next:"#filmographybody #fnext",timeout:0});$("#fscroll div.fitems div").hover(function(){if($("span",this).length){$("#fimage_wrap div").replaceWith("<div>"+$("span",this).html()+"</div>");$(this).addClass("fhover")}},function(){$("#fimage_wrap div").css("visibility","hidden");$(this).removeClass("fhover")})}function logbook(){$.get("cacography/logbook/logbook.xml",function(d){var xml=d;$(xml).find("log").each(function(){var img=$(this).find("img").text();var title=$(this).find("title").text();var date=$(this).find("date").text();var theater=$(this).find("theater").text();var notes=$(this).find("notes").text();var prev=$(this).find("prev").text();var next=$(this).find("next").text();var html;img=img.replace(".","_dot_");html='<div class="logbookpage" id="'+img+'">';html=html+'<div class="logdata">';html=html+'<p class="title">'+title+'</p><p class="date">'+date+'</p><p class="theater">'+theater+"</p>";html=html+'<div class="notes">'+notes+"</div></div></div>";$("#logbookpanes").append($(html));html='<li id="'+img+'_x">'+title+"</li>";$("#logbookbody ul").append($(html))});initLogbookPage();cycleLogbook()})}function initLogbookPage(){$("#logbookbody .navrow a").hover(function(){$(this).addClass("lbhover")},function(){$(this).removeClass("lbhover")});$("#logbookpanes").find(".logbookpage").each(function(){var img=$(this).attr("id").replace("_dot_",".");var bgurl="url(cacography/logbook/"+img+")";var bgpos=" no-repeat 10px 24px";$(this).css("background",bgurl+bgpos)})}function cycleLogbook(){$("#logbookbody #logbookpanes").cycle({fx:"scrollHorz",speed:300,timeout:0,next:"#logbookbody .navrow .next",prev:"#logbookbody .navrow .prev"});$("#logbookbody .navrow a.first").click(function(){$("#logbookbody #logbookpanes").cycle(0);return false});var x=$("#logbookbody #logbookpanes .logbookpage").length-1;$("#logbookbody .navrow a.last").click(function(){$("#logbookbody #logbookpanes").cycle(x);return false})}function initLogbookPageXXX(){logPageWidth=700;$("#logbookpanes .logbookpage").css("width",logPageWidth);$("#logbookbody .navrow a").hover(function(){$(this).addClass("lbhover")},function(){$(this).removeClass("lbhover")});$("#logbookpanes").find(".logbookpage").each(function(){bgurl="url(cacography/logbook/"+$(this).attr("id")+")";bgpos=" no-repeat 5px 24px";$(this).css("background",bgurl+bgpos)});$("#logbookbody .navrow a.first").click(function(){$("#logbookpanes .logbookpage").animate({width:logPageWidth},1000)});$("#logbookbody .navrow a.last").click(function(){$("#logbookpanes .logbookpage:not(:last)").animate({width:0},1000)});$("#logbookbody .navrow a.prev").click(function(){})}function logbook2(){$.get("cacography/logbook/logbook2.xml",function(d){var xml=d;$(xml).find("log").each(function(){var title=$(this).find("title").text();var year=$(this).find("year").text();var notes=$(this).find("notes").text();var html;html='<li><p><span class="s1">'+title+'</span><span class="s2">'+year+"</span></p>";html=html+"<div>"+notes+"</div></li>";$("#tableframe ul").append($(html))});logbook2vaccordion()})}function logbook2vaccordion(){$("#logbook2body ul li").click(function(){$("#logbook2body li div").slideUp("fast");if($("div",this).is(":visible")){$("div",this).slideUp("fast")}else{$("div",this).slideDown("fast")}})}var imgarray=[];function bpinit(){$("#bpbody #bpcontent").css("height",$("#bpbody").height()-$("#bpbody #bpheader").height()-$("#bpbody #bpfooter").height());$(window).resize(function(){$("#bpbody #bpcontent").css("height",$("#bpbody").height()-$("#bpbody #bpheader").height()-$("#bpbody #bpfooter").height())});$.get("cacography/stuff/kiss/kiss.xml",function(d){var xml=d;if(typeof d=="string"){xml=new ActiveXObject("Microsoft.XMLDOM");xml.async=false;xml.loadXML(d)}$(xml).find("kiss").each(function(){imgarray.push('"cacography/stuff/kiss/'+$(this).text()+'"')});loopheader();loopfooter()});$.get("cacography/stuff/bproles.xml",function(d){var xml=d;if(typeof d=="string"){xml=new ActiveXObject("Microsoft.XMLDOM");xml.async=false;xml.loadXML(d)}$(xml).find("rec").each(function(){var role=$(this).find("role").text();var title=$(this).find("title").text();var year=$(this).find("year").text();var img=$(this).find("img").text();var html="<tr>";html=html+"<td>"+role+"<br />"+title+"<br />"+year+"<br /></td>";html=html+'<td><img src="'+img+'" alt="'+title+'" title="'+title+' width="160" height="120"></td></tr>';$("#bpbody #bpcontent1 table").append($(html))})});$.get("cacography/stuff/bplines.xml",function(d){var xml=d;if(typeof d=="string"){xml=new ActiveXObject("Microsoft.XMLDOM");xml.async=false;xml.loadXML(d)}$(xml).find("rec").each(function(){var role=$(this).find("role").text();var title=$(this).find("title").text();var year=$(this).find("year").text();var notes="<em>";$(this).find("notes1").each(function(){notes=notes+$(this).text()+"<br />"});notes=notes+"</em>";var html="<tr>";html=html+"<td>"+role+"<br />"+title+"<br />"+notes+"</td>";$("#bpbody #bpcontent2 table").append($(html))})});$.get("cacography/stuff/bpscenes.xml",function(d){var xml=d;if(typeof d=="string"){xml=new ActiveXObject("Microsoft.XMLDOM");xml.async=false;xml.loadXML(d)}$(xml).find("rec").each(function(){var role=$(this).find("role").text();var title=$(this).find("title").text();var notes=$(this).find("notes").text();var html="<tr>";html=html+"<td>"+role+"<br />"+title+"<br /><em>"+notes+"</em></td>";$("#bpbody #bpcontent3 table").append($(html))})})}function loopheader(){var headerarray=["bb.gif","bb.jpg","june27.gif"];$("#bpbody #bpheader").css("background","url(cacography/stuff/"+headerarray[0]+") no-repeat top center");var headercount=1;setInterval(function(){$("#bpbody #bpheader").css("background","url(cacography/stuff/"+headerarray[headercount]+") no-repeat top center");(headercount<headerarray.length-1)?headercount++:headercount=0},5000)}function loopfooter(){$("#bpbody #bpfooter").css("background","url("+imgarray[0]+") no-repeat bottom center");var kisscount=1;setInterval(function(){$("#bpbody #bpfooter").css("background","url("+imgarray[kisscount]+") no-repeat bottom center");(kisscount<imgarray.length-1)?kisscount++:kisscount=0},1000)}function icongallery(path,xmlfile){$.get(path+xmlfile,function(d){var xml=d;$(xml).find("rec").each(function(){var img=$(this).find("img").text();var title=$(this).find("title").text();var width=$(this).find("width").text();var height=$(this).find("height").text();var titletext=$(this).find("text").text();var mp3=$(this).find("mp3").text();var mp3id="";var html="";if(titletext!=""){titletext=": "+titletext}if(mp3!=""){mp3id=mp3.replace(".","");mp3='<p id="'+mp3id+'" title="'+path+mp3+'" />'}if(img=="break"){html='<div class="break">'+title+"</div>"}else{html='<div class="iconimage" style="background-image:url('+path+img+');">';html=html+'<img src="blank.gif" width="'+width+'" height="'+height+'" title="'+title+titletext;html=html+'" />'+mp3+"</div>"}$(".icongallery").append($(html))})})}function icongalleryWithID(path,xmlfile){$.get(path+xmlfile,function(d){var xml=d;$(xml).find("rec").each(function(){var idclass=$(this).attr("class");var img=$(this).find("img").text();var title=$(this).find("title").text();var width=$(this).find("width").text();var height=$(this).find("height").text();var titletext=$(this).find("text").text();var mp3=$(this).find("mp3").text();var mp3id="";var html="";if(titletext!=""){titletext=": "+titletext}if(mp3!=""){mp3id=mp3.replace(".","");mp3='<p id="'+mp3id+'" title="'+path+mp3+'" />'}if(img=="break"){html='<div class="break">'+title+"</div>"}else{html='<div class="iconimage" style="background-image:url('+path+img+');">';html=html+'<img src="blank.gif" width="'+width+'" height="'+height+'" title="'+title+titletext;html=html+'" />'+mp3+"</div>"}$("#"+idclass).append($(html))})})}function iconTabMenu(menuid,contentid){$(menuid+" li a").click(function(){$(menuid+" li a").removeClass("active");$(this).addClass("active");$(".icongallery").hide();var activeTabContent=$(this).attr("href");activeTabContent=activeTabContent.slice(activeTabContent.indexOf("#"));$(contentid+" "+activeTabContent).show();return false})}function mp3play(mp3id,mp3href){var so=new SWFObject("player.swf","m"+mp3id,"22","22","9");so.addParam("allowfullscreen","false");so.addParam("menu","false");so.addVariable("file",mp3href);so.addVariable("image","blank.gif");so.addVariable("controlbar","none");so.addVariable("icons","true");so.write(mp3id)}function loadentries(){$.get("iconography/entries/entries.xml",function(d){var xml=d;if(typeof d=="string"){xml=new ActiveXObject("Microsoft.XMLDOM");xml.async=false;xml.loadXML(d)}$(xml).find("entrance").each(function(){var title=$(this).find("title").text();var img=$(this).find("img").text();var handle=$(this).find("handle").text();var line1=$(this).find("line1").text();var html="";html='<div><img src="iconography/entries/'+img+'" /><div><p class="title">'+title+"</p>";html=html+'<p class="handle">'+handle+'</p><p class="line1">'+line1+"</p></div></div>";$("#topbill").append($(html))})})};
