window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){arguments.callee=arguments.callee.caller;var a=[].slice.call(arguments);(typeof console.log==="object"?log.apply.call(console.log,console,a):console.log.apply(console,a))}};(function(e){function h(){}for(var g="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),f;f=g.pop();){e[f]=e[f]||h}})((function(){try{console.log();return window.console}catch(a){return window.console={}}})());var cpo={},window_focus=true;cpo.map=function(f){var e,h=[],g=this;for(e=0;e0){b.page++}else{b.page=-1}cpo.loadTweets({twitter:c});if(a&&a.end){a.end()}})};cpo.loadTweets=function(c){var d,a=$(".Twitter .tweets"),k,g,f,e,h="",l,b,n=c.twitter,m;if(n.hasOwnProperty("error")){a.text(n.error);return false}if(c&&c.pos==="prepend"){n=n.reverse()}for(d in n){if(n.hasOwnProperty(d)){g=n[d];if(g.retweet_count>0){e=(typeof g.retweeted_status!=="undefined")?g.retweeted_status.user:g.user;f=(typeof g.retweeted_status!=="undefined")?g.retweeted_status.text:g.text;h="retweet"}else{h="";e=g.user;f=g.text}l=g.entities.urls;for(b in l){if(l.hasOwnProperty(b)){f=f.replace(l[b].url,""+l[b].display_url+"")}}f=f.replace(/^RT.+:/g,"");f=f.replace(/(^|\s)@([A-Za-zàèìòùáéíóúâêîôûãõ_0-9]+)/g,"$1@$2");f=f.replace(/(^|\s)#([A-Za-zàèìòùáéíóúâêîôûãõ_0-9]+)/g,"$1#$2");m=(TwitterDateConverter(g.created_at))?TwitterDateConverter(g.created_at):"long ago";if($("."+g.id_str).length===0){k=tplTweet.replace("%LOGO%",'').replace("%NAME%",e.screen_name).replace("%TIME%",m).replace("%CONTENT%",f).replace("%ID%",g.id_str).replace("%CLASS%",h);if(c&&c.pos==="prepend"){a.prepend(k)}else{a.append(k)}}}}};var tplTweet='
\n
\n%LOGO%
\n
\n
%NAME%
%TIME%
\n
\n

\n%CONTENT%\n

\n
\n
\n
';function TwitterDateConverter(d){var b=new Date(d),c=(((new Date()).getTime()-b.getTime())/1000),a=Math.floor(c/86400);if(isNaN(a)||a<0||a>=31){return}return a==0&&(c<60&&"just now"||c<120&&"1 minute ago"||c<3600&&Math.floor(c/60)+" minutes ago"||c<7200&&"1 hour ago"||c<86400&&Math.floor(c/3600)+" hours ago")||a==1&&"Yesterday"||a<7&&a+" days ago"||a<31&&Math.ceil(a/7)+" weeks ago"}$(document).ready(function(){$("#main").height($("#container").innerHeight()-$("header").outerHeight()-$("footer").outerHeight());$(window).resize(function(){$("#main").height($("#container").innerHeight()-$("header").outerHeight()-$("footer").outerHeight())});function a(){return function(){if(!window_focus){return false}$(".Twitter .new").show();$.getJSON("https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=mellehofman&count=10&callback=?&page=1",function(d){cpo.loadTweets({pos:"prepend",twitter:d});$(".Twitter .new").hide()})}}$(".Twitter").scroll(function(h){var d=$(this),g,f=0;if(d.scrollTop()===0){a()()}if(d.outerHeight()===(d.get(0).scrollHeight-d.scrollTop())){d.find(".more").show();cpo.getTwitter({end:function(){$(".Twitter").find(".more").hide()}})}});setInterval(a(),60000);cpo.getTwitter({end:function(){$(".Twitter").removeClass("loading")}});if(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/)){$("head meta[name=viewport]").remove();$("head").prepend('');$(window).scroll(function(d){if(window.scrollHandler){clearTimeout(window.scrollHandler) }window.scrollHandler=setTimeout(function(){var e=window.scrollX,f;if(e!=0&&e!=320&&e!=640){f=Math.round(e/320);window.scrollTo(f*320,0);$("footer .mobile .page").removeClass("active");$("footer .mobile .page.p"+f*320).addClass("active")}else{$("footer .mobile .page").removeClass("active");$("footer .mobile .page.p"+e).addClass("active")}},25)});var c=Math.round(window.scrollX/320);window.scrollTo(c*320,0);$("footer .mobile .page.p"+c*320).addClass("active")}else{if(!navigator.userAgent.match(/iPad/i)&&(!navigator.userAgent.match(/OS X/i)||navigator.userAgent.match(/Firefox/i))){var b=$(".Facebook, .Twitter, .linkedIn");b.css("overflow-y","hidden");b=cpo.pam(b,function(d,e,g){var f=function(j){var i=$(e),h,k;j=(j)?j:window.event;h=(j.detail)?j.detail:j.wheelDelta;if(e.scrollHeight-i.height()<=0){return false}if(e.timeFades){clearTimeout(e.timeFades)}k=(i.height()*100)/e.scrollHeight;i.find(".scrollBar").css("height",k*3+"px");e.scrollTop+=($.browser.msie)?h*0.1:h*4;i.find(".scrollBar").css({top:(e.scrollTop*((i.height()-i.find(".scrollBar").height()-6)/(e.scrollHeight-i.height())))+i.position().top,left:i.position().left+i.width()-8,display:"block"});e.timeFades=setTimeout(function(){i.find(".scrollBar").fadeOut()},500)};if(e.addEventListener){e.addEventListener("DOMMouseScroll",function(h){f(h)},false);e.addEventListener("mousewheel",function(h){f(h)},false)}else{if(e.attachEvent){e.attachEvent("onmousewheel",function(h){f(h)})}else{$(e).css("overflow-y","auto")}}return e})}}$(window).focus(function(){window_focus=true}).blur(function(){window_focus=false});$(".linkedIn h2, .linkedIn h3").click(function(){$(".linkedIn .content").hide("blind");$(this).next(".content").show("blind")});$("a").attr("target","_blank")});