function twitterLink(url){return('<a href="'+url+'">'+url+'</a>');}
function twitterLinkInternal(txt){return(txt.charAt(0)+'<a href="http://twitter.com/'+txt.substring(1)+'">'+txt.substring(1)+'</a>');}
function relative_time(time_value){var values=time_value.split(" ");time_value=values[1]+" "+values[2]+", "+values[5]+" "+values[3];var parsed_date=Date.parse(time_value);var relative_to=(arguments.length>1)?arguments[1]:new Date();var delta=parseInt(((relative_to.getTime()-parsed_date)/1000),0);delta=delta+(relative_to.getTimezoneOffset()*60);if(delta<60){return'less than a minute ago';}else if(delta<120){return'about a minute ago';}else if(delta<(60*60)){return(parseInt((delta/60),0)).toString()+' minutes ago';}else if(delta<(120*60)){return'about an hour ago';}else if(delta<(24*60*60)){return'about '+(parseInt((delta/3600),0)).toString()+' hours ago';}else if(delta<(48*60*60)){return'1 day ago';}else{return(parseInt((delta/86400),0)).toString()+' days ago';}}
function twitterCallback2(twitters){var statusHTML=[];for(var i=0;i<twitters.length;i++){var username=twitters[i].user.screen_name;var status=twitters[i].text.replace(/((https?|s?ftp|ssh)\:\/\/[^"\s<>]*[^.,;'">\:\s<>\)\]\!])/g,function(url){return twitterLink(url);}).replace(/\B@([_a-z0-9]+)/ig,function(reply){return twitterLinkInternal(reply);});statusHTML.push('<li><span>'+status+'</span> <a style="font-size:85%" href="http://twitter.com/'+username+'/statuses/'+twitters[i].id+'">'+relative_time(twitters[i].created_at)+'</a></li>');}document.getElementById('twitter_update_list').innerHTML=statusHTML.join('');}
;function jhmGetFlickrData(flickrurl,amount,thumbSize,thumbLink,linkAttribs,moreLink,galleryMode){var thumb_url;var thumb;$.getJSON(flickrurl.replace(/format\=[^\&]*/,"format=json&&jsoncallback=?"),function(feed){$('#jquery_flickr_widget_more').html('<a href="'+feed.link+'" rel="me external">'+moreLink+'</a>');$.each(feed.items,function(i,item){thumb_url=item.media.m;if(thumbSize=="small"){thumb_url=thumb_url.replace(/\_m\./,"_t\.");}
thumb='<img src="'+thumb_url+'" class="flickr_thumbnail" alt="Flickr Photo" title="'+item.title+'"/>';if(thumbLink=="1"){thumb='<a href="'+item.media.m.replace(/\_m\./,"\.")+'" title="'+item.title+'" '+linkAttribs+'>'+thumb+'</a>';}
$("#jquery_flickr_widget").append(thumb);if(i==amount)return false;});if(galleryMode=="lightbox"){$('#jquery_flickr_widget a').lightbox({fixedNavigation:true});}else if(galleryMode=="thickbox"){tb_init('#jquery_flickr_widget a');}});}
;(function($)
{if(typeof $.log==='undefined'){if(!$.browser.safari&&typeof window.console!=='undefined'&&typeof window.console.log==='function')
{$.log=function(){var args=[];for(var i=0;i<arguments.length;i++){args.push(arguments[i]);}
window.console.log.apply(window.console,args);}
$.console={log:$.log,debug:window.console.debug||$.log,warn:window.console.warn||$.log,error:window.console.error||$.log,trace:window.console.trace||$.log}}
else
{$.log=function(){};$.console={log:$.log,debug:$.log,warn:$.log,error:alert,trace:$.log};}}
$.params_to_json=$.params_to_json||function(params)
{params=String(params);params=params.substring(params.indexOf('?')+1);params=params.replace(/\+/g,'%20');if(params.substring(0,1)==='{'&&params.substring(params.length-1)==='}')
{return eval(decodeURIComponent(params));}
params=params.split(/\&|\&amp\;/);var json={};for(var i=0,n=params.length;i<n;++i)
{var param=params[i]||null;if(param===null){continue;}
param=param.split('=');if(param===null){continue;}
var key=param[0]||null;if(key===null){continue;}
if(typeof param[1]==='undefined'){continue;}
var value=param[1];key=decodeURIComponent(key);value=decodeURIComponent(value);try{value=eval(value);}catch(e){}
var keys=key.split('.');if(keys.length===1)
{json[key]=value;}
else
{var path='';for(ii in keys)
{key=keys[ii];path+='.'+key;eval('json'+path+' = json'+path+' || {}');}
eval('json'+path+' = value');}}
return json;};$.LightboxClass=function()
{this.construct();};$.fn.lightbox=function(options)
{$.Lightbox=$.Lightbox||new $.LightboxClass();if($.Lightbox.ie6&&!$.Lightbox.ie6_support)
{return this;}
options=$.extend({start:false,events:true},options);var group=$(this);if(options.events)
{$(group).unbind('click').click(function(){var obj=$(this);if(!$.Lightbox.init($(obj)[0],group))
{return false;}
if(!$.Lightbox.start())
{return false;}
return false;});$(group).addClass('lightbox-enabled');}
if(options.start)
{var obj=$(this);if(!$.Lightbox.init($(obj)[0],group))
{return this;}
if(!$.Lightbox.start())
{return this;}}
return this;};$.extend($.LightboxClass.prototype,{images:{list:[],image:false,prev:function(image)
{if(typeof image==='undefined')
{image=this.active();if(!image){return image;}}
if(this.first(image))
{return false;}
return this.get(image.index-1);},next:function(image)
{if(typeof image==='undefined')
{image=this.active();if(!image){return image;}}
if(this.last(image))
{return false;}
return this.get(image.index+1);},first:function(image)
{if(typeof image==='undefined')
{return this.get(0);}
return image.index===0;},last:function(image)
{if(typeof image==='undefined')
{return this.get(this.size()-1);}
return image.index===this.size()-1;},single:function()
{return this.size()===1;},size:function()
{return this.list.length;},empty:function()
{return this.size()===0;},clear:function()
{this.list=[];this.image=false;},active:function(image)
{if(typeof image==='undefined')
{return this.image;}
if(image!==false)
{image=this.get(image);if(!image)
{return image;}}
this.image=image;return true;},add:function(obj)
{if(obj[0])
{for(var i=0;i<obj.length;i++)
{this.add(obj[i]);}
return true;}
var image=this.create(obj);if(!image){return image;}
image.index=this.size();this.list.push(image);return true;},create:function(obj)
{var image={src:'',title:'Untitled',description:'',name:'',index:-1,color:null,width:null,height:null,image:true};if(obj.image)
{image.src=obj.src||image.src;image.title=obj.title||image.title;image.description=obj.description||image.description;image.name=obj.name||image.name;image.color=obj.color||image.color;image.width=obj.width||image.width;image.height=obj.height||image.height;image.index=obj.index||image.index;}
else if(obj.tagName)
{obj=$(obj);if(obj.attr('src')||obj.attr('href'))
{image.src=obj.attr('src')||obj.attr('href');image.title=obj.attr('title')||obj.attr('alt')||image.title;image.name=obj.attr('name')||'';image.color=obj.css('backgroundColor');var s=image.title.indexOf(': ');if(s>0)
{image.description=image.title.substring(s+2)||image.description;image.title=image.title.substring(0,s)||image.title;}}
else
{image=false;}}
else
{image=false;}
if(!image)
{$.console.error('We dont know what we have:',obj);return false;}
return image;},get:function(image)
{if(typeof image==='undefined'||image===null)
{return this.active();}
else
if(typeof image==='number')
{image=this.list[image]||false;}
else
{image=this.create(image);if(!image){return false;}
var f=false;for(var i=0;i<this.size();i++)
{var c=this.list[i];if(c.src===image.src&&c.title===image.title&&c.description===image.description)
{f=c;}}
image=f;}
if(!image)
{$.console.error('The desired image does not exist: ',image,this.list);return false;}
return image;},debug:function()
{return $.Lightbox.debug(arguments);}},constructed:false,compressed:null,src:null,baseurl:"/blog/wp-content/plugins/jquery-lightbox-balupton-edition/",files:{js:{lightbox:'js/jquery.lightbox.min.js',colorBlend:'js/jquery.color.min.js'},css:{lightbox:'css/jquery.lightbox.css'},images:{prev:'images/prev.gif',next:'images/next.gif',blank:'http://static.hjacob.com/images/blank.gif',loading:'images/loading.gif'}},text:{image:'Image',of:'of',close:'Close X',closeInfo:'You can also click anywhere outside the image to close.',download:'Download.',help:{close:'Click to close',interact:'Hover to interact'},about:{text:'jQuery Lightbox Plugin (balupton edition)',title:'Licenced under the GNU Affero General Public License.',link:'http://jquery.com/plugins/project/jquerylightbox_bal'}},keys:{close:'c',prev:'p',next:'n'},handlers:{show:null},opacity:0.9,padding:null,speed:400,rel:'lightbox',auto_relify:true,auto_scroll:'follow',auto_resize:true,ie6:null,ie6_support:true,ie6_upgrade:true,colorBlend:null,download_link:false,show_helper_text:true,show_linkback:true,show_info:'auto',show_extended_info:'auto',options:['show_helper_text','auto_scroll','auto_resize','download_link','show_info','show_extended_info','ie6_support','ie6_upgrade','colorBlend','baseurl','files','text','show_linkback','keys','opacity','padding','speed','rel','auto_relify'],construct:function(options)
{var initial=typeof this.constructed==='undefined'||this.constructed===false;this.constructed=true;var domReady=initial;options=options||{};var prepend=function(item,value){if(typeof item==='object'){for(var i in item){item[i]=prepend(item[i],value);}}else if(typeof value==='array'){for(var i=0,n=item.length;i<n;++i){item[i]=prepend(item[i],value);}}else{item=value+item;}
return item;}
this.files=prepend(this.files,this.baseurl);for(var i in this.options)
{var name=this.options[i];if((typeof options[name]==='object')&&(typeof this[name]==='object'))
{this[name]=$.extend(true,this[name],options[name]);}
else if(typeof options[name]!=='undefined')
{this[name]=options[name];}}delete i;if(initial&&navigator.userAgent.indexOf('MSIE 6')>=0)
{this.ie6=true;}
else
{this.ie6=false;}
if(domReady||typeof options.download_link!=='undefined'||typeof options.colorBlend!=='undefined'||typeof options.files==='object'||typeof options.text==='object'||typeof options.show_linkback!=='undefined'||typeof options.scroll_with!=='undefined')
{$(function(){$.Lightbox.domReady();});}
return true;},domReady:function()
{var bodyEl=document.getElementsByTagName($.browser.safari?'head':'body')[0];var stylesheets=this.files.css;var scripts=this.files.js;if(this.ie6&&this.ie6_upgrade)
{scripts.ie6='http://www.savethedevelopers.org/say.no.to.ie.6.js';}
if(this.colorBlend===true&&typeof $.colorBlend==='undefined')
{this.colorBlend=true;}
else
{this.colorBlend=typeof $.colorBlend!=='undefined';delete scripts.colorBlend;}
delete scripts;delete stylesheets;delete bodyEl;$('#lightbox,#lightbox-overlay').remove();$('body').append('<div id="lightbox-overlay"><div id="lightbox-overlay-text">'+(this.show_linkback?'<p><span id="lightbox-overlay-text-about"><a href="#" title="'+this.text.about.title+'">'+this.text.about.text+'</a></span></p><p>&nbsp;</p>':'')+(this.show_helper_text?'<p><span id="lightbox-overlay-text-close">'+this.text.help.close+'</span><br/>&nbsp;<span id="lightbox-overlay-text-interact">'+this.text.help.interact+'</span></p>':'')+'</div></div><div id="lightbox"><div id="lightbox-imageBox"><div id="lightbox-imageContainer"><img id="lightbox-image" /><div id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+this.files.images.loading+'" /></a></div></div></div><div id="lightbox-infoBox"><div id="lightbox-infoContainer"><div id="lightbox-infoHeader"><span id="lightbox-caption">'+(this.download_link?'<a href="#" title="'+this.text.download+'" id="lightbox-caption-title"></a>':'<span id="lightbox-caption-title"></span>')+'<span id="lightbox-caption-seperator"></span><span id="lightbox-caption-description"></span></span></div><div id="lightbox-infoFooter"><span id="lightbox-currentNumber"></span><span id="lightbox-close"><a href="#" id="lightbox-close-button" title="'+this.text.closeInfo+'">'+this.text.close+'</a></span></div><div id="lightbox-infoContainer-clear"></div></div></div></div>');this.resizeBoxes();this.repositionBoxes();$('#lightbox,#lightbox-overlay,#lightbox-overlay-text-interact').hide();if(this.ie6&&this.ie6_support)
{$('#lightbox-overlay').css({position:'absolute',top:'0px',left:'0px'});}
$.each(this.files.images,function()
{var preloader=new Image();preloader.onload=function(){preloader.onload=null;preloader=null;};preloader.src=this;});$(window).unbind('resize').resize(function()
{$.Lightbox.resizeBoxes('resized');});if(this.scroll==='follow')
{$(window).scroll(function()
{$.Lightbox.repositionBoxes();});}
$('#lightbox-nav-btnPrev').unbind().hover(function(){$(this).css({'background':'url('+$.Lightbox.files.images.prev+') left 45% no-repeat'});},function(){$(this).css({'background':'transparent url('+$.Lightbox.files.images.blank+') no-repeat'});}).click(function(){$.Lightbox.showImage($.Lightbox.images.prev());return false;});$('#lightbox-nav-btnNext').unbind().hover(function(){$(this).css({'background':'url('+$.Lightbox.files.images.next+') right 45% no-repeat'});},function(){$(this).css({'background':'transparent url('+$.Lightbox.files.images.blank+') no-repeat'});}).click(function(){$.Lightbox.showImage($.Lightbox.images.next());return false;});if(this.show_linkback)
{$('#lightbox-overlay-text-about a').click(function(){window.open($.Lightbox.text.about.link);return false;});}
$('#lightbox-overlay-text-close').unbind().hover(function(){$('#lightbox-overlay-text-interact').fadeIn();},function(){$('#lightbox-overlay-text-interact').fadeOut();});$('#lightbox-caption-title').click(function(){window.open($(this).attr('href'));return false;});$('#lightbox-overlay, #lightbox, #lightbox-loading-link, #lightbox-btnClose').unbind().click(function(){$.Lightbox.finish();return false;});if(this.auto_relify)
{this.relify();}
return true;},relify:function()
{var groups={};var groups_n=0;var orig_rel=this.rel;$.each($('[rel*='+orig_rel+']'),function(index,obj){var rel=$(obj).attr('rel');if(rel===orig_rel)
{rel=groups_n;}
if(typeof groups[rel]==='undefined')
{groups[rel]=[];groups_n++;}
groups[rel].push(obj);});$.each(groups,function(index,group){$(group).lightbox();});return true;},init:function(image,images)
{if(typeof images==='undefined')
{images=image;image=0;}
this.images.clear();if(!this.images.add(images))
{return false;}
if(this.images.empty())
{$.console.warn('WARNING','Lightbox started, but no images: ',image,images);return false;}
if(!this.images.active(image))
{return false;}
return true;},start:function()
{this.visible=true;if(this.scroll==='disable')
{$(document.body).css('overflow','hidden');}
$('embed, object, select').css('visibility','hidden');this.resizeBoxes('general');this.repositionBoxes({'speed':0});$('#lightbox-infoFooter').hide();$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-infoBox').hide();$('#lightbox-overlay').css('opacity',this.opacity).fadeIn(400,function(){$('#lightbox').fadeIn(300);if(!$.Lightbox.showImage($.Lightbox.images.active()))
{$.Lightbox.finish();return false;}});return true;},finish:function()
{$('#lightbox').hide();$('#lightbox-overlay').fadeOut(function(){$('#lightbox-overlay').hide();});$('embed, object, select').css({'visibility':'visible'});this.images.active(false);if(this.scroll==='disable')
{$(document.body).css('overflow','visible');}
this.visible=false;},resizeBoxes:function(type)
{if(type!=='transition')
{var $body=$(this.ie6?document.body:document);$('#lightbox-overlay').css({width:$body.width(),height:$body.height()});delete $body;}
switch(type)
{case'general':return true;break;case'resized':if(this.auto_resize===false)
{this.repositionBoxes({'nHeight':nHeight,'speed':this.speed});return true;}
case'transition':default:break;}
var image=this.images.active();if(!image||!image.width||!this.visible)
{return false;}
var iWidth=image.width;var iHeight=image.height;var wWidth=$(window).width();var wHeight=$(window).height();if(this.auto_resize!==false)
{var maxWidth=Math.floor(wWidth*(4/5));var maxHeight=Math.floor(wHeight*(4/5));var resizeRatio;while(iWidth>maxWidth||iHeight>maxHeight)
{if(iWidth>maxWidth)
{resizeRatio=maxWidth/iWidth;iWidth=maxWidth;iHeight=Math.floor(iHeight*resizeRatio);}
if(iHeight>maxHeight)
{resizeRatio=maxHeight/iHeight;iHeight=maxHeight;iWidth=Math.floor(iWidth*resizeRatio);}}}
var cWidth=$('#lightbox-imageBox').width();var cHeight=$('#lightbox-imageBox').height();var nWidth=(iWidth+(this.padding*2));var nHeight=(iHeight+(this.padding*2));var dWidth=cWidth-nWidth;var dHeight=cHeight-nHeight;$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css('height',nHeight);$('#lightbox-infoBox').css('width',nWidth);if(type==='transition')
{if(dWidth===0&&dHeight===0)
{this.pause(this.speed/3);this.showImage(null,3);}
else
{$('#lightbox-image').width(iWidth).height(iHeight);$('#lightbox-imageBox').animate({width:nWidth,height:nHeight},this.speed,function(){$.Lightbox.showImage(null,3);});}}
else
{$('#lightbox-image').animate({width:iWidth,height:iHeight},this.speed);$('#lightbox-imageBox').animate({width:nWidth,height:nHeight},this.speed);}
this.repositionBoxes({'nHeight':nHeight,'speed':this.speed});return true;},repositioning:false,reposition_failsafe:false,repositionBoxes:function(options)
{if(this.repositioning)
{this.reposition_failsafe=true;return null;}
this.repositioning=true;options=$.extend({},options);options.callback=options.callback||null;options.speed=options.speed||'slow';var pageScroll=this.getPageScroll();var nHeight=options.nHeight||parseInt($('#lightbox').height(),10);var nTop=pageScroll.yScroll+($(window).height()-nHeight)/2.5;var nLeft=pageScroll.xScroll;var css={left:nLeft,top:nTop};if(options.speed){$('#lightbox').animate(css,'slow',function(){if($.Lightbox.reposition_failsafe)
{$.Lightbox.repositioning=$.Lightbox.reposition_failsafe=false;$.Lightbox.repositionBoxes(options);}
else
{$.Lightbox.repositioning=false;if(options.callback)
{options.callback();}}});}
else
{$('#lightbox').css(css);if(this.reposition_failsafe)
{this.repositioning=this.reposition_failsafe=false;this.repositionBoxes(options);}
else
{this.repositioning=false;}}
return true;},visible:false,showImage:function(image,step)
{image=this.images.get(image);if(!image){return image;}
step=step||1;var skipped_step_1=step>1&&this.images.active().src!==image.src;var skipped_step_2=step>2&&$('#lightbox-image').attr('src')!==image.src;if(skipped_step_1||skipped_step_2)
{$.console.info('We wanted to skip a few steps: ',image,step,skipped_step_1,skipped_step_2);step=1;}
switch(step)
{case 1:this.KeyboardNav_Disable();$('#lightbox-loading').show();$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-infoBox').hide();$('#lightbox-imageBox').unbind();if(!this.images.active(image)){return false;}
if(image.width&&image.height)
{this.showImage(null,2);}
else
{var preloader=new Image();preloader.onload=function()
{image.width=preloader.width;image.height=preloader.height;$.Lightbox.showImage(null,2);preloader.onload=null;preloader=null;};preloader.src=image.src;}
break;case 2:$('#lightbox-image').attr('src',image.src);if(typeof this.padding==='undefined'||this.padding===null||isNaN(this.padding))
{this.padding=parseInt($('#lightbox-imageContainer').css('padding-left'),10)||parseInt($('#lightbox-imageContainer').css('padding'),10)||0;}
if(this.colorBlend)
{$('#lightbox-overlay').animate({'backgroundColor':image.color},this.speed*2);$('#lightbox-imageBox').css('borderColor',image.color);}
this.resizeBoxes('transition');break;case 3:$('#lightbox-loading').hide();$('#lightbox-image').fadeIn(this.speed*1.5,function(){$.Lightbox.showImage(null,4);});this.preloadNeighbours();if(this.handlers.show!==null)
{this.handlers.show(image);}
break;case 4:var $title=$('#lightbox-caption-title').html(image.title||'Untitled');if(this.download_link)
{$title.attr('href',this.download_link?image.src:'');}
delete $title;$('#lightbox-caption-seperator').html(image.description?': ':'');$('#lightbox-caption-description').html(image.description||'&nbsp;');if(this.images.size()>1)
{$('#lightbox-currentNumber').html(this.text.image+'&nbsp;'+(image.index+1)+'&nbsp;'+this.text.of+'&nbsp;'+this.images.size());}else
{$('#lightbox-currentNumber').html('&nbsp;');}
$('#lightbox-imageBox').unbind('mouseover').mouseover(function(){$('#lightbox-infoBox:not(:visible)').stop().slideDown('fast');});$('#lightbox-infoBox').unbind('mouseover').mouseover(function(){$('#lightbox-infoFooter:not(:visible)').stop().slideDown('fast');});if(this.show_extended_info===true)
{$('#lightbox-imageBox').trigger('mouseover');$('#lightbox-infoBox').trigger('mouseover');}
else if(this.show_info===true)
{$('#lightbox-imageBox').trigger('mouseover');}
$('#lightbox-nav-btnPrev, #lightbox-nav-btnNext').css({'background':'transparent url('+this.files.images.blank+') no-repeat'});if(!this.images.first(image)){$('#lightbox-nav-btnPrev').show();}
if(!this.images.last(image)){$('#lightbox-nav-btnNext').show();}
$('#lightbox-nav').show();this.KeyboardNav_Enable();break;default:$.console.error('Don\'t know what to do: ',image,step);return this.showImage(image,1);}
return true;},preloadNeighbours:function()
{if(this.images.single()||this.images.empty())
{return true;}
var image=this.images.active();if(!image){return image;}
var prev=this.images.prev(image);var objNext;if(prev){objNext=new Image();objNext.src=prev.src;}
var next=this.images.next(image);if(next){objNext=new Image();objNext.src=next.src;}},KeyboardNav_Enable:function(){$(document).keydown(function(objEvent){$.Lightbox.KeyboardNav_Action(objEvent);});},KeyboardNav_Disable:function(){$(document).unbind('keydown');},KeyboardNav_Action:function(objEvent){objEvent=objEvent||window.event;var keycode=objEvent.keyCode;var escapeKey=objEvent.DOM_VK_ESCAPE||27;var key=String.fromCharCode(keycode).toLowerCase();if(key===this.keys.close||keycode===escapeKey)
{return $.Lightbox.finish();}
if(key===this.keys.prev||keycode===37)
{return $.Lightbox.showImage($.Lightbox.images.prev());}
if(key===this.keys.next||keycode===39)
{return $.Lightbox.showImage($.Lightbox.images.next());}
return true;},getPageScroll:function(){var xScroll,yScroll;if(self.pageYOffset)
{yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop)
{yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body)
{yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
var arrayPageScroll={'xScroll':xScroll,'yScroll':yScroll};return arrayPageScroll;},pause:function(ms){var date=new Date();var curDate=null;do{curDate=new Date();}
while(curDate-date<ms);}});if(typeof $.Lightbox==='undefined')
{$.Lightbox=new $.LightboxClass();}})(jQuery);
;jQuery(function($){if(typeof K2!=="undefined"){function Lightbox(){this.updateImageList=function(){$.Lightbox.relify()}}var myLightbox=new Lightbox()}$(".gallery").each(function(index,obj){$(obj).find("a").lightbox()})});
;function ignoreLink(u)
{var href=u.href;var rel=u.rel;if(typeof(rel)=="undefined"){return false;}
if(rel.indexOf('external')==-1){return false;}
if(href.substr(0,7)=='mailto:'){return false;}
if(href.substr(0,11)=='javascript:'){return false;}
if(href.indexOf('hjacob.com')!=-1){return false;}
return true;}
function faviconMissing(img){img.src="/images/external.png";img.style.display="inline";img.height=img.width=12;img.className="externalfavicon_default";}
function favicon4external()
{var counter,links,total_links,i;counter=0;links=document.links;total_links=links.length;for(i=0;i<total_links;++i){if(ignoreLink(links[i])){++counter;}}
if(counter){for(i=0;i<total_links;++i){if(ignoreLink(links[i])){var img=document.createElement('img');img.className="externalfavicon";img.style.display='none';img.height=img.width=16;img.src=links[i].href.split('/').splice(0,3).join('/')+'/favicon.ico';img.onerror=function(evt){faviconMissing(this)};img.onload=function(evt){this.style.display="inline";this.onError="";}
links[i].appendChild(img);}}}
return true;}
;var wptagslug;var wptagname;function jhmParseTags(){$('span.tagging').each(function(){wptagslug=$(this).attr("rel").replace("tag-","");wptagname=$(this).html();if(wptagslug!=""){$(this).html('<a href="/blog/tag/'+wptagslug+'" title="Weitere Artikel mit dem Tag \''+wptagname+'\' anzeigen">'+wptagname+'</a>');}});};function showAd(){}
$(document).ready(function(){showAd();jhmParseTags();favicon4external();SyntaxHighlighter.all();});
;if(!window.SyntaxHighlighter)var SyntaxHighlighter=function(){var sh={defaults:{'class-name':'','first-line':1,'font-size':null,'highlight':null,'smart-tabs':true,'tab-size':4,'ruler':false,'gutter':true,'toolbar':true,'collapse':false,'auto-links':true,'light':false},config:{clipboardSwf:null,toolbarItemWidth:16,toolbarItemHeight:16,bloggerMode:false,tagName:'pre',strings:{expandSource:'expand source',viewSource:'view source',copyToClipboard:'copy to clipboard',copyToClipboardConfirmation:'The code is in your clipboard now',print:'print',help:'?',alert:'SyntaxHighlighter\n\n',noBrush:'Can\'t find brush for: ',brushNotHtmlScript:'Brush wasn\'t configured for html-script option: ',aboutDialog:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>About SyntaxHighlighter</title></head><body style="font-family:Georgia,\'Times New Roman\',Times,serif;background-color:#fff;color:#000;font-size:1em;text-align:center;"><div style="text-align:center;margin-top:3em;"><div style="font-family:Geneva,Arial,Helvetica,sans-serif;font-size:xx-large;">SyntaxHighlighter</div><div style="font-size:.75em;margin-bottom:4em;"><div>version 2.0.296 (March 01 2009)</div><div><a href="http://alexgorbatchev.com" target="_blank" style="color:#0099FF;text-decoration:none;">http://alexgorbatchev.com</a></div></div><div>JavaScript code syntax highlighter.</div><div>Copyright 2004-2009 Alex Gorbatchev.</div></div></body></html>'},debug:false},vars:{discoveredBrushes:null,spaceWidth:null,printFrame:null,highlighters:{}},brushes:{},regexLib:{multiLineCComments:/\/\*[\s\S]*?\*\//gm,singleLineCComments:/\/\/.*$/gm,singleLinePerlComments:/#.*$/gm,doubleQuotedString:/"(?:\.|(\\\")|[^\""\n])*"/g,singleQuotedString:/'(?:\.|(\\\')|[^\''\n])*'/g,multiLineDoubleQuotedString:/"(?:\.|(\\\")|[^\""])*"/g,multiLineSingleQuotedString:/'(?:\.|(\\\')|[^\''])*'/g,url:/\w+:\/\/[\w-.\/?%&=]*/g,phpScriptTags:{left:/(&lt;|<)\?=?/g,right:/\?(&gt;|>)/g},aspScriptTags:{left:/(&lt;|<)%=?/g,right:/%(&gt;|>)/g},scriptScriptTags:{left:/(&lt;|<)\s*script.*?(&gt;|>)/gi,right:/(&lt;|<)\/\s*script\s*(&gt;|>)/gi}},toolbar:{create:function(highlighter)
{var div=document.createElement('DIV'),items=sh.toolbar.items;div.className='toolbar';for(var name in items)
{var constructor=items[name],command=new constructor(highlighter),element=command.create();highlighter.toolbarCommands[name]=command;if(element==null)
continue;if(typeof(element)=='string')
element=sh.toolbar.createButton(element,highlighter.id,name);element.className+='item '+name;div.appendChild(element);}
return div;},createButton:function(label,highlighterId,commandName)
{var a=document.createElement('a'),style=a.style,config=sh.config,width=config.toolbarItemWidth,height=config.toolbarItemHeight;a.href='#'+commandName;a.title=label;a.highlighterId=highlighterId;a.commandName=commandName;a.innerHTML=label;if(isNaN(width)==false)
style.width=width+'px';if(isNaN(height)==false)
style.height=height+'px';a.onclick=function(e)
{try
{sh.toolbar.executeCommand(this,e||window.event,this.highlighterId,this.commandName);}
catch(e)
{sh.utils.alert(e.message);}
return false;};return a;},executeCommand:function(sender,event,highlighterId,commandName,args)
{var highlighter=sh.vars.highlighters[highlighterId],command;if(highlighter==null||(command=highlighter.toolbarCommands[commandName])==null)
return null;return command.execute(sender,event,args);},items:{expandSource:function(highlighter)
{this.create=function()
{if(highlighter.getParam('collapse')!=true)
return;return sh.config.strings.expandSource;};this.execute=function(sender,event,args)
{var div=highlighter.div;sender.parentNode.removeChild(sender);div.className=div.className.replace('collapsed','');};},viewSource:function(highlighter)
{this.create=function()
{return sh.config.strings.viewSource;};this.execute=function(sender,event,args)
{var code=sh.utils.fixForBlogger(highlighter.originalCode).replace(/</g,'&lt;'),wnd=sh.utils.popup('','_blank',750,400,'location=0, resizable=1, menubar=0, scrollbars=1');code=sh.utils.unindent(code);wnd.document.write('<pre>'+code+'</pre>');wnd.document.close();};},copyToClipboard:function(highlighter)
{var flashDiv,flashSwf,highlighterId=highlighter.id;this.create=function()
{var config=sh.config;if(config.clipboardSwf==null)
return null;function params(list)
{var result='';for(var name in list)
result+="<param name='"+name+"' value='"+list[name]+"'/>";return result;};function attributes(list)
{var result='';for(var name in list)
result+=" "+name+"='"+list[name]+"'";return result;};var args1={width:config.toolbarItemWidth,height:config.toolbarItemHeight,id:highlighterId+'_clipboard',type:'application/x-shockwave-flash',title:sh.config.strings.copyToClipboard},args2={allowScriptAccess:'always',wmode:'transparent',flashVars:'highlighterId='+highlighterId,menu:'false'},swf=config.clipboardSwf,html;if(/msie/i.test(navigator.userAgent))
{html='<object'
+attributes({classid:'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',codebase:'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0'})
+attributes(args1)
+'>'
+params(args2)
+params({movie:swf})
+'</object>';}
else
{html='<embed'
+attributes(args1)
+attributes(args2)
+attributes({src:swf})
+'/>';}
flashDiv=document.createElement('div');flashDiv.innerHTML=html;return flashDiv;};this.execute=function(sender,event,args)
{var command=args.command;switch(command)
{case'get':var code=sh.utils.unindent(sh.utils.fixForBlogger(highlighter.originalCode).replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&'));if(window.clipboardData)
window.clipboardData.setData('text',code);else
return sh.utils.unindent(code);case'ok':sh.utils.alert(sh.config.strings.copyToClipboardConfirmation);break;case'error':sh.utils.alert(args.message);break;}};},printSource:function(highlighter)
{this.create=function()
{return sh.config.strings.print;};this.execute=function(sender,event,args)
{var iframe=document.createElement('IFRAME'),doc=null;if(sh.vars.printFrame!=null)
document.body.removeChild(sh.vars.printFrame);sh.vars.printFrame=iframe;iframe.style.cssText='position:absolute;width:0px;height:0px;left:-500px;top:-500px;';document.body.appendChild(iframe);doc=iframe.contentWindow.document;copyStyles(doc,window.document);doc.write('<div class="'+highlighter.div.className.replace('collapsed','')+' printing">'+highlighter.div.innerHTML+'</div>');doc.close();iframe.contentWindow.focus();iframe.contentWindow.print();function copyStyles(destDoc,sourceDoc)
{var links=sourceDoc.getElementsByTagName('link');for(var i=0;i<links.length;i++)
if(links[i].rel.toLowerCase()=='stylesheet'&&/shCore\.css$/.test(links[i].href))
destDoc.write('<link type="text/css" rel="stylesheet" href="'+links[i].href+'"/>');};};},about:function(highlighter)
{this.create=function()
{return sh.config.strings.help;};this.execute=function(sender,event)
{var wnd=sh.utils.popup('','_blank',500,250,'scrollbars=0'),doc=wnd.document;doc.write(sh.config.strings.aboutDialog);doc.close();wnd.focus();};}}},utils:{guid:function(prefix)
{return prefix+Math.round(Math.random()*1000000).toString();},merge:function(obj1,obj2)
{var result={},name;for(name in obj1)
result[name]=obj1[name];for(name in obj2)
result[name]=obj2[name];return result;},toBoolean:function(value)
{switch(value)
{case"true":return true;case"false":return false;}
return value;},popup:function(url,name,width,height,options)
{var x=(screen.width-width)/2,y=(screen.height-height)/2;options+=', left='+x+', top='+y+', width='+width+', height='+height;options=options.replace(/^,/,'');var win=window.open(url,name,options);win.focus();return win;},addEvent:function(obj,type,func)
{if(obj.attachEvent)
{obj['e'+type+func]=func;obj[type+func]=function()
{obj['e'+type+func](window.event);}
obj.attachEvent('on'+type,obj[type+func]);}
else
{obj.addEventListener(type,func,false);}},alert:function(str)
{alert(sh.config.strings.alert+str)},findBrush:function(alias,alert)
{var brushes=sh.vars.discoveredBrushes,result=null;if(brushes==null)
{brushes={};for(var brush in sh.brushes)
{var aliases=sh.brushes[brush].aliases;if(aliases==null)
continue;for(var i=0;i<aliases.length;i++)
brushes[aliases[i]]=brush;}
sh.vars.discoveredBrushes=brushes;}
result=sh.brushes[brushes[alias]];if(result==null&&alert!=false)
sh.utils.alert(sh.config.strings.noBrush+alias);return result;},eachLine:function(str,callback)
{var lines=str.split('\n');for(var i=0;i<lines.length;i++)
lines[i]=callback(lines[i]);return lines.join('\n');},createRuler:function()
{var div=document.createElement('div'),ruler=document.createElement('div'),showEvery=10,i=1;while(i<=150)
{if(i%showEvery===0)
{div.innerHTML+=i;i+=(i+'').length;}
else
{div.innerHTML+='&middot;';i++;}}
ruler.className='ruler line';ruler.appendChild(div);return ruler;},trimFirstAndLastLines:function(str)
{return str.replace(/^[ ]*[\n]+|[\n]*[ ]*$/g,'');},parseParams:function(str)
{var match,result={},arrayRegex=new XRegExp("^\\[(?<values>(.*?))\\]$"),regex=new XRegExp("(?<name>[\\w-]+)"+"\\s*:\\s*"+"(?<value>"+"[\\w-%#]+|"+"\\[.*?\\]|"+'".*?"|'+"'.*?'"+")\\s*;?","g");while((match=regex.exec(str))!=null)
{var value=match.value.replace(/^['"]|['"]$/g,'');if(value!=null&&arrayRegex.test(value))
{var m=arrayRegex.exec(value);value=m.values.length>0?m.values.split(/\s*,\s*/):[];}
result[match.name]=value;}
return result;},decorate:function(str,css)
{if(str==null||str.length==0||str=='\n')
return str;str=str.replace(/</g,'&lt;');str=str.replace(/ {2,}/g,function(m)
{var spaces='';for(var i=0;i<m.length-1;i++)
spaces+='&nbsp;';return spaces+' ';});if(css!=null)
str=sh.utils.eachLine(str,function(line)
{if(line.length==0)
return'';var spaces='';line=line.replace(/^(&nbsp;| )+/,function(s)
{spaces=s;return'';});if(line.length==0)
return spaces;return spaces+'<code class="'+css+'">'+line+'</code>';});return str;},padNumber:function(number,length)
{var result=number.toString();while(result.length<length)
result='0'+result;return result;},measureSpace:function()
{var container=document.createElement('div'),span,result=0,body=document.body,id=sh.utils.guid('measureSpace'),divOpen='<div class="',closeDiv='</div>',closeSpan='</span>';container.innerHTML=divOpen+'syntaxhighlighter">'
+divOpen+'lines">'
+divOpen+'line">'
+divOpen+'content'
+'"><span class="block"><span id="'+id+'">&nbsp;'+closeSpan+closeSpan
+closeDiv
+closeDiv
+closeDiv
+closeDiv;body.appendChild(container);span=document.getElementById(id);if(/opera/i.test(navigator.userAgent))
{var style=window.getComputedStyle(span,null);result=parseInt(style.getPropertyValue("width"));}
else
{result=span.offsetWidth;}
body.removeChild(container);return result;},processTabs:function(code,tabSize)
{var tab='';for(var i=0;i<tabSize;i++)
tab+=' ';return code.replace(/\t/g,tab);},processSmartTabs:function(code,tabSize)
{var lines=code.split('\n'),tab='\t',spaces='';for(var i=0;i<50;i++)
spaces+='                    ';function insertSpaces(line,pos,count)
{return line.substr(0,pos)
+spaces.substr(0,count)
+line.substr(pos+1,line.length);};code=sh.utils.eachLine(code,function(line)
{if(line.indexOf(tab)==-1)
return line;var pos=0;while((pos=line.indexOf(tab))!=-1)
{var spaces=tabSize-pos%tabSize;line=insertSpaces(line,pos,spaces);}
return line;});return code;},fixForBlogger:function(str)
{return(sh.config.bloggerMode==true)?str.replace(/<br\s*\/?>|&lt;br\s*\/?&gt;/gi,'\n'):str;},trim:function(str)
{return str.replace(/\s*$/g,'').replace(/^\s*/,'');},unindent:function(str)
{var lines=sh.utils.fixForBlogger(str).split('\n'),indents=new Array(),regex=/^\s*/,min=1000;for(var i=0;i<lines.length&&min>0;i++)
{var line=lines[i];if(sh.utils.trim(line).length==0)
continue;var matches=regex.exec(line);if(matches==null)
return str;min=Math.min(matches[0].length,min);}
if(min>0)
for(var i=0;i<lines.length;i++)
lines[i]=lines[i].substr(min);return lines.join('\n');},matchesSortCallback:function(m1,m2)
{if(m1.index<m2.index)
return-1;else if(m1.index>m2.index)
return 1;else
{if(m1.length<m2.length)
return-1;else if(m1.length>m2.length)
return 1;}
return 0;},getMatches:function(code,regexInfo)
{function defaultAdd(match,regexInfo)
{return[new sh.Match(match[0],match.index,regexInfo.css)];};var index=0,match=null,result=[],func=regexInfo.func?regexInfo.func:defaultAdd;while((match=regexInfo.regex.exec(code))!=null)
result=result.concat(func(match,regexInfo));return result;},processUrls:function(code)
{return code.replace(sh.regexLib.url,function(m)
{return'<a href="'+m+'">'+m+'</a>';});}},highlight:function(globalParams,element)
{function toArray(source)
{var result=[];for(var i=0;i<source.length;i++)
result.push(source[i]);return result;};var elements=element?[element]:toArray(document.getElementsByTagName(sh.config.tagName)),propertyName='innerHTML',highlighter=null;if(elements.length===0)
return;for(var i=0;i<elements.length;i++)
{var target=elements[i],params=sh.utils.parseParams(target.className),brushName;params=sh.utils.merge(globalParams,params);brushName=params['brush'];if(brushName==null)
continue;if(params['html-script']=='true')
{highlighter=new sh.HtmlScript(brushName);}
else
{var brush=sh.utils.findBrush(brushName);if(brush)
highlighter=new brush();else
continue;}
highlighter.highlight(target[propertyName],params);var result=highlighter.div;if(sh.config.debug)
{result=document.createElement('textarea');result.value=highlighter.div.innerHTML;result.style.width='70em';result.style.height='30em';}
target.parentNode.replaceChild(result,target);}},all:function(params)
{sh.utils.addEvent(window,'load',function(){sh.highlight(params);});}};sh.Match=function(value,index,css)
{this.value=value;this.index=index;this.length=value.length;this.css=css;};sh.Match.prototype.toString=function()
{return this.value;};sh.HtmlScript=function(scriptBrushName)
{var scriptBrush=sh.utils.findBrush(scriptBrushName),xmlBrush=new sh.brushes.Xml(),bracketsRegex=null;if(scriptBrush==null)
return;scriptBrush=new scriptBrush();this.xmlBrush=xmlBrush;if(scriptBrush.htmlScript==null)
{sh.utils.alert(sh.config.strings.brushNotHtmlScript+scriptBrushName);return;}
xmlBrush.regexList.push({regex:scriptBrush.htmlScript.code,func:process});function offsetMatches(matches,offset)
{for(var j=0;j<matches.length;j++)
matches[j].index+=offset;}
function process(match,info)
{var code=match.code,matches=[],regexList=scriptBrush.regexList,offset=match.index+match.left.length,htmlScript=scriptBrush.htmlScript,result;for(var i=0;i<regexList.length;i++)
{result=sh.utils.getMatches(code,regexList[i]);offsetMatches(result,offset);matches=matches.concat(result);}
if(htmlScript.left!=null&&match.left!=null)
{result=sh.utils.getMatches(match.left,htmlScript.left);offsetMatches(result,match.index);matches=matches.concat(result);}
if(htmlScript.right!=null&&match.right!=null)
{result=sh.utils.getMatches(match.right,htmlScript.right);offsetMatches(result,match.index+match[0].lastIndexOf(match.right));matches=matches.concat(result);}
return matches;}};sh.HtmlScript.prototype.highlight=function(code,params)
{this.xmlBrush.highlight(code,params);this.div=this.xmlBrush.div;}
sh.Highlighter=function()
{};sh.Highlighter.prototype={getParam:function(name,defaultValue)
{var result=this.params[name];return sh.utils.toBoolean(result==null?defaultValue:result);},create:function(name)
{return document.createElement(name);},isMatchNested:function(match)
{for(var i=0;i<this.matches.length;i++)
{var item=this.matches[i];if(item===null)
continue;if((match.index>item.index)&&(match.index<item.index+item.length))
return true;}
return false;},findMatches:function(regexList,code)
{var result=[];if(regexList!=null)
for(var i=0;i<regexList.length;i++)
result=result.concat(sh.utils.getMatches(code,regexList[i]));result=result.sort(sh.utils.matchesSortCallback);return result;},removeNestedMatches:function()
{for(var i=0;i<this.matches.length;i++)
if(this.isMatchNested(this.matches[i]))
this.matches[i]=null;},createDisplayLines:function(code)
{var lines=code.split(/\n/g),firstLine=parseInt(this.getParam('first-line')),padLength=(firstLine+lines.length).toString().length,highlightedLines=this.getParam('highlight',[]);code='';for(var i=0;i<lines.length;i++)
{var line=lines[i],indent=/^(&nbsp;|\s)+/.exec(line),lineClass='line alt'+(i%2==0?1:2),lineNumber=sh.utils.padNumber(firstLine+i,padLength),highlighted=highlightedLines.indexOf((firstLine+i).toString())!=-1,spaces=null;if(indent!=null)
{spaces=indent[0].toString();line=line.substr(spaces.length);spaces=spaces.replace(/&nbsp;/g,' ');indent=sh.vars.spaceWidth*spaces.length;}
else
{indent=0;}
line=sh.utils.trim(line);if(line.length==0)
line='&nbsp;';if(highlighted)
lineClass+=' highlighted';code+='<div class="'+lineClass+'">'
+'<code class="number">'+lineNumber+'.</code>'
+'<span class="content">'
+(spaces!=null?'<code class="spaces">'+spaces.replace(/\s/g,'&nbsp;')+'</code>':'')
+'<span class="block" style="margin-left: '+indent+'px !important;">'+line+'</span>'
+'</span>'
+'</div>';}
return code;},processMatches:function(code,matches)
{var pos=0,result='',decorate=sh.utils.decorate;for(var i=0;i<matches.length;i++)
{var match=matches[i];if(match===null||match.length===0)
continue;result+=decorate(code.substr(pos,match.index-pos),'plain')
+decorate(match.value,match.css);pos=match.index+match.length;}
result+=decorate(code.substr(pos),'plain');return result;},highlight:function(code,params)
{var conf=sh.config,vars=sh.vars,div,tabSize;this.params={};this.div=null;this.lines=null;this.code=null;this.bar=null;this.toolbarCommands={};this.id=sh.utils.guid('highlighter_');vars.highlighters[this.id]=this;if(code===null)
code='';if(vars.spaceWidth===null)
vars.spaceWidth=sh.utils.measureSpace();this.params=sh.utils.merge(sh.defaults,params||{});if(this.getParam('light')==true)
this.params.toolbar=this.params.gutter=false;this.div=div=this.create('DIV');this.lines=this.create('DIV');this.lines.className='lines';div.className='syntaxhighlighter';div.id=this.id;if(this.getParam('collapse'))
div.className+=' collapsed';if(this.getParam('gutter')==false)
div.className+=' nogutter';div.className+=' '+this.getParam('class-name');div.style.fontSize=this.getParam('font-size','');this.originalCode=code;this.code=sh.utils.trimFirstAndLastLines(code).replace(/\r/g,' ');tabSize=this.getParam('tab-size');this.code=this.getParam('smart-tabs')==true?sh.utils.processSmartTabs(this.code,tabSize):sh.utils.processTabs(this.code,tabSize);this.code=sh.utils.unindent(this.code);if(this.getParam('toolbar'))
{this.bar=this.create('DIV');this.bar.className='bar';this.bar.appendChild(sh.toolbar.create(this));div.appendChild(this.bar);}
if(this.getParam('ruler'))
div.appendChild(sh.utils.createRuler());div.appendChild(this.lines);this.matches=this.findMatches(this.regexList,this.code);this.removeNestedMatches();code=this.processMatches(this.code,this.matches);code=this.createDisplayLines(sh.utils.trim(code));if(this.getParam('auto-links'))
code=sh.utils.processUrls(code);this.lines.innerHTML=code;},getKeywords:function(str)
{str=str.replace(/^\s+|\s+$/g,'').replace(/\s+/g,'\\b|\\b');return'\\b'+str+'\\b';},forHtmlScript:function(regexGroup)
{this.htmlScript={left:{regex:regexGroup.left,css:'script'},right:{regex:regexGroup.right,css:'script'},code:new XRegExp("(?<left>"+regexGroup.left.source+")"+"(?<code>.*?)"+"(?<right>"+regexGroup.right.source+")","sgi")};}};return sh;}();if(!Array.indexOf)
Array.prototype.indexOf=function(searchElement,fromIndex)
{fromIndex=Math.max(fromIndex||0,0);for(var i=fromIndex;i<this.length;i++)
if(this[i]==searchElement)
return i;return-1;};if(!window.XRegExp){(function(){var real={exec:RegExp.prototype.exec,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},lib={part:/(?:[^\\([#\s.]+|\\(?!k<[\w$]+>|[pP]{[^}]+})[\S\s]?|\((?=\?(?!#|<[\w$]+>)))+|(\()(?:\?(?:(#)[^)]*\)|<([$\w]+)>))?|\\(?:k<([\w$]+)>|[pP]{([^}]+)})|(\[\^?)|([\S\s])/g,replaceVar:/(?:[^$]+|\$(?![1-9$&`']|{[$\w]+}))+|\$(?:([1-9]\d*|[$&`'])|{([$\w]+)})/g,extended:/^(?:\s+|#.*)+/,quantifier:/^(?:[?*+]|{\d+(?:,\d*)?})/,classLeft:/&&\[\^?/g,classRight:/]/g},indexOf=function(array,item,from){for(var i=from||0;i<array.length;i++)
if(array[i]===item)return i;return-1;},brokenExecUndef=/()??/.exec("")[1]!==undefined,plugins={};XRegExp=function(pattern,flags){if(pattern instanceof RegExp){if(flags!==undefined)
throw TypeError("can't supply flags when constructing one RegExp from another");return pattern.addFlags();}
var flags=flags||"",singleline=flags.indexOf("s")>-1,extended=flags.indexOf("x")>-1,hasNamedCapture=false,captureNames=[],output=[],part=lib.part,match,cc,len,index,regex;part.lastIndex=0;while(match=real.exec.call(part,pattern)){if(match[2]){if(!lib.quantifier.test(pattern.slice(part.lastIndex)))
output.push("(?:)");}else if(match[1]){captureNames.push(match[3]||null);if(match[3])
hasNamedCapture=true;output.push("(");}else if(match[4]){index=indexOf(captureNames,match[4]);output.push(index>-1?"\\"+(index+1)+(isNaN(pattern.charAt(part.lastIndex))?"":"(?:)"):match[0]);}else if(match[5]){output.push(plugins.unicode?plugins.unicode.get(match[5],match[0].charAt(1)==="P"):match[0]);}else if(match[6]){if(pattern.charAt(part.lastIndex)==="]"){output.push(match[6]==="["?"(?!)":"[\\S\\s]");part.lastIndex++;}else{cc=XRegExp.matchRecursive("&&"+pattern.slice(match.index),lib.classLeft,lib.classRight,"",{escapeChar:"\\"})[0];output.push(match[6]+cc+"]");part.lastIndex+=cc.length+1;}}else if(match[7]){if(singleline&&match[7]==="."){output.push("[\\S\\s]");}else if(extended&&lib.extended.test(match[7])){len=real.exec.call(lib.extended,pattern.slice(part.lastIndex-1))[0].length;if(!lib.quantifier.test(pattern.slice(part.lastIndex-1+len)))
output.push("(?:)");part.lastIndex+=len-1;}else{output.push(match[7]);}}else{output.push(match[0]);}}
regex=RegExp(output.join(""),real.replace.call(flags,/[sx]+/g,""));regex._x={source:pattern,captureNames:hasNamedCapture?captureNames:null};return regex;};XRegExp.addPlugin=function(name,o){plugins[name]=o;};RegExp.prototype.exec=function(str){var match=real.exec.call(this,str),name,i,r2;if(match){if(brokenExecUndef&&match.length>1){r2=new RegExp("^"+this.source+"$(?!\\s)",this.getNativeFlags());real.replace.call(match[0],r2,function(){for(i=1;i<arguments.length-2;i++){if(arguments[i]===undefined)match[i]=undefined;}});}
if(this._x&&this._x.captureNames){for(i=1;i<match.length;i++){name=this._x.captureNames[i-1];if(name)match[name]=match[i];}}
if(this.global&&this.lastIndex>(match.index+match[0].length))
this.lastIndex--;}
return match;};})();}
RegExp.prototype.getNativeFlags=function(){return(this.global?"g":"")+
(this.ignoreCase?"i":"")+
(this.multiline?"m":"")+
(this.extended?"x":"")+
(this.sticky?"y":"");};RegExp.prototype.addFlags=function(flags){var regex=new XRegExp(this.source,(flags||"")+this.getNativeFlags());if(this._x){regex._x={source:this._x.source,captureNames:this._x.captureNames?this._x.captureNames.slice(0):null};}
return regex;};RegExp.prototype.call=function(context,str){return this.exec(str);};RegExp.prototype.apply=function(context,args){return this.exec(args[0]);};XRegExp.cache=function(pattern,flags){var key="/"+pattern+"/"+(flags||"");return XRegExp.cache[key]||(XRegExp.cache[key]=new XRegExp(pattern,flags));};XRegExp.escape=function(str){return str.replace(/[-[\]{}()*+?.\\^$|,#\s]/g,"\\$&");};XRegExp.matchRecursive=function(str,left,right,flags,options){var options=options||{},escapeChar=options.escapeChar,vN=options.valueNames,flags=flags||"",global=flags.indexOf("g")>-1,ignoreCase=flags.indexOf("i")>-1,multiline=flags.indexOf("m")>-1,sticky=flags.indexOf("y")>-1,flags=flags.replace(/y/g,""),left=left instanceof RegExp?(left.global?left:left.addFlags("g")):new XRegExp(left,"g"+flags),right=right instanceof RegExp?(right.global?right:right.addFlags("g")):new XRegExp(right,"g"+flags),output=[],openTokens=0,delimStart=0,delimEnd=0,lastOuterEnd=0,outerStart,innerStart,leftMatch,rightMatch,escaped,esc;if(escapeChar){if(escapeChar.length>1)throw SyntaxError("can't supply more than one escape character");if(multiline)throw TypeError("can't supply escape character when using the multiline flag");escaped=XRegExp.escape(escapeChar);esc=new RegExp("^(?:"+escaped+"[\\S\\s]|(?:(?!"+left.source+"|"+right.source+")[^"+escaped+"])+)+",ignoreCase?"i":"");}
while(true){left.lastIndex=right.lastIndex=delimEnd+
(escapeChar?(esc.exec(str.slice(delimEnd))||[""])[0].length:0);leftMatch=left.exec(str);rightMatch=right.exec(str);if(leftMatch&&rightMatch){if(leftMatch.index<=rightMatch.index)
rightMatch=null;else leftMatch=null;}
if(leftMatch||rightMatch){delimStart=(leftMatch||rightMatch).index;delimEnd=(leftMatch?left:right).lastIndex;}else if(!openTokens){break;}
if(sticky&&!openTokens&&delimStart>lastOuterEnd)
break;if(leftMatch){if(!openTokens++){outerStart=delimStart;innerStart=delimEnd;}}else if(rightMatch&&openTokens){if(!--openTokens){if(vN){if(vN[0]&&outerStart>lastOuterEnd)
output.push([vN[0],str.slice(lastOuterEnd,outerStart),lastOuterEnd,outerStart]);if(vN[1])output.push([vN[1],str.slice(outerStart,innerStart),outerStart,innerStart]);if(vN[2])output.push([vN[2],str.slice(innerStart,delimStart),innerStart,delimStart]);if(vN[3])output.push([vN[3],str.slice(delimStart,delimEnd),delimStart,delimEnd]);}else{output.push(str.slice(innerStart,delimStart));}
lastOuterEnd=delimEnd;if(!global)
break;}}else{left.lastIndex=right.lastIndex=0;throw Error("subject data contains unbalanced delimiters");}
if(delimStart===delimEnd)
delimEnd++;}
if(global&&!sticky&&vN&&vN[0]&&str.length>lastOuterEnd)
output.push([vN[0],str.slice(lastOuterEnd),lastOuterEnd,str.length]);left.lastIndex=right.lastIndex=0;return output;};
;SyntaxHighlighter.brushes.Xml=function()
{function process(match,regexInfo)
{var constructor=SyntaxHighlighter.Match,code=match[0],tag=new XRegExp('(&lt;|<)[\\s\\/\\?]*(?<name>[:\\w-\\.]+)','xg').exec(code),result=[];if(match.attributes!=null)
{var attributes,regex=new XRegExp('(?<name> [\\w:\\-\\.]+)'+'\\s*=\\s*'+'(?<value> ".*?"|\'.*?\'|\\w+)','xg');while((attributes=regex.exec(code))!=null)
{result.push(new constructor(attributes.name,match.index+attributes.index,'color1'));result.push(new constructor(attributes.value,match.index+attributes.index+attributes[0].indexOf(attributes.value),'string'));}}
if(tag!=null)
result.push(new constructor(tag.name,match.index+tag[0].indexOf(tag.name),'keyword'));return result;}
this.regexList=[{regex:new XRegExp('(\\&lt;|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\&gt;|>)','gm'),css:'color2'},{regex:new XRegExp('(\\&lt;|<)!--\\s*.*?\\s*--(\\&gt;|>)','gm'),css:'comments'},{regex:new XRegExp('(&lt;|<)[\\s\\/\\?]*(\\w+)(?<attributes>.*?)[\\s\\/\\?]*(&gt;|>)','sg'),func:process}];};SyntaxHighlighter.brushes.Xml.prototype=new SyntaxHighlighter.Highlighter();SyntaxHighlighter.brushes.Xml.aliases=['xml','xhtml','xslt','html','xhtml'];
;SyntaxHighlighter.brushes.Php=function()
{var funcs='abs acos acosh addcslashes addslashes '+'array_change_key_case array_chunk array_combine array_count_values array_diff '+'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+'array_push array_rand array_reduce array_reverse array_search array_shift '+'array_slice array_splice array_sum array_udiff array_udiff_assoc '+'array_udiff_uassoc array_uintersect array_uintersect_assoc '+'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+'parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir '+'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+'strtoupper strtr strval substr substr_compare';var keywords='and or xor array as break case '+'cfunction class const continue declare default die do else '+'elseif enddeclare endfor endforeach endif endswitch endwhile '+'extends for foreach function include include_once global if '+'new old_function return static switch use require require_once '+'var while abstract interface public implements extends private protected throw';var constants='__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__';this.regexList=[{regex:SyntaxHighlighter.regexLib.singleLineCComments,css:'comments'},{regex:SyntaxHighlighter.regexLib.multiLineCComments,css:'comments'},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:'string'},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:'string'},{regex:/\$\w+/g,css:'variable'},{regex:new RegExp(this.getKeywords(funcs),'gmi'),css:'functions'},{regex:new RegExp(this.getKeywords(constants),'gmi'),css:'constants'},{regex:new RegExp(this.getKeywords(keywords),'gm'),css:'keyword'}];this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);};SyntaxHighlighter.brushes.Php.prototype=new SyntaxHighlighter.Highlighter();SyntaxHighlighter.brushes.Php.aliases=['php'];