window.log=function(){log.history=log.history||[];log.history.push(arguments);arguments.callee=arguments.callee.caller;if(this.console){console.log(Array.prototype.slice.call(arguments))}};
/*
 * jQuery UI Widget 1.8.2
 *
 * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(b){var a=b.fn.remove;b.fn.remove=function(c,d){return this.each(function(){if(!d){if(!c||b.filter(c,[this]).length){b("*",this).add(this).each(function(){b(this).triggerHandler("remove")})}}return a.call(b(this),c,d)})};b.widget=function(d,f,c){var e=d.split(".")[0],h;d=d.split(".")[1];h=e+"-"+d;if(!c){c=f;f=b.Widget}b.expr[":"][h]=function(i){return !!b.data(i,d)};b[e]=b[e]||{};b[e][d]=function(i,j){if(arguments.length){this._createWidget(i,j)}};var g=new f();g.options=b.extend({},g.options);b[e][d].prototype=b.extend(true,g,{namespace:e,widgetName:d,widgetEventPrefix:b[e][d].prototype.widgetEventPrefix||d,widgetBaseClass:h},c);b.widget.bridge(d,b[e][d])};b.widget.bridge=function(d,c){b.fn[d]=function(g){var e=typeof g==="string",f=Array.prototype.slice.call(arguments,1),h=this;g=!e&&f.length?b.extend.apply(null,[true,g].concat(f)):g;if(e&&g.substring(0,1)==="_"){return h}if(e){this.each(function(){var i=b.data(this,d),j=i&&b.isFunction(i[g])?i[g].apply(i,f):i;if(j!==i&&j!==undefined){h=j;return false}})}else{this.each(function(){var i=b.data(this,d);if(i){if(g){i.option(g)}i._init()}else{b.data(this,d,new c(g,this))}})}return h}};b.Widget=function(c,d){if(arguments.length){this._createWidget(c,d)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(d,e){this.element=b(e).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(e)[this.widgetName],d);var c=this;this.element.bind("remove."+this.widgetName,function(){c.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(e,f){var d=e,c=this;if(arguments.length===0){return b.extend({},c.options)}if(typeof e==="string"){if(f===undefined){return this.options[e]}d={};d[e]=f}b.each(d,function(g,h){c._setOption(g,h)});return c},_setOption:function(c,d){this.options[c]=d;if(c==="disabled"){this.widget()[d?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",d)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(d,e,f){var h=this.options[d];e=b.Event(e);e.type=(d===this.widgetEventPrefix?d:this.widgetEventPrefix+d).toLowerCase();f=f||{};if(e.originalEvent){for(var c=b.event.props.length,g;c;){g=b.event.props[--c];e[g]=e.originalEvent[g]}}this.element.trigger(e,f);return !(b.isFunction(h)&&h.call(this.element[0],e,f)===false||e.isDefaultPrevented())}}})(jQuery);(function(a){a.widget("thomaskahn.smoothDivScroll",{options:{scrollingHotSpotLeft:"div.scrollingHotSpotLeft",scrollingHotSpotRight:"div.scrollingHotSpotRight",scrollableArea:"div.scrollableArea",scrollWrapper:"div.scrollWrapper",hiddenOnStart:false,ajaxContentURL:"",countOnlyClass:"",scrollStep:15,scrollInterval:10,mouseDownSpeedBooster:3,autoScroll:"",autoScrollDirection:"right",autoScrollStep:5,autoScrollInterval:10,visibleHotSpots:"",hotSpotsVisibleTime:5,startAtElementId:""},_create:function(){var b=this,d=this.options,c=this.element;c.data("scrollWrapper",c.find(d.scrollWrapper));c.data("scrollingHotSpotRight",c.find(d.scrollingHotSpotRight));c.data("scrollingHotSpotLeft",c.find(d.scrollingHotSpotLeft));c.data("scrollableArea",c.find(d.scrollableArea));c.data("speedBooster",1);
c.data("motherElementOffset",c.offset().left);c.data("scrollXPos",0);c.data("hotSpotWidth",c.find(d.scrollingHotSpotLeft).width());c.data("scrollableAreaWidth",0);c.data("startingPosition",0);c.data("rightScrollInterval",null);c.data("leftScrollInterval",null);c.data("autoScrollInterval",null);c.data("hideHotSpotBackgroundsInterval",null);c.data("previousScrollLeft",0);c.data("pingPongDirection","right");c.data("getNextElementWidth",true);c.data("swapAt",null);c.data("startAtElementHasNotPassed",true);c.data("swappedElement",null);c.data("originalElements",c.data("scrollableArea").children(d.countOnlyClass));c.data("visible",true);c.data("initialAjaxContentLoaded",false);c.data("enabled",true);if(d.autoScroll!=="always"){switch(d.visibleHotSpots){case"always":b.showHotSpotBackgrounds();break;case"onstart":b.showHotSpotBackgrounds();c.data("hideHotSpotBackgroundsInterval",setTimeout(function(){b.hideHotSpotBackgrounds("slow")},(d.hotSpotsVisibleTime*1000)));break;default:break}}c.data("scrollingHotSpotRight").bind("mousemove",function(g){var f=g.pageX-(this.offsetLeft+c.data("motherElementOffset"));c.data("scrollXPos",Math.round((f/c.data("hotSpotWidth"))*d.scrollStep));if(c.data("scrollXPos")===Infinity){c.data("scrollXPos",0)}});c.data("scrollingHotSpotRight").bind("mouseover",function(){if((d.autoScroll==="onstart"&&c.data("autoScrollInterval")!==null)){clearInterval(c.data("autoScrollInterval"));c.data("autoScrollInterval",null);b._trigger("autoScrollIntervalStopped")}c.data("rightScrollInterval",setInterval(function(){if(c.data("scrollXPos")>0&&c.data("enabled")){c.data("scrollWrapper").scrollLeft(c.data("scrollWrapper").scrollLeft()+(c.data("scrollXPos")*c.data("speedBooster")));b._showHideHotSpots()}},d.scrollInterval));b._trigger("mouseOverRightHotSpot")});c.data("scrollingHotSpotRight").bind("mouseout",function(){clearInterval(c.data("rightScrollInterval"));c.data("scrollXPos",0)});c.data("scrollingHotSpotRight").bind("mousedown",function(){c.data("speedBooster",d.mouseDownSpeedBooster)});a("body").bind("mouseup",function(){c.data("speedBooster",1)});c.data("scrollingHotSpotLeft").bind("mousemove",function(g){var f=c.data("scrollingHotSpotLeft").innerWidth()-(g.pageX-c.data("motherElementOffset"));c.data("scrollXPos",Math.round((f/c.data("hotSpotWidth"))*d.scrollStep));if(c.data("scrollXPos")===Infinity){c.data("scrollXPos",0)}});c.data("scrollingHotSpotLeft").bind("mouseover",function(){if((d.autoScroll==="onstart"&&c.data("autoScrollInterval")!==null)){clearInterval(c.data("autoScrollInterval"));c.data("autoScrollInterval",null);b._trigger("autoScrollIntervalStopped")}c.data("leftScrollInterval",setInterval(function(){if(c.data("scrollXPos")>0&&c.data("enabled")){c.data("scrollWrapper").scrollLeft(c.data("scrollWrapper").scrollLeft()-(c.data("scrollXPos")*c.data("speedBooster")));b._showHideHotSpots()}},d.scrollInterval));b._trigger("mouseOverLeftHotSpot")});c.data("scrollingHotSpotLeft").bind("mouseout",function(){clearInterval(c.data("leftScrollInterval"));c.data("scrollXPos",0)});c.data("scrollingHotSpotLeft").bind("mousedown",function(){c.data("speedBooster",d.mouseDownSpeedBooster)});a(window).bind("resize",function(){if(!(d.hiddenOnStart)){b._showHideHotSpots()}b._trigger("windowResized")});if(d.ajaxContentURL.length>0){b.replaceContent(d.ajaxContentURL)}else{b.recalculateScrollableArea()}if(d.hiddenOnStart){b.hide()}if((d.autoScroll.length>0)&&!(d.hiddenOnStart)&&(d.ajaxContentURL.length<=0)){b.startAutoScroll()}},showHotSpotBackgrounds:function(c){var b=this,d=this.element;if(c!==undefined){d.data("scrollingHotSpotLeft").css("opacity","0.0");d.data("scrollingHotSpotRight").css("opacity","0.0");d.data("scrollingHotSpotLeft").addClass("scrollingHotSpotLeftVisible");d.data("scrollingHotSpotRight").addClass("scrollingHotSpotRightVisible");d.data("scrollingHotSpotLeft").fadeTo(c,0.35);d.data("scrollingHotSpotRight").fadeTo(c,0.35)}else{d.data("scrollingHotSpotLeft").addClass("scrollingHotSpotLeftVisible");d.data("scrollingHotSpotLeft").removeAttr("style");
d.data("scrollingHotSpotRight").addClass("scrollingHotSpotRightVisible");d.data("scrollingHotSpotRight").removeAttr("style")}b._showHideHotSpots()},hideHotSpotBackgrounds:function(b){var c=this.element;if(b!==undefined){c.data("scrollingHotSpotLeft").fadeTo(b,0,function(){c.data("scrollingHotSpotLeft").removeClass("scrollingHotSpotLeftVisible")});c.data("scrollingHotSpotRight").fadeTo(b,0,function(){c.data("scrollingHotSpotRight").removeClass("scrollingHotSpotRightVisible")})}else{c.data("scrollingHotSpotLeft").removeClass("scrollingHotSpotLeftVisible");c.data("scrollingHotSpotLeft").removeAttr("style");c.data("scrollingHotSpotRight").removeClass("scrollingHotSpotRightVisible");c.data("scrollingHotSpotRight").removeAttr("style")}},_showHideHotSpots:function(){var b=this,c=this.element,d=this.options;if(d.autoScroll!=="always"){if(c.data("scrollableAreaWidth")<=(c.data("scrollWrapper").innerWidth())){c.data("scrollingHotSpotLeft").hide();c.data("scrollingHotSpotRight").hide()}else{if(c.data("scrollWrapper").scrollLeft()===0){c.data("scrollingHotSpotLeft").hide();c.data("scrollingHotSpotRight").show();b._trigger("scrollLeftLimitReached");clearInterval(c.data("leftScrollInterval"));c.data("leftScrollInterval",null)}else{if(c.data("scrollableAreaWidth")<=(c.data("scrollWrapper").innerWidth()+c.data("scrollWrapper").scrollLeft())){c.data("scrollingHotSpotLeft").show();c.data("scrollingHotSpotRight").hide();b._trigger("scrollRightLimitReached");clearInterval(c.data("rightScrollInterval"));c.data("rightScrollInterval",null)}else{c.data("scrollingHotSpotLeft").show();c.data("scrollingHotSpotRight").show()}}}}else{c.data("scrollingHotSpotLeft").hide();c.data("scrollingHotSpotRight").hide()}},moveToElement:function(c,b){var e=this,f=this.element,h=this.options,d=0,g=false;switch(c){case"first":f.data("scrollXPos",0);e._trigger("movedToFirstElement");break;case"start":f.data("scrollableArea").children(h.countOnlyClass).each(function(){if((h.startAtElementId.length>0)&&((a(this).attr("id"))===h.startAtElementId)){f.data("startingPosition",d);g=true}d=d+a(this).outerWidth(true)});f.data("scrollXPos",f.data("startingPosition"));e._trigger("movedToStartElement");break;case"last":f.data("scrollXPos",f.data("scrollableAreaWidth"));e._trigger("movedToLastElement");break;case"number":if(!(isNaN(b))){f.data("scrollableArea").children(h.countOnlyClass).each(function(i){if(i===(b-1)){f.data("scrollXPos",d)}d=d+a(this).outerWidth(true)})}e._trigger("movedToElementNumber",null,{elementNumber:b});break;default:break}f.data("scrollWrapper").scrollLeft(f.data("scrollXPos"));e._showHideHotSpots()},addContent:function(e,c){var b=this,d=this.element;a.get(e,function(f){if(c==="first"){d.data("scrollableArea").children(":first").before(f)}else{d.data("scrollableArea").children(":last").after(f)}b.recalculateScrollableArea();b._showHideHotSpots()})},replaceContent:function(d){var b=this,c=this.element;c.data("scrollableArea").load(d,function(){b.recalculateScrollableArea();b.moveToElement("first");b._showHideHotSpots();c.data("startingPosition",0)})},recalculateScrollableArea:function(){var b=0,f=false,e=this.options,d=this.element,c=this;d.data("scrollableArea").children(e.countOnlyClass).each(function(){if((e.startAtElementId.length>0)&&((a(this).attr("id"))===e.startAtElementId)){d.data("startingPosition",b);f=true}b=b+a(this).outerWidth(true)});if(!(f)){d.data("startAtElementId","")}d.data("scrollableAreaWidth",b);d.data("scrollableArea").width(d.data("scrollableAreaWidth"));d.data("scrollWrapper").scrollLeft(d.data("startingPosition"));d.data("scrollXPos",d.data("startingPosition"));if(!(d.data("initialAjaxContentLoaded"))){if((e.autoScroll.length>0)&&!(e.hiddenOnStart)&&(e.ajaxContentURL.length>0)){c.startAutoScroll();d.data("initialAjaxContentLoaded",true)}}},stopAutoScroll:function(){var b=this,c=this.element;clearInterval(c.data("autoScrollInterval"));c.data("autoScrollInterval",null);b._showHideHotSpots();b._trigger("autoScrollStopped")},startAutoScroll:function(){var b=this,c=this.element,d=this.options;
b._showHideHotSpots();clearInterval(c.data("autoScrollInterval"));c.data("autoScrollInterval",null);b._trigger("autoScrollStarted");c.data("autoScrollInterval",setInterval(function(){if(!(c.data("visible"))||(c.data("scrollableAreaWidth")<=(c.data("scrollWrapper").innerWidth()))){clearInterval(c.data("autoScrollInterval"));c.data("autoScrollInterval",null)}else{c.data("previousScrollLeft",c.data("scrollWrapper").scrollLeft());switch(d.autoScrollDirection){case"right":c.data("scrollWrapper").scrollLeft(c.data("scrollWrapper").scrollLeft()+d.autoScrollStep);if(c.data("previousScrollLeft")===c.data("scrollWrapper").scrollLeft()){b._trigger("autoScrollRightLimitReached");clearInterval(c.data("autoScrollInterval"));c.data("autoScrollInterval",null);b._trigger("autoScrollIntervalStopped")}break;case"left":c.data("scrollWrapper").scrollLeft(c.data("scrollWrapper").scrollLeft()-d.autoScrollStep);if(c.data("previousScrollLeft")===c.data("scrollWrapper").scrollLeft()){b._trigger("autoScrollLeftLimitReached");clearInterval(c.data("autoScrollInterval"));c.data("autoScrollInterval",null);b._trigger("autoScrollIntervalStopped")}break;case"backandforth":if(c.data("pingPongDirection")==="right"){c.data("scrollWrapper").scrollLeft(c.data("scrollWrapper").scrollLeft()+(d.autoScrollStep))}else{c.data("scrollWrapper").scrollLeft(c.data("scrollWrapper").scrollLeft()-(d.autoScrollStep))}if(c.data("previousScrollLeft")===c.data("scrollWrapper").scrollLeft()){if(c.data("pingPongDirection")==="right"){c.data("pingPongDirection","left");b._trigger("autoScrollRightLimitReached")}else{c.data("pingPongDirection","right");b._trigger("autoScrollLeftLimitReached")}}break;case"endlessloopright":if(c.data("getNextElementWidth")){if((d.startAtElementId.length>0)&&(c.data("startAtElementHasNotPassed"))){c.data("swapAt",a("#"+d.startAtElementId).outerWidth(true));c.data("startAtElementHasNotPassed",false)}else{c.data("swapAt",c.data("scrollableArea").children(":first").outerWidth(true))}c.data("getNextElementWidth",false)}c.data("scrollWrapper").scrollLeft(c.data("scrollWrapper").scrollLeft()+d.autoScrollStep);if(c.data("swapAt")<=c.data("scrollWrapper").scrollLeft()){c.data("swappedElement",c.data("scrollableArea").children(":first").detach());c.data("scrollableArea").append(c.data("swappedElement"));c.data("scrollWrapper").scrollLeft(c.data("scrollWrapper").scrollLeft()-c.data("swappedElement").outerWidth(true));c.data("getNextElementWidth",true)}break;case"endlessloopleft":if(c.data("getNextElementWidth")){if((d.startAtElementId.length>0)&&(c.data("startAtElementHasNotPassed"))){c.data("swapAt",a("#"+d.startAtElementId).outerWidth(true));c.data("startAtElementHasNotPassed",false)}else{c.data("swapAt",c.data("scrollableArea").children(":first").outerWidth(true))}c.data("getNextElementWidth",false)}c.data("scrollWrapper").scrollLeft(c.data("scrollWrapper").scrollLeft()-d.autoScrollStep);if(c.data("scrollWrapper").scrollLeft()===0){c.data("swappedElement",c.data("scrollableArea").children(":last").detach());c.data("scrollableArea").prepend(c.data("swappedElement"));c.data("scrollWrapper").scrollLeft(c.data("scrollWrapper").scrollLeft()+c.data("swappedElement").outerWidth(true));c.data("getNextElementWidth",true)}break;default:break}}},d.autoScrollInterval))},restoreOriginalElements:function(){var b=this,c=this.element;c.data("scrollableArea").html(c.data("originalElements"));b.recalculateScrollableArea();b.moveToElement("first")},show:function(){var b=this.element;b.data("visible",true);b.show()},hide:function(){var b=this.element;b.data("visible",false);b.hide()},enable:function(){var b=this.element;b.data("enabled",true)},disable:function(){var b=this.element;clearInterval(b.data("autoScrollInterval"));clearInterval(b.data("rightScrollInterval"));clearInterval(b.data("leftScrollInterval"));clearInterval(b.data("hideHotSpotBackgroundsInterval"));b.data("enabled",false)},destroy:function(){var b=this.element;clearInterval(b.data("autoScrollInterval"));clearInterval(b.data("rightScrollInterval"));
clearInterval(b.data("leftScrollInterval"));clearInterval(b.data("hideHotSpotBackgroundsInterval"));b.data("scrollingHotSpotRight").unbind("mouseover");b.data("scrollingHotSpotRight").unbind("mouseout");b.data("scrollingHotSpotRight").unbind("mousedown");b.data("scrollingHotSpotLeft").unbind("mouseover");b.data("scrollingHotSpotLeft").unbind("mouseout");b.data("scrollingHotSpotLeft").unbind("mousedown");b.data("scrollableArea").html(b.data("originalElements"));b.data("scrollableArea").removeAttr("style");b.data("scrollingHotSpotRight").removeAttr("style");b.data("scrollingHotSpotLeft").removeAttr("style");b.data("scrollWrapper").scrollLeft(0);b.data("scrollingHotSpotLeft").removeClass("scrollingHotSpotLeftVisible");b.data("scrollingHotSpotRight").removeClass("scrollingHotSpotRightVisible");b.data("scrollingHotSpotRight").hide();b.data("scrollingHotSpotLeft").hide();a.Widget.prototype.destroy.apply(this,arguments)}})})(jQuery);(function(a){jQuery.fn.extend({simplerss:function(b){var c={url:"",blogUrl:"http://blog.adzcentral.com",html:'<article><h3><a href="{link}">{title}</a></h3><p>{text}</p></article>',dataType:"json",display:1};var b=jQuery.extend(c,b);return this.each(function(){var d=b;var e=jQuery(this);if(d.url==""){return}jQuery.getJSON('http://query.yahooapis.com/v1/public/yql?q=SELECT * FROM xml WHERE url="'+d.url+'"&format=json&callback=?',function(k){var j=d.html.replace(/{title}/,"Visit our ADZ blog");j=j.replace(/{text}/,"In our blog we explain current developments in online advertisement and technical backgrounds around Real-Time-Bidding and Audience Targeting. Also find latest disucssions about what's hot in the industry as well as all updates related to ADZ. <a href='"+d.blogUrl+"'>Continue reading →</a>");j=j.replace(/{link}/,d.blogUrl);if(k.query.results&&k.query.results.rss.channel.item){var j="";var f=jQuery.isArray(k.query.results.rss.channel.item)?k.query.results.rss.channel.item:[k.query.results.rss.channel.item];for(var h=0;h<f.length&&h<d.display;h++){var g=document.createElement("DIV");var m=g.getElementsByTagName("a");g.innerHTML=f[h].description;f[h].text=g.textContent||g.innerText;var l=d.html.replace(/{title}/,f[h].title);l=l.replace(/{text}/,f[h].text.substring(0,f[h].text.lastIndexOf("…")+2)+(m.length?m[m.length-1].outerHTML||new XMLSerializer().serializeToString(m[m.length-1]):"<a href='"+d.blogUrl+"'>Continue reading →</a>"));l=l.replace(/{link}/,f[h].link);j+=l}}jQuery(e).append(j);if(Cufon){Cufon.refresh()}jQuery(e).find("article").fadeIn()})});return this}})})(jQuery);(function(S){var B,C,O={},M={},L={"0":"0,","1":"17,","2":"34,","3":"51,","4":"68,","5":"85,","6":"102,","7":"119,","8":"136,","9":"153,",a:"170,",A:"170,",b:"187,",B:"187,",c:"204,",C:"204,",d:"221,",D:"221,",e:"238,",E:"238,",f:"255,",F:"255,"};for(B=0;B<256;++B){C=B.toString(16);if(B<16){C="0"+C}M[C]=M[C.toUpperCase()]=B.toString()+","}function J(b){var a,c,g,h,d=[],f=Math.PI*(3-Math.sqrt(5)),e=2/b;for(a=0;a<b;++a){c=a*e-1+(e/2);g=Math.sqrt(1-c*c);h=a*f;d.push([Math.cos(h)*g,c,Math.sin(h)*g])}return d}function F(c,b){var d=c,e,f,a=new Number(b).toPrecision(3)+")";if(c[0]==="#"){if(!O[c]){if(c.length===4){O[c]="rgba("+L[c[1]]+L[c[2]]+L[c[3]]}else{O[c]="rgba("+M[c.substr(1,2)]+M[c.substr(3,2)]+M[c.substr(5,2)]}}d=O[c]+a}else{if(c.substr(0,4)==="rgb("||c.substr(0,4)==="hsl("){d=(c.replace("(","a(").replace(")",","+a))}else{if(c.substr(0,5)==="rgba("||c.substr(0,5)==="hsla("){e=c.lastIndexOf(",")+1,f=c.indexOf(")");b*=parseFloat(c.substring(e,f));d=c.substr(0,e)+b.toPrecision(3)+")"}else{d=c}}}return d}function N(b,a){if(window.G_vmlCanvasManager){return null}var c=document.createElement("canvas");c.width=b;c.height=a;return c}function Q(){var a=N(3,3),b,c;if(!a){return false}b=a.getContext("2d");b.strokeStyle="#000";b.shadowColor="#fff";b.shadowBlur="3";b.globalAlpha=0;b.strokeRect(2,2,2,2);b.globalAlpha=1;c=b.getImageData(2,2,1,1);a=null;return(c.data[0]>0)}function K(e,d){var c=1024,k=e.weightGradient,a,g,b,f,h;if(e.gCanvas){g=e.gCanvas.getContext("2d")
}else{e.gCanvas=a=N(c,1);if(!a){return null}g=a.getContext("2d");f=g.createLinearGradient(0,0,c,0);for(b in k){f.addColorStop(1-b,k[b])}g.fillStyle=f;g.fillRect(0,0,c,1)}h=g.getImageData(~~((c-1)*d),0,1,1).data;return"rgba("+h[0]+","+h[1]+","+h[2]+","+(h[3]/255)+")"}function W(e,o,g){var f=parseInt(e.length*g),p=parseInt(g*2),b=N(f,p),l,d,a,m,h,k,c,n;if(!b){return null}l=b.getContext("2d");l.fillStyle="#000";l.fillRect(0,0,f,p);l.font=o;l.textHeight=g;l.textBaseline="top";l.fillStyle="#fff";l.font=g+"px "+o;l.fillText(e,0,0);d=l.getImageData(0,0,f,p);a=d.width;m=d.height;n={min:{x:a,y:m},max:{x:-1,y:-1}};for(k=0;k<m;++k){for(h=0;h<a;++h){c=(k*a+h)*4;if(d.data[c+1]>0){if(h<n.min.x){n.min.x=h}if(h>n.max.x){n.max.x=h}if(k<n.min.y){n.min.y=k}if(k>n.max.y){n.max.y=k}}}}if(a!=f){n.min.x*=(f/a);n.max.x*=(f/a)}if(m!=p){n.min.y*=(f/m);n.max.y*=(f/m)}b=null;return n}function E(a){return"'"+a.replace(/(\'|\")/g,"").replace(/\s*,\s*/g,"', '")+"'"}function G(b,c,a){if(b.complete){c.w=b.width;c.h=b.height;a.push(c)}else{jQuery(b).bind("load",function(){c.w=this.width;c.h=this.height;a.push(c)})}}function H(d,a){var b=1,c;if(d.weightFrom){b=1*(a.getAttribute(d.weightFrom)||d.textHeight)}else{if(document.defaultView&&document.defaultView.getComputedStyle){c=document.defaultView.getComputedStyle(a,null).getPropertyValue("font-size");b=c.replace("px","")*1}else{d.weight=false}}return b}function R(b){var c,d,a=document.documentElement;for(c in j.tc){d=j.tc[c];if(b.pageX){d.mx=b.pageX-d.cx;d.my=b.pageY-d.cy}else{d.mx=b.clientX+(a.scrollLeft||document.body.scrollLeft)-d.cx;d.my=b.clientY+(a.scrollTop||document.body.scrollTop)-d.cy}}}function X(c){var a=j,b=document.addEventListener?0:1,d=c.target&&c.target.id!=undefined?c.target.id:c.srcElement.parentNode.id;if(d&&c.button==b&&a.tc[d]){R(c);a.tc[d].Clicked(c)}}function I(){var b=j.tc,a;for(a in b){b[a].Draw()}}function U(b,c,a){this.x=b;this.y=c;this.z=a}function T(d,b){var a=Math.sin(b),c=Math.cos(b);return new U(d.x,(d.y*c)+(d.z*a),(d.y*-a)+(d.z*c))}function V(d,b){var a=Math.sin(b),c=Math.cos(b);return new U((d.x*c)+(d.z*-a),d.y,(d.x*a)+(d.z*c))}function D(b,f,g,k,a,d){var e,l,h,c=b.z1/(b.z1+b.z2+f.z);e=f.y*c;l=f.x*c;h=b.z2+f.z;return new U(l,e,h)}function i(a){this.tc=a;this.ts=new Date().valueOf();this.x=this.y=this.w=this.h=this.sc=1}i.prototype.Update=function(b,c,a,f,d){var e=this.tc.outlineOffset;this.x=d*(b-e);this.y=d*(c-e);this.w=d*(a+e*2);this.h=d*(f+e*2);this.sc=d};i.prototype.Draw=function(a){var b=new Date().valueOf()-this.ts;a.setTransform(1,0,0,1,0,0);a.strokeStyle=this.tc.outlineColour;a.lineWidth=this.tc.outlineThickness;a.shadowBlur=a.shadowOffsetX=a.shadowOffsetY=0;if(this.tc.pulsateTo<1){a.globalAlpha=this.tc.pulsateTo+((1-this.tc.pulsateTo)*(0.5+(Math.cos(2*Math.PI*b/(1000*this.tc.pulsateTime))/2)))}else{a.globalAlpha=1}a.strokeRect(this.x,this.y,this.w,this.h)};i.prototype.Active=function(c,b,a){return(b>=this.x&&a>=this.y&&b<=this.x+this.w&&a<=this.y+this.h)};function P(b,e,g,f,a,d){var c=b.ctxt;this.tc=b;this.image=e.src?e:null;this.name=e.src?"":e;this.a=g;this.p3d=new U;this.p3d.x=f[0]*b.radius*1.1;this.p3d.y=f[1]*b.radius*1.1;this.p3d.z=f[2]*b.radius*1.1;this.x=this.y=0;this.w=a;this.h=d;this.colour=b.textColour;this.weight=this.sc=this.alpha=1;this.weighted=!b.weight;this.outline=new i(b);if(!this.image){this.textHeight=b.textHeight;this.extents=W(this.name,this.tc.textFont,this.textHeight);this.Measure(c,b)}this.SetShadowColour=b.shadowAlpha?this.SetShadowColourAlpha:this.SetShadowColourFixed;this.Draw=this.image?this.DrawImage:this.DrawText}P.prototype.Measure=function(a,b){this.h=this.extents?this.extents.max.y+this.extents.min.y:this.textHeight;a.font=this.font=this.textHeight+"px "+b.textFont;this.w1=a.measureText(this.name).width};P.prototype.SetWeight=function(a){this.weight=a;this.Weight(this.tc.ctxt,this.tc);this.Measure(this.tc.ctxt,this.tc)};P.prototype.Weight=function(c,d){var a=this.weight,b=d.weightMode;this.weighted=true;if(b==="colour"||b==="both"){this.colour=K(d,(a-d.min_weight)/(d.max_weight-d.min_weight))
}if(b=="size"||b=="both"){this.textHeight=a*d.weightSize}this.extents=W(this.name,d.textFont,this.textHeight)};P.prototype.SetShadowColourFixed=function(c,a,b){c.shadowColor=a};P.prototype.SetShadowColourAlpha=function(c,a,b){c.shadowColor=F(a,b)};P.prototype.DrawText=function(b,h,c){var g=this.tc,l=this.x,a=this.y,k,d,f=this.sc,e=this.outline;b.globalAlpha=this.alpha;b.setTransform(f,0,0,f,0,0);b.fillStyle=this.colour;this.SetShadowColour(b,g.shadow,this.alpha);b.font=this.font;k=this.w1*f;d=this.h*f;l+=1+(h/f)-(k/2);a+=1+(c/f)-(d/2);b.fillText(this.name,l,a);e.Update(l,a,this.w1,this.h,f);return e.Active(b,g.mx,g.my)?e:null};P.prototype.DrawImage=function(b,h,c){var g=this.tc,l=this.x,a=this.y,k,d,f=this.sc,e=this.outline;b.globalAlpha=this.alpha;b.setTransform(f,0,0,f,0,0);b.fillStyle=this.colour;this.SetShadowColour(b,g.shadow,this.alpha);k=this.w*f;d=this.h*f;l+=(h/f)-(k/2);a+=(c/f)-(d/2);b.drawImage(this.image,l,a,k,d);e.Update(l,a,k,d,f);return e.Active(b,g.mx,g.my)?e:null};P.prototype.Calc=function(d,e){var b=V(this.p3d,d),a=this.tc,c=a.minBrightness,f=a.radius;this.p3d=T(b,e);b=D(a,this.p3d,this.w,this.h,Math.PI/4,20);this.x=b.x;this.y=b.y;this.sc=(a.z1+a.z2-b.z)/a.z2;this.alpha=Math.max(c,Math.min(1,c+1-((b.z-a.z2+f)/(2*f))))};P.prototype.Clicked=function(c){var a=this.a,e=a.target,d=a.href,b;if(e!=""&&e!="_self"){if(self.frames[e]){self.frames[e]=d}else{if(top.frames[e]){top.frames[e]=d}else{window.open(d,e)}}return}if(a.fireEvent){if(!a.fireEvent("onclick")){return}}else{b=document.createEvent("MouseEvents");b.initMouseEvent("click",true,true,window,0,0,0,0,0,false,false,false,false,0,null);if(!a.dispatchEvent(b)){return}}document.location=d};function j(){var a,b={mx:-1,my:-1,cx:0,cy:0,z1:20000,z2:20000,z0:0.0002,freezeActive:false,pulsateTo:1,pulsateTime:3,reverse:false,depth:0.5,maxSpeed:0.05,minSpeed:0,decel:0.95,interval:20,initial:null,hideTags:true,minBrightness:0.1,outlineColour:"#ffff99",outlineThickness:2,outlineOffset:5,textColour:"#ff99ff",textHeight:15,textFont:"Helvetica, Arial, sans-serif",shadow:"#000",shadowBlur:0,shadowOffset:[0,0],zoom:1,weight:false,weightMode:"size",weightFrom:null,weightSize:1,weightGradient:{0:"#f00",0.33:"#ff0",0.66:"#0f0",1:"#00f"}};for(a in b){this[a]=b[a]}this.max_weight=0;this.min_weight=200}j.prototype.Draw=function(){var g=this.canvas,c=0,f,d,b=this.ctxt,h,e,a=this.taglist.length;b.setTransform(1,0,0,1,0,0);f=g.width/2;d=g.height/2;this.active=null;for(e=0;e<a;++e){this.taglist[e].Calc(this.yaw,this.pitch)}this.taglist=this.taglist.sort(function(k,l){return k.sc-l.sc});b.textBaseline="top";if(this.shadowBlur||this.shadowOffset[0]||this.shadowOffset[1]){b.shadowBlur=this.shadowBlur;b.shadowOffsetX=this.shadowOffset[0];b.shadowOffsetY=this.shadowOffset[1]}b.clearRect(0,0,g.width,g.height);for(e=0;e<a;++e){h=this.taglist[e].Draw(b,f,d);if(h&&h.sc>c){this.active=h;this.active.index=e;c=h.sc}}if(this.freezeActive&&this.active){this.yaw=this.pitch=0}else{this.Animate(g.width,g.height)}if(this.active){this.active.Draw(b)}};j.prototype.Animate=function(h,b){var d=this,k=d.mx,a=d.my,f,g,c,e;if(k>=0&&a>=0&&k<h&&a<b){f=d.maxSpeed,e=d.reverse?-1:1;this.yaw=e*((f*2*k/h)-f);this.pitch=e*-((f*2*a/b)-f);this.initial=null}else{if(!d.initial){f=d.minSpeed,g=Math.abs(this.yaw),c=Math.abs(this.pitch);if(g>f){this.yaw=g>d.z0?d.yaw*d.decel:0}if(c>f){this.pitch=c>d.z0?d.pitch*d.decel:0}}}};j.prototype.Clicked=function(c){var b=this.active,d=this.taglist;try{if(b&&d[b.index]){d[b.index].Clicked(c)}}catch(a){}};j.tc={};jQuery.fn.tagcanvas=function(d,a){var b,c=a?jQuery("#"+a):this;if(document.all&&!a){return false}b=c.find("a");if(typeof(window.G_vmlCanvasManager)!="undefined"){this.each(function(){S(this)[0]=window.G_vmlCanvasManager.initElement(S(this)[0])})}if(!b.length||!this[0].getContext||!this[0].getContext("2d").fillText){return false}this.each(function(){var n,o,l,g,f,m,e=S(this).offset(),h,k=[];if(!a){b=S(this).find("a")}m=new j;for(n in d){m[n]=d[n]}m.z1=(19800/(Math.exp(m.depth)*(1-1/Math.E)))+20000-19800/(1-(1/Math.E));
m.z2=m.z1*(1/m.zoom);m.radius=(this.height>this.width?this.width:this.height)*0.33*(m.z2+m.z1)/(m.z1);m.yaw=m.initial?m.initial[0]*m.maxSpeed:0;m.pitch=m.initial?m.initial[1]*m.maxSpeed:0;m.cx=e.left;m.cy=e.top;m.canvas=S(this)[0];m.ctxt=m.canvas.getContext("2d");m.textFont=E(m.textFont);m.ctxt.shadowColor=m.shadow;m.shadow=m.ctxt.shadowColor;m.shadowAlpha=(m.shadowBlur||m.shadowOffset[0]||m.shadowOffset[1])&&Q();m.taglist=[];o=J(b.length);for(n=0;n<b.length;++n){l=b[n].getElementsByTagName("img");if(l.length){g=new Image;g.src=l[0].src;f=new P(m,g,b[n],o[n],1,1);G(g,f,m.taglist)}else{m.taglist.push(new P(m,b[n].innerText||b[n].textContent,b[n],o[n],2,m.textHeight+2))}if(m.weight){h=H(m,b[n]);if(h>m.max_weight){m.max_weight=h}if(h<m.min_weight){m.min_weight=h}k.push(h)}}if(m.weight=(m.max_weight>m.min_weight)){for(n=0;n<m.taglist.length;++n){m.taglist[n].SetWeight(k[n])}}j.tc[S(this)[0].id]=m;if(!j.started){jQuery(document).bind("mousemove",R);jQuery(document).bind("mouseout",R);jQuery(document).bind("mouseup",X);j.started=setInterval(I,m.interval)}if(a&&m.hideTags){c.hide()}});return true}})(jQuery);var submenu=$("#sidebar .submenu li .text");var contents=$("#content > section");var team=$(".unfoldable p, .unfoldable .more");var id=window.location.hash.substr(1);if(id>0&&id<$(submenu).length){clickmenu(id)}else{$(contents).first().fadeIn()}function clickmenu(a){$(submenu).removeClass("active").eq(a).addClass("active");$(contents).css("display","none").eq(a).fadeIn()}$(submenu).click(function(){var a=$(this).index("li .text");clickmenu(a)});$(team).click(function(c){c.preventDefault();var b=$(this).parent().find("p:first");var a=$(this).parent().find("a:last");if($(b).hasClass("open")){$(b).removeClass("open");$(a).show()}else{$(b).addClass("open");$(a).hide()}});$(team).find("a").click(function(a){if(a.stopPropagation){a.stopPropagation()}else{a.cancelBubble=true}});$("#splashgraphic > a").hover(function(){$(this).parent().find("."+$(this).attr("id")).fadeIn()},function(){$(this).parent().find("."+$(this).attr("id")).fadeOut()});
