/*!
 * jQuery Templates Plugin 1.0.0pre
 * http://github.com/jquery/jquery-tmpl
 * Requires jQuery 1.4.2 (07.01.2011)
 *
 * Copyright Software Freedom Conservancy, Inc.
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 */
 
(function(d){function s(a,b,e,c){c={data:c||(b?b.data:{}),_wrap:b?b._wrap:null,tmpl:null,parent:b||null,nodes:[],calls:I,nest:J,wrap:K,html:L,update:M};a&&d.extend(c,a,{nodes:[],parent:b});if(e){c.tmpl=e;c._ctnt=c._ctnt||c.tmpl(d,c);c.key=++t;(y.length?u:l)[t]=c}return c}function v(a,b,e){var c;e=e?d.map(e,function(f){return typeof f==="string"?a.key?f.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+q+'="'+a.key+'" $2'):f:v(f,a,f._ctnt)}):a;if(b)return e;e=e.join("");e.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,
function(f,g,h,j){c=d(h).get();B(c);if(g)c=z(g).concat(c);if(j)c=c.concat(z(j))});return c?c:z(e)}function z(a){var b=document.createElement("div");b.innerHTML=a;return d.makeArray(b.childNodes)}function C(a){return new Function("jQuery","$item","var $=jQuery,call,_=[],$data=$item.data;with($data){_.push('"+d.trim(a).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,
function(b,e,c,f,g,h,j){b=d.tmpl.tag[c];if(!b)throw"Template command not found: "+c;c=b._default||[];if(h&&!/\w$/.test(g)){g+=h;h=""}if(g){g=w(g);j=j?","+w(j)+")":h?")":"";j=h?g.indexOf(".")>-1?g+w(h):"("+g+").call($item"+j:g;h=h?j:"(typeof("+g+")==='function'?("+g+").call($item):("+g+"))"}else h=j=c.$1||"null";f=w(f);return"');"+b[e?"close":"open"].split("$notnull_1").join(g?"typeof("+g+")!=='undefined' && ("+g+")!=null":"true").split("$1a").join(h).split("$1").join(j).split("$2").join(f||c.$2||
"")+"_.push('"})+"');}return _;")}function D(a,b){a._wrap=v(a,true,d.isArray(b)?b:[E.test(b)?b:d(b).html()]).join("")}function w(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function B(a){function b(o){function F(A){A+=e;i=g[A]=g[A]||s(i,l[i.parent.key+e]||i.parent)}var m,k=o,i,r;if(r=o.getAttribute(q)){for(;k.parentNode&&(k=k.parentNode).nodeType===1&&!(m=k.getAttribute(q)););if(m!==r){k=k.parentNode?k.nodeType===11?0:k.getAttribute(q)||0:0;if(!(i=l[r])){i=u[r];i=s(i,l[k]||u[k]);
i.key=++t;l[t]=i}n&&F(r)}o.removeAttribute(q)}else if(n&&(i=d.data(o,"tmplItem"))){F(i.key);l[i.key]=i;k=(k=d.data(o.parentNode,"tmplItem"))?k.key:0}if(i){for(m=i;m&&m.key!=k;){m.nodes.push(o);m=m.parent}delete i._ctnt;delete i._wrap;d.data(o,"tmplItem",i)}}var e="_"+n,c,f,g={},h,j,p;h=0;for(j=a.length;h<j;h++)if((c=a[h]).nodeType===1){f=c.getElementsByTagName("*");for(p=f.length-1;p>=0;p--)b(f[p]);b(c)}}function I(a,b,e,c){if(!a)return y.pop();y.push({_:a,tmpl:b,item:this,data:e,options:c})}function J(a,
b,e){return d.tmpl(d.template(a),b,e,this)}function K(a,b){var e=a.options||{};e.wrapped=b;return d.tmpl(d.template(a.tmpl),a.data,e,a.item)}function L(a,b){var e=this._wrap;return d.map(d(d.isArray(e)?e.join(""):e).filter(a||"*"),function(c){if(b)c=c.innerText||c.textContent;else{var f;if(!(f=c.outerHTML)){f=document.createElement("div");f.appendChild(c.cloneNode(true));f=f.innerHTML}c=f}return c})}function M(){var a=this.nodes;d.tmpl(null,null,null,this).insertBefore(a[0]);d(a).remove()}var G=d.fn.domManip,
q="_tmplitem",E=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,l={},u={},x,H={key:0,data:{}},t=0,n=0,y=[];d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(e){var c=[];e=d(e);var f,g,h;f=this.length===1&&this[0].parentNode;x=l||{};if(f&&f.nodeType===11&&f.childNodes.length===1&&e.length===1){e[b](this[0]);c=this}else{g=0;for(h=e.length;g<h;g++){n=g;f=(g>0?this.clone(true):this).get();d(e[g])[b](f);c=c.concat(f)}n=0;
c=this.pushStack(c,a,e.selector)}e=x;x=null;d.tmpl.complete(e);return c}});d.fn.extend({tmpl:function(a,b,e){return d.tmpl(this[0],a,b,e)},tmplItem:function(){return d.tmplItem(this[0])},template:function(a){return d.template(a,this[0])},domManip:function(a,b,e){if(a[0]&&d.isArray(a[0])){for(var c=d.makeArray(arguments),f=a[0],g=f.length,h=0,j;h<g&&!(j=d.data(f[h++],"tmplItem")););if(j&&n)c[2]=function(p){d.tmpl.afterManip(this,p,e)};G.apply(this,c)}else G.apply(this,arguments);n=0;x||d.tmpl.complete(l);
return this}});d.extend({tmpl:function(a,b,e,c){var f=!c;if(f){c=H;a=d.template[a]||d.template(null,a);u={}}else if(!a){a=c.tmpl;l[c.key]=c;c.nodes=[];c.wrapped&&D(c,c.wrapped);return d(v(c,null,c.tmpl(d,c)))}if(!a)return[];if(typeof b==="function")b=b.call(c||{});e&&e.wrapped&&D(e,e.wrapped);b=d.isArray(b)?d.map(b,function(g){return g?s(e,c,a,g):null}):[s(e,c,a,b)];return f?d(v(c,null,b)):b},tmplItem:function(a){var b;if(a instanceof d)a=a[0];for(;a&&a.nodeType===1&&!(b=d.data(a,"tmplItem"))&&(a=
a.parentNode););return b||H},template:function(a,b){if(b){if(typeof b==="string")b=C(b);else if(b instanceof d)b=b[0]||{};if(b.nodeType)b=d.data(b,"tmpl")||d.data(b,"tmpl",C(b.innerHTML));return typeof a==="string"?d.template[a]=b:b}return a?typeof a!=="string"?d.template(null,a):d.template[a]||d.template(null,E.test(a)?a:d(a)):null},encode:function(a){return(""+a).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});d.extend(d.tmpl,{tag:{tmpl:{_default:{$2:"null"},
open:"if($notnull_1){_=_.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(_,$1,$2);_=[];",close:"call=$item.calls();_=call._.concat($item.wrap(call,_));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){_.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){_.push($.encode($1a));}"},
"!":{open:""}},complete:function(){l={}},afterManip:function(a,b,e){var c=b.nodeType===11?d.makeArray(b.childNodes):b.nodeType===1?[b]:[];e.call(a,b);B(c);n++}})})(jQuery);


/*
 * jQuery hashchange event - v1.3 - 7/21/2010
 * http://benalman.com/projects/jquery-hashchange-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('<script>document.domain="'+t+'"<\/script>');u.close();q.location.hash=v}}})();return j})()})(jQuery,this);

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 */

jQuery.easing.jswing=jQuery.easing.swing;
jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,a,c,b,d){return jQuery.easing[jQuery.easing.def](e,a,c,b,d)},easeInQuad:function(e,a,c,b,d){return b*(a/=d)*a+c},easeOutQuad:function(e,a,c,b,d){return-b*(a/=d)*(a-2)+c},easeInOutQuad:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a+c;return-b/2*(--a*(a-2)-1)+c},easeInCubic:function(e,a,c,b,d){return b*(a/=d)*a*a+c},easeOutCubic:function(e,a,c,b,d){return b*((a=a/d-1)*a*a+1)+c},easeInOutCubic:function(e,a,c,b,d){if((a/=d/2)<1)return b/
2*a*a*a+c;return b/2*((a-=2)*a*a+2)+c},easeInQuart:function(e,a,c,b,d){return b*(a/=d)*a*a*a+c},easeOutQuart:function(e,a,c,b,d){return-b*((a=a/d-1)*a*a*a-1)+c},easeInOutQuart:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a+c;return-b/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(e,a,c,b,d){return b*(a/=d)*a*a*a*a+c},easeOutQuint:function(e,a,c,b,d){return b*((a=a/d-1)*a*a*a*a+1)+c},easeInOutQuint:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a*a+c;return b/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(e,
a,c,b,d){return-b*Math.cos(a/d*(Math.PI/2))+b+c},easeOutSine:function(e,a,c,b,d){return b*Math.sin(a/d*(Math.PI/2))+c},easeInOutSine:function(e,a,c,b,d){return-b/2*(Math.cos(Math.PI*a/d)-1)+c},easeInExpo:function(e,a,c,b,d){return a==0?c:b*Math.pow(2,10*(a/d-1))+c},easeOutExpo:function(e,a,c,b,d){return a==d?c+b:b*(-Math.pow(2,-10*a/d)+1)+c},easeInOutExpo:function(e,a,c,b,d){if(a==0)return c;if(a==d)return c+b;if((a/=d/2)<1)return b/2*Math.pow(2,10*(a-1))+c;return b/2*(-Math.pow(2,-10*--a)+2)+c},
easeInCirc:function(e,a,c,b,d){return-b*(Math.sqrt(1-(a/=d)*a)-1)+c},easeOutCirc:function(e,a,c,b,d){return b*Math.sqrt(1-(a=a/d-1)*a)+c},easeInOutCirc:function(e,a,c,b,d){if((a/=d/2)<1)return-b/2*(Math.sqrt(1-a*a)-1)+c;return b/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(a==0)return c;if((a/=d)==1)return c+b;f||(f=d*0.3);if(g<Math.abs(b)){g=b;e=f/4}else e=f/(2*Math.PI)*Math.asin(b/g);return-(g*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f))+c},easeOutElastic:function(e,
a,c,b,d){e=1.70158;var f=0,g=b;if(a==0)return c;if((a/=d)==1)return c+b;f||(f=d*0.3);if(g<Math.abs(b)){g=b;e=f/4}else e=f/(2*Math.PI)*Math.asin(b/g);return g*Math.pow(2,-10*a)*Math.sin((a*d-e)*2*Math.PI/f)+b+c},easeInOutElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(a==0)return c;if((a/=d/2)==2)return c+b;f||(f=d*0.3*1.5);if(g<Math.abs(b)){g=b;e=f/4}else e=f/(2*Math.PI)*Math.asin(b/g);if(a<1)return-0.5*g*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f)+c;return g*Math.pow(2,-10*(a-=1))*Math.sin((a*
d-e)*2*Math.PI/f)*0.5+b+c},easeInBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;return b*(a/=d)*a*((f+1)*a-f)+c},easeOutBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;return b*((a=a/d-1)*a*((f+1)*a+f)+1)+c},easeInOutBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;if((a/=d/2)<1)return b/2*a*a*(((f*=1.525)+1)*a-f)+c;return b/2*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)+c},easeInBounce:function(e,a,c,b,d){return b-jQuery.easing.easeOutBounce(e,d-a,0,b,d)+c},easeOutBounce:function(e,a,c,b,d){return(a/=
d)<1/2.75?b*7.5625*a*a+c:a<2/2.75?b*(7.5625*(a-=1.5/2.75)*a+0.75)+c:a<2.5/2.75?b*(7.5625*(a-=2.25/2.75)*a+0.9375)+c:b*(7.5625*(a-=2.625/2.75)*a+0.984375)+c},easeInOutBounce:function(e,a,c,b,d){if(a<d/2)return jQuery.easing.easeInBounce(e,a*2,0,b,d)*0.5+c;return jQuery.easing.easeOutBounce(e,a*2-d,0,b,d)*0.5+b*0.5+c}});


/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 5/25/2009
 * @author Ariel Flesler
 * @version 1.4.2
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);

(function(a){a.fn.yasp=function(g){var h=[];g&&a.extend(a.fn.yasp.defaults,g);this.each(function(){var c=a(this),b,i,f,d,e;b=c.attr("class");f=(i=c.attr("rel"))||c.text();d=c.html();e=f.replace(/\s\(\w*\)\s/,"@").replace(/\s\[\w*\]\s/g,".");if(!d||d===f)d=e;b=a.fn.yasp.defaults.linktext!==undefined&&!i?a('<a class="'+b+'" href="mailto:'+e+'" title="'+a.fn.yasp.defaults.title+'">'+a.fn.yasp.defaults.linktext+"</a>"):a('<a class="'+b+'" href="mailto:'+e+'" title="'+a.fn.yasp.defaults.title+'">'+d+"</a>");
c.replaceWith(b);h.push(b[0])});return a(h)};a.fn.yasp.defaults={linktext:undefined,title:"eMail address"}})(jQuery);$(function(){function i(){$("#tgl").find("h3").wrapInner("<a href='#' class='klappe' title='weiter lesen'></a>").end().find(".txt").not(":first").hide().end().end().find(".klappe").click(function(a){a.preventDefault();$("#tgl .txt").hide();$(this).blur().parent().next(".txt").show();d.scrollTo(0,$(this).offset().top)})}function j(a){a.find("p").text("Twitter Feed momentan leider nicht verf\u00fcgbar.").end().delay(3E3).fadeOut("slow",function(){$(this).next().css("margin-top","0px")})}var d=window,
k=document,e,f=$("#twitter"),g=$("#header"),l=g.position().top+g.height(),c=true,b=$("#totop");k.body.className="js";if(navigator.platform.indexOf("iPad")!==-1){$(".footer").css("position","relative");$("ul.smIcons li").css("margin-right","5px")}$("#postfuermich, #post2, #post3").yasp({title:"eMail senden"});$("#tgl").length&&i();b.hide().click(function(a){a.preventDefault();c=false;$.scrollTo("#header",500,{easing:"easeOutExpo",onAfter:function(){c=true;b.hide()}})});$(d).scroll(function(){if(c)$(this).scrollTop()>=
l?b.show():b.hide()});e=setTimeout(function(){j(f)},1E4);$.getJSON("http://twitter.com/statuses/user_timeline/bjoernwibben.json?callback=?",function(a){var m=a[0].user.profile_image_url,h=a[0].user.screen_name;a=a[0].text.replace(/((mailto\:|(news|(ht|f)tp(s?))\:\/\/){1}\S[^\)|\]|\}|\,|\s\”\“]+)/g,'<a href="$1" target="_blank">$1</a>').replace(/([\s|\.|\!|\?\”\“])\@(\w*)/g,'$1@<a href="http://twitter.com/$2" target="_blank">$2</a>').replace(/^\@(\w*)/g,'@<a href="http://twitter.com/$1" target="_blank">$1</a>').replace(/([\s|\.|\!|\?\”\“])\#(\w*)/g,
' #<a href="http://search.twitter.com/search?q=%23$2" target="_blank">$2</a>');f.html('<h2><a href="http://twitter.com/'+h+'" target="_blank">Twitter</a></h2><p><img src="'+m+'" height="48" width="48" alt="Avatar bjoernwibben @ twitter"/><strong>'+h+":</strong> "+a+"</p>")}).always(function(){clearTimeout(e)})});

