if(typeof PIECESOFUK=="undefined"){var PIECESOFUK={}}PIECESOFUK.albumMap={POY:"Pieces of You",Spirit:"Spirit",ThisWay:"This Way","0304":"0304",GBAIW:"Goodbye Alice...",PC:"Perfectly Clear",Lullaby:"Lullaby",Other:"Other",unreleased:"unreleased","not found":"not found"};PIECESOFUK.initIndex=function(){PIECESOFUK.globalInit();$("#latest").show();PIECESOFUK.latestPtr=new PIECESOFUK.latest();$("#about").show();PIECESOFUK.aboutPtr=new PIECESOFUK.about()};PIECESOFUK.menusInit=function(){$("#menu").hide();$("#homeMenu").click(function(){if($("#menu").is(":visible")){$("#menu").hide()}else{$(".aMenu").hide();$("#menu").fadeIn("fast")}});$("#showWindowsButton").click(function(){if($("#openWindows").is(":visible")){$("#openWindows").hide()}else{$(".openWindowButton").unbind("click");$("#openWindows").html("").css("left",$("#windowControl").offset().left-15+"px");$(".aDialog").each(function(){if($(this).dialog("isOpen")){var A=$("<li/>").append($(this).prev().children().eq(0).html()).data("item",$(this)).addClass("menuItem");$("#openWindows").append(A)}});$(".aMenu").hide();$("#openWindows").fadeIn("fast");$("#openWindows li").click(function(){$("#openWindows").hide();$($(this).data("item")).dialog("moveToTop")})}})};PIECESOFUK.feedsInit=function(){if(PIECESOFUK.feeds==undefined){PIECESOFUK.feeds=new Array}$("#twitterLink").click(function(){$("#menu").hide();$(".aView, .aControl").hide();$("#twitter").show();if(PIECESOFUK.feeds.twitter==undefined){PIECESOFUK.feeds.twitter=new PIECESOFUK.twitter()}PIECESOFUK.feeds.twitter.displayDialog();return false});$("#POUKBlogLink").click(function(){$("#menu").hide();$(".aView, .aControl").hide();$("#blogger").show();if(PIECESOFUK.feeds.blogger==undefined){PIECESOFUK.feeds.blogger=new PIECESOFUK.blogger()}PIECESOFUK.feeds.blogger.displayDialog();return false});$("#jewelsBlogLink").click(function(){$("#menu").hide();$(".aView, .aControl").hide();$("#jewelsBlog").show();if(PIECESOFUK.feeds.jewelsBlog==undefined){PIECESOFUK.feeds.jewelsBlog=new PIECESOFUK.jewelsBlog()}PIECESOFUK.feeds.jewelsBlog.displayDialog();return false});$("#latestLink").click(function(){$("#menu").hide();if(PIECESOFUK.latestPtr==null){PIECESOFUK.latestPtr=new PIECESOFUK.latest()}else{if($("#latest").dialog("isOpen")){$("#latest").dialog("moveToTop")}else{$("#latest").dialog("open")}}return false});setTimeout(PIECESOFUK.controller,1000)};PIECESOFUK.globalInit=function(){PIECESOFUK.menusInit();PIECESOFUK.feedsInit();$(".aDialog").hide();$("#aboutLink").click(function(){$("#menu").hide();if(PIECESOFUK.aboutPtr==null){PIECESOFUK.aboutPtr=new PIECESOFUK.about()}else{if($("#about").dialog("isOpen")){$("#about").dialog("moveToTop")}else{$("#about").dialog("open");PIECESOFUK.aboutPtr.display()}}return false});$("body").show();$(".aView, .aControl").hide()};try{console.log("init console... done")}catch(e){console={log:function(){}}}googleTranslateInit=function(){};PIECESOFUK.today=PIECESOFUK.now=new Date();PIECESOFUK.todayDD=PIECESOFUK.today.getDate();PIECESOFUK.todayDDx=PIECESOFUK.todayDD<10?"0"+PIECESOFUK.todayDD:PIECESOFUK.todayDD;PIECESOFUK.todayMM=PIECESOFUK.today.getMonth()+1;PIECESOFUK.todayMMx=PIECESOFUK.todayMM<10?"0"+PIECESOFUK.todayMM:PIECESOFUK.todayMM;PIECESOFUK.todayYYYY=PIECESOFUK.today.getFullYear();PIECESOFUK.today=new Date(PIECESOFUK.todayYYYY,PIECESOFUK.todayMM-1,PIECESOFUK.todayDD);PIECESOFUK.todayVal=PIECESOFUK.today.valueOf();PIECESOFUK.nowVal=PIECESOFUK.now.valueOf();PIECESOFUK.aDay=1000*24*60*60;PIECESOFUK.aWeek=1000*24*60*60*7;PIECESOFUK.dayText=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];PIECESOFUK.oddColour="#fcfcfc";PIECESOFUK.evenColour="#fefefe";PIECESOFUK.calBgrd={calendarPromo:"#DAA520",calendarTV:"navy",calendarLive:"#B0171F",calendarNew:"green",calendarOther:"#00eeee"};PIECESOFUK.controlData=function(){};PIECESOFUK.initScreencast=function(A){PIECESOFUK.numCasts=0;PIECESOFUK.atCast=0;PIECESOFUK.pauseScreencast=false;PIECESOFUK.feeds.screencast.setStatus("initialised");$("#infoView").hover(function(){PIECESOFUK.pauseScreencast=true},function(){PIECESOFUK.pauseScreencast=false});PIECESOFUK.infoView(350,300,"Latest...")};PIECESOFUK.calendarItems=[];PIECESOFUK.calendarItemsIdx=0;PIECESOFUK.calendarItem=function(A,B,C){this.date=A;this.updDate=B;this.text=C};PIECESOFUK.initLatest=function(){PIECESOFUK.globalInit();$("#latest").show();PIECESOFUK.latestPtr=new PIECESOFUK.latest()};PIECESOFUK.latest=function(){var A=this;this.close=function(){clearTimeout(A.calendarTimer)};$("#latest").dialog({title:"Latest",width:500,height:300,close:A.close});$("#ui-dialog-title-latest").prepend('<img class="infoViewTitleImg" src="Graphics/latest.png" width="16" height="16" alt="icon">').parent().css("paddingLeft","3px");if(PIECESOFUK.feeds.calendar==undefined){PIECESOFUK.feeds.calendar=new PIECESOFUK.calendar()}if(PIECESOFUK.feeds.twitter==undefined){PIECESOFUK.feeds.twitter=new PIECESOFUK.twitter()}if(PIECESOFUK.feeds.blogger==undefined){PIECESOFUK.feeds.blogger=new PIECESOFUK.blogger()}if(PIECESOFUK.feeds.jewelsBlog==undefined){PIECESOFUK.feeds.jewelsBlog=new PIECESOFUK.jewelsBlog()}var H=null;var B=null;var F=null;var G=null;var C=$("<img>").attr("src","Graphics/twitter.gif");var E=$("<div></div>").attr("id","latestTwitter").addClass("latestItems");var D=$("<div></div>").addClass("latestItemsContainer").append(C,"Latest tweets...",E).attr("title","Click to load/reload");$("#latest").append(D);var C=$("<img>").attr("src","Graphics/blogger.gif");var E=$("<div></div>").attr("id","latestBlogger").addClass("latestItems");var D=$("<div></div>").addClass("latestItemsContainer").append(C,"Latest Pieces Of UK Blog entries...",E).attr("title","Click to load/reload");$("#latest").append(D);var C=$("<img>").attr("src","Graphics/jewelIco.gif");var E=$("<div></div>").attr("id","latestJewelsBlog").addClass("latestItems");var D=$("<div></div>").addClass("latestItemsContainer").append(C,"Latest Jewel Blog entries...",E).attr("title","Click to load/reload");$("#latest").append(D);var C=$("<img>").attr("src","Graphics/calendar.gif");var E=$("<div></div>").attr("id","latestCalendar").addClass("latestItems");var D=$("<div></div>").addClass("latestItemsContainer").append(C,"Latest calendar entries (this week & new additions) ...",E).attr("title","Click to load/reload");$("#latest").append(D);this.calendar=function(){var I=false;if(PIECESOFUK.feeds.calendar.getStatus()=="complete"){$("#latestCalendar").html("").parent().attr("title","Click to view more");$("#m"+PIECESOFUK.todayMMx+"y"+PIECESOFUK.todayYYYY).next().find(".cblEntry").each(function(){if($(this).data("latest")){I=true;$("#latestCalendar").append($(this).data("latest"))}});$("#m"+PIECESOFUK.todayMMx+"y"+PIECESOFUK.todayYYYY).nextAll(".cblMonthHead").next().find(".cblEntry").each(function(){if($(this).data("latest")){I=true;$("#latestCalendar").append($(this).data("latest"))}});$("#latestCalendar").parent().unbind("click");if(!I){$("#latestCalendar").append("no items found")}$("#latestCalendar").parent().click(function(){document.location.href="calendar.html"})}else{$("#latestCalendar").text(PIECESOFUK.feeds.calendar.getStatus());$("#latestCalendar").parent().unbind("click");$("#latestCalendar").parent().click(function(){PIECESOFUK.feeds.calendar.setStatus("initialised")});A.calendarTimer=setTimeout(A.calendar,1000)}};this.twitter=function(){if(PIECESOFUK.feeds.twitter.getStatus()=="complete"){$("#latestTwitter").html("").parent().attr("title","Click to view more");for(var J=0;J<2;J++){var I=$("<div/>").addClass("translatable").text($("#twitter div").eq(J).text());$("#latestTwitter").append(I)}$("#latestTwitter").parent().unbind("click");$("#latestTwitter").parent().click(function(){PIECESOFUK.feeds.twitter.displayDialog()})}else{$("#latestTwitter").text(PIECESOFUK.feeds.twitter.getStatus());$("#latestTwitter").parent().unbind("click");$("#latestTwitter").parent().click(function(){PIECESOFUK.feeds.twitter.setStatus("initialised")});A.twitterTimer=setTimeout(A.twitter,1000)}};this.jewelsBlog=function(){if(PIECESOFUK.feeds.jewelsBlog.getStatus()=="complete"){$("#latestJewelsBlog").html("").parent().attr("title","Click to view more");for(var J=0;J<2;J++){var I=$("<div/>").addClass("translatable").text($(".jewelsBlogTitle").eq(J).text());$("#latestJewelsBlog").append(I)}$("#latestJewelsBlog").parent().unbind("click");$("#latestJewelsBlog").parent().click(function(){PIECESOFUK.feeds.jewelsBlog.displayDialog()})}else{$("#latestJewelsBlog").text(PIECESOFUK.feeds.jewelsBlog.getStatus());$("#latestJewelsBlog").parent().unbind("click");$("#latestJewelsBlog").parent().click(function(){PIECESOFUK.feeds.jewelsBlog.setStatus("initialised")});A.jewelsBlogTimer=setTimeout(A.jewelsBlog,1000)}};this.blogger=function(){if(PIECESOFUK.feeds.blogger.getStatus()=="complete"){$("#latestBlogger").html("").parent().attr("title","Click to view more");for(var J=0;J<2;J++){var I=$("<div/>").addClass("translatable").text($(".blogTitle").eq(J).text());$("#latestBlogger").append(I)}$("#latestBlogger").parent().unbind("click");$("#latestBlogger").parent().click(function(){PIECESOFUK.feeds.blogger.displayDialog()})}else{$("#latestBlogger").text(PIECESOFUK.feeds.blogger.getStatus());$("#latestBlogger").parent().unbind("click");$("#latestBlogger").parent().click(function(){PIECESOFUK.feeds.blogger.setStatus("initialised")});A.bloggerTimer=setTimeout(A.blogger,1000)}};this.twitterTimer=setTimeout(A.twitter,1000);this.bloggerTimer=setTimeout(A.blogger,1000);this.jewelsBlogTimer=setTimeout(A.jewelsBlog,1000);this.calendarTimer=setTimeout(A.calendar,1000)};PIECESOFUK.initAbout=function(){PIECESOFUK.globalInit();$("#about").show();PIECESOFUK.aboutPtr=new PIECESOFUK.about()};PIECESOFUK.about=function(){this.num=$(".about").length;this.idx=0;var A=this;this.display=function(){$("#about").html($(".about").eq(A.idx).html());var B=parseInt($(".about").eq(A.idx).attr("class").match(/ (.*)/),10);if(++A.idx>=A.num){A.idx=0}A.timer=setTimeout(A.display,B)};this.close=function(){clearTimeout(A.timer)};$("#about").dialog({title:"About",width:350,height:200,close:A.close,position:["right","bottom"]});$("#ui-dialog-title-about").prepend('<img class="infoViewTitleImg" src="Graphics/about.png" width="16" height="16" alt="icon">').parent().css("paddingLeft","3px");this.timer=setTimeout(this.display,100)};PIECESOFUK.infoViewPtr=null;PIECESOFUK.infoView=function(){this.width=250;this.height=100;this.title="Initialising...";this.updater=null;var A=this;this.close=function(C,B){if(A.updater){A.updater.close()}};$("#infoViewContainer").dialog({width:A.width,height:A.height,title:A.title,close:A.close});this.update=function(D,C,F,E){if(!$("#infoViewContainer").dialog("isOpen")){$("#infoViewContainer").dialog("open")}$("#infoView").children().remove();if(A.updater){A.updater.close()}A.updater=E;var B=($("body").width()-D)/2;var G=($(window).height()-C)/2;if(G<0){G=0}$("#infoViewContainer").prev().find("#ui-dialog-title-infoViewContainer").text(F);$("#infoViewContainer").parent().animate({width:D,height:C,left:B,top:G});$("#infoViewContainer").css({height:C-29,width:D})}};PIECESOFUK.feed=function(){this.status="initialising";this.setStatus=function(A){$("#"+this.name+"Status").text(A);this.status=A};this.getStatus=function(){return this.status};this.suspend=function(){$("#"+this.name+"Status").text("suspended");this.setStatus("suspended")}};PIECESOFUK.initJewelsBlog=function(){PIECESOFUK.globalInit();$("#jewelsBlog").show();PIECESOFUK.feeds.jewelsBlog=new PIECESOFUK.jewelsBlog();PIECESOFUK.feeds.jewelsBlog.displayDialog()};PIECESOFUK.jewelsBlog=function(){this.items=[];this.index=-1;this.name="jewelsBlog";this.item=function(F,C,B,D,E){this.Title=F;this.Date=C;this.Url=B;this.Type=D;this.Text=E};var A=this;this.initialise=function(){A.setStatus("initialised")};this.displayDialog=function(){if($("#jewelsBlog").hasClass("ui-dialog-content")){if($("#jewelsBlog").dialog("isOpen")){$("#jewelsBlog").dialog("moveToTop")}else{$("#jewelsBlog").dialog("open")}}else{$("#jewelsBlog").dialog({title:"Jewel's Blog",width:450,height:400,close:A.close});$("#ui-dialog-title-jewelsBlog").prepend('<img class="infoViewTitleImg" src="Graphics/jewelIco.gif" width="16" height="16" alt="icon">').parent().css("paddingLeft","3px")}};this.close=function(){};this.load=function(){A.setStatus("loading");$.getJSON("http://pipes.yahoo.com/pipes/pipe.run?_id=mGIJe3c53RG_l_r16UjTQA&_render=json&_callback=?",this.read)};this.read=function(C){if(C.value==undefined){A.setStatus("failed");return }for(var B=0;B<C.value.items.length;B++){++A.index;var D=new Date(C.value.items[B].date);A.items[A.index]=new A.item(C.value.items[B].title,D,C.value.items[B].link,"Blog",C.value.items[B].content)}A.setStatus("loaded")};this.display=function(){A.items.sort(PIECESOFUK.sortDates);var D=0;$("#jewelsBlog").html("");for(var C=0;C<A.items.length;C++){var B=$("<a></a>").attr("href",A.items[C].Url).html(A.items[C].Title).addClass("jewelsBlogTitle");var F=$("<span></span>").addClass("jewelsBlogDate").text(A.items[C].Date.toString().slice(0,15));var E=$("<div></div>").addClass("jewelsBlogContent").text(A.items[C].Text.replace(/<\/?[^>]+>/gi,"").replace(/&nbsp;/gi,""));$("<div></div>").addClass("jewelsBlogEntry translatable").append(B).append(F).append(E).css("backgroundColor",(++D%2)?PIECESOFUK.oddColour:PIECESOFUK.evenColour).appendTo("#jewelsBlog")}$(".jewelsBlogEntry").hover(function(G){$(".jewelsBlogContent").hide();$(".jewelsBlogContent",this).show()},function(){});$("#jewelsBlog a").attr("target","_blank");A.setStatus("complete")}};PIECESOFUK.jewelsBlog.prototype=new PIECESOFUK.feed();PIECESOFUK.initPOUKBlog=function(){PIECESOFUK.globalInit();$("#blogger").show();PIECESOFUK.feeds.blogger=new PIECESOFUK.blogger();PIECESOFUK.feeds.blogger.displayDialog()};PIECESOFUK.blogger=function(){this.name="blogger";this.newsData=[];var A=this;this.initialise=function(){A.setStatus("initialised")};this.displayDialog=function(){if($("#blogger").hasClass("ui-dialog-content")){if($("#blogger").dialog("isOpen")){$("#blogger").dialog("moveToTop")}else{$("#blogger").dialog("open")}}else{$("#blogger").dialog({title:"Pieces Of UK blog",width:600,height:400,close:A.close});$("#ui-dialog-title-blogger").prepend('<img class="infoViewTitleImg" src="Graphics/blogger.gif" width="16" height="16" alt="icon">').parent().css("paddingLeft","3px")}};this.close=function(){};this.load=function(){A.setStatus("loading");var B="http://piecesofuk.blogspot.com/feeds/posts/default?alt=json-in-script&max-results=15&callback=?";$.getJSON(B,this.read)};this.read=function(B){if(B.feed.entry==undefined){A.setStatus("failed");return false}A.newsData=B.feed;A.setStatus("loaded");return true};this.display=function(){var D=A.newsData;var K=$("<div></div>");var G=0;for(var H=0;H<D.entry.length;H++){var J=D.entry[H];if(PIECESOFUK.checkJewel(J)){var C=$("<div></div>");var E=$("<b></b>").addClass("blogDate").text(PIECESOFUK.formatDate(J.published.$t)+" ");C.append(E).addClass("bloggerDiv translatable");var B;for(var F=0;F<J.link.length;F++){if(J.link[F].rel=="alternate"){B=J.link[F].href;break}}$("<span></span>").addClass("blogTitle").text(J.title.$t+" ").attr("title","click to view more").appendTo(C);$("<a></a>").addClass("blogLink").attr({href:B}).text("(view original)").appendTo(C);var I=$("<div></div>");I.addClass("bloggerSummary");bloggerTxt=J.content.$t;I.html(bloggerTxt+"<br clear='left'>").appendTo(C);C.css("backgroundColor",(++G%2)?PIECESOFUK.oddColour:PIECESOFUK.evenColour).appendTo(K)}}$("#news").html(K);$(".bloggerDiv").click(function(L){if($(".bloggerSummary",this).css("display")!="none"){$(".bloggerSummary",this).slideUp()}else{$(".bloggerSummary").hide();$(".bloggerSummary",this).slideDown()}});$("#news a").attr("target","_blank");A.setStatus("complete")}};PIECESOFUK.blogger.prototype=new PIECESOFUK.feed();PIECESOFUK.initTwitter=function(){PIECESOFUK.globalInit();$("#twitter").show();PIECESOFUK.feeds.twitter=new PIECESOFUK.twitter();PIECESOFUK.feeds.twitter.displayDialog()};PIECESOFUK.twitter=function(){this.items=[];this.count=0;this.index=0;this.name="twitter";var A=this;this.initialise=function(){A.setStatus("initialised")};this.displayDialog=function(){if($("#twitter").hasClass("ui-dialog-content")){if($("#twitter").dialog("isOpen")){$("#twitter").dialog("moveToTop")}else{$("#twitter").dialog("open")}}else{$("#twitter").dialog({title:"Twitter",width:600,height:400,close:A.close});$("#ui-dialog-title-twitter").prepend('<img class="infoViewTitleImg" src="Graphics/twitter.gif" width="16" height="16" alt="icon">').parent().css("paddingLeft","3px")}};this.close=function(){};this.load=function(){A.setStatus("loading");var B="http://twitter.com/statuses/user_timeline.json?callback=?&count=8&id=piecesofuk";$.getJSON(B,this.read)};this.read=function(D){if(D==undefined){A.setStatus("failed");return false}for(var C=0;C<D.length;C++){if(D[C].text.indexOf("#Jewel")!=-1||(D[C].text.indexOf("Jewel")!=-1&&D[C].text.indexOf("@")==-1)){var B=D[C].created_at;B=B.slice(0,B.indexOf(" +0000 "));text=D[C].text.replace(/(http:[^ ]*)/g,'<a href="$1">$1</a>');A.items[A.count++]='<img border="0" src="Graphics/twitter.gif" width="16" height="16" align="left">'+text+" ("+B+")"}}A.setStatus("loaded");return true};this.display=function(){$("#twitter").html("");for(var B=0;B<A.count;B++){$div=$("<div></div>");$div.append(A.items[B]+"<br />").addClass("translatable twitterEntry");$("#twitter").append($div)}$("#twitter").append("<br />View more tweets at <a href='http://twitter.com/piecesofuk'>http://twitter.com/piecesofuk</a>");$("#twitter a").attr("target","_blank");A.setStatus("complete")}};PIECESOFUK.twitter.prototype=new PIECESOFUK.feed();PIECESOFUK.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];PIECESOFUK.months=["January","February","March","April","May","June","July","August","September","October","November","December"];PIECESOFUK.$preloader=$("<img>").attr("src","Graphics/preloader002.gif").addClass("preloader");PIECESOFUK.$cblPreloader=$("<img>").attr("src","Graphics/cblPreloader001.gif").addClass("cblPreloader").attr("id","cblPreloader");PIECESOFUK.isLeapYear=function(A){if(A%400==0){return true}else{if(A%100==0){return false}else{if(A%4==0){return true}else{return false}}}};PIECESOFUK.initForum=function(A){PIECESOFUK.feeds[A].setStatus("suspended")};PIECESOFUK.loadScreencast=function(){PIECESOFUK.feeds.screencast.setStatus("loading");var A="http://spreadsheets.google.com/feeds/list/pKZa-x-ME9yHlhJMUo1SJMg/od6/public/values?alt=json-in-script&callback=PIECESOFUK.getPiecesData";PIECESOFUK.addScript(A)};PIECESOFUK.getPiecesData=function(B){if(B.feed==undefined){PIECESOFUK.feeds.screencast.setStatus("failed");return false}for(var A=0;A<B.feed.entry.length;A++){var C=B.feed.entry[A];if(C.gsx$item.$t=="PiecesOfUK"){$("#jewelCurrentText").html(C.gsx$content.$t)}if(C.gsx$item.$t=="screenCastData"){$("<div></div>").addClass("castData").html(C.gsx$content.$t).prependTo("#ScreenCastData")}}if($.browser.msie&&parseInt($.browser.version,10)<7){$("#getFireFox").removeClass("testCastData").addClass("castData")}PIECESOFUK.numCasts=$(".castData").length;PIECESOFUK.atCast=0;setTimeout(PIECESOFUK.displayScreencast,50);PIECESOFUK.feeds.screencast.setStatus("loaded");return true};PIECESOFUK.displayScreencast=function(){if(!$("#screencastBody").length){return }if(PIECESOFUK.pauseScreencast===true||$("#videoLayer").length){setTimeout(PIECESOFUK.displayScreencast,5000);return }$("#screencastBody").fadeOut("slow",function(){$("#screencastBody").html($(".castData").eq(PIECESOFUK.atCast).html()).slideDown("slow");$("#screencastBody > p").css("width",$("#screencastBody").css("width"));if(++PIECESOFUK.atCast===PIECESOFUK.numCasts){PIECESOFUK.atCast=0}});setTimeout(PIECESOFUK.displayScreencast,5000)};PIECESOFUK.formatDate=function(F){var A={"01":"January","02":"February","03":"March","04":"April","05":"May","06":"June","07":"July","08":"August","09":"September","10":"October","11":"November","12":"December"};var B={1:"st",2:"nd",3:"rd",4:"th",5:"th",6:"th",7:"th",8:"th",9:"th",10:"th",11:"th",12:"th",13:"th",14:"th",15:"th",16:"th",17:"th",18:"th",19:"th",20:"th",21:"st",22:"nd",23:"rd",24:"th",25:"th",26:"th",27:"th",28:"th",29:"th",30:"th",31:"st"};var D=F.slice(0,4);var E=F.slice(5,7);var C=parseInt(F.slice(8,10),10);if(C<10){C="0"+C}return A[E].slice(0,3)+" "+C};PIECESOFUK.checkJewel=function(A){if(A.category){for(i=0;i<A.category.length;i++){if(A.category[i].term=="Jewel"){return true}}}return false};PIECESOFUK.controller=function(){for(var A in PIECESOFUK.feeds){if(PIECESOFUK.feeds[A].getStatus()=="initialising"){PIECESOFUK.feeds[A].initialise()}else{if(PIECESOFUK.feeds[A].getStatus()=="initialised"){PIECESOFUK.feeds[A].load();break}else{if(PIECESOFUK.feeds[A].getStatus()=="loaded"){PIECESOFUK.feeds[A].display();break}}}}setTimeout(PIECESOFUK.controller,1000)};PIECESOFUK.status={calendar:"initialising",screenCast:"initialising",jewelsBlog:"initialising",news:"initialising",twitter:"initialising",forum:"xinitialising"};PIECESOFUK.attempts={calendar:0,screenCast:0,jewelsBlog:0,news:0,twitter:0,forum:0};PIECESOFUK.unableToLoadImg=new Image();PIECESOFUK.unableToLoadImg.src="Graphics/unableToLoadImg.png";google.load("language","1");google.setOnLoadCallback(googleTranslateInit);PIECESOFUK.youTubePtr=PIECESOFUK.singlesPtr=PIECESOFUK.aboutPtr=PIECESOFUK.latestPtr=null;$(document).ready(function(){return ;$("body").show();$.translate(function(){$.translate().ui("select","option").change(function(){$(".translatable").translate("english",$(this).val(),{not:".notTranslatable",fromOriginal:true})}).val("English").appendTo("#Linktranslate")});$.translate().getBranding("googleBranding","horizontal");$(".mailme").each(function(){$(this.childNodes).wrap("<a href='mailto:cmgroves@gmail.com' target='_blank'></a>")});PIECESOFUK.infoViewPtr=new PIECESOFUK.infoView();PIECESOFUK.latestPtr=new PIECESOFUK.latest();$("#main > ul").tabs().bind("tabsselect",function(A,B){if(B.index!=0){console.log($(window).height()+" "+$("#main").height()+" "+$("#calControls").css("height"));if(B.panel.id=="calendar"){$("#calView").height($(window).height()-$("#main").height()-parseInt($("#calControls").css("height"),10)-18)}if($("#infoViewContainer").dialog("isOpen")){$("#infoViewContainer").parent().css("visibility","hidden")}}else{$("#infoViewContainer").parent().css("visibility","visible")}});setTimeout(PIECESOFUK.controller,1000);$(".infoView").click(function(B){B.preventDefault();var A=$(this).attr("id").slice(4);if(A==="singles"&&!PIECESOFUK.singlesPtr){PIECESOFUK.singlesPtr=new PIECESOFUK.singles()}else{if(A==="youTube"&&!PIECESOFUK.youTubePtr){PIECESOFUK.youTubePtr=new PIECESOFUK.youTube()}else{if(A==="about"&&!PIECESOFUK.aboutPtr){PIECESOFUK.aboutPtr=new PIECESOFUK.about()}else{if(A==="latest"&&!PIECESOFUK.latestPtr){PIECESOFUK.latestPtr=new PIECESOFUK.latest()}else{if(A==="songs"){$.ajax({type:"GET",async:false,url:"Javascript/songs.js",dataType:"script",error:function(C,E,D){alert("Error: Failed to load songs data: "+E+" "+D)},success:function(C,D){}})}}}}}return false})});window.onload=function(){var C=$("#infoView").width();var A=$("#calendarDetails").width();var B=$("#jewelsBlog").width();var D=0;if($.browser.msie){D=10}$("#POUKBlogContainer").width($("body").width()-C-20-D)};PIECESOFUK.addScript=function(B){var A=document.createElement("script");A.type="text/javascript";A.src=B;document.getElementsByTagName("head")[0].appendChild(A)};PIECESOFUK.thisWeek=function(){};PIECESOFUK.sortDates=function(C,B){var A=C.Date.valueOf();var D=B.Date.valueOf();return((A<D)?1:((A>D)?-1:0))};