function changeContent(a){$(active).hide("slow");$("#nav"+active.substr(1)).animate({color:leGray});if(active!=a){active=a;$("#wurscht").hide(0,function(){wurschtready=false});$(active).show("slow",function(){if(active=="#referenzen"){$("#wurscht").show(350,function(){wurschtready=true})}})}else{active="#none";$("#wurscht").hide(0,function(){wurschtready=false})}}function moveWurscht(i){var position=eval(i.target.id);$(".refItem").stop();$(".refItem").animate({color:leContentGray},"fast");$("#leidernein").animate({color:leContentGray},"fast");$(i.target).animate({color:leGreen},"fast");$("#wurscht").stop();$("#wurscht").animate({left:position},1500)}function hideHausSwitch(){$("#hausswitch").stop();$("#hausswitch").animate({height:0,width:0})}(function(a,b){function d(a,b,c){c=(c+1)%1;if(c*6<1){return a+(b-a)*6*c}if(c*2<1){return b}if(c*3<2){return a+(b-a)*(2/3-c)*6}return a}function c(a,b,c){var d=j[b.type]||{},e=b.empty||c;if(e&&a==null){return null}if(b.def&&a==null){return b.def}if(d.floor){a=~~a}else{a=parseFloat(a)}if(a==null||isNaN(a)){return b.def}if(d.mod){a=a%d.mod;return a<0?d.mod+a:a}return d.min>a?d.min:d.max<a?d.max:a}var e="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color outlineColor".split(" "),f=/^([\-+])=\s*(\d+\.?\d*)/,g=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],h=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},i={rgba:{cache:"_rgba",props:{red:{idx:0,type:"byte",empty:true},green:{idx:1,type:"byte",empty:true},blue:{idx:2,type:"byte",empty:true},alpha:{idx:3,type:"percent",def:1}}},hsla:{cache:"_hsla",props:{hue:{idx:0,type:"degrees",empty:true},saturation:{idx:1,type:"percent",empty:true},lightness:{idx:2,type:"percent",empty:true}}}},j={"byte":{floor:true,min:0,max:255},percent:{min:0,max:1},degrees:{mod:360,floor:true}},k=i.rgba.props,l=h.support={},m,n=a.each;i.hsla.props.alpha=k.alpha;h.fn=h.prototype={constructor:h,parse:function(d,e,f,j){if(d===b){this._rgba=[null,null,null,null];return this}if(d instanceof a||d.nodeType){d=d instanceof a?d.css(e):a(d).css(e);e=b}var l=this,o=a.type(d),p=this._rgba=[],q;if(e!==b){d=[d,e,f,j];o="array"}if(o==="string"){d=d.toLowerCase();n(g,function(a,b){var c=b.re.exec(d),e=c&&b.parse(c),f,g=b.space||"rgba",h=i[g].cache;if(e){f=l[g](e);l[h]=f[h];p=l._rgba=f._rgba;return false}});if(p.length!==0){if(Math.max.apply(Math,p)===0){a.extend(p,m.transparent)}return this}d=m[d]||m._default;return this.parse(d)}if(o==="array"){n(k,function(a,b){p[b.idx]=c(d[b.idx],b)});return this}if(o==="object"){if(d instanceof h){n(i,function(a,b){if(d[b.cache]){l[b.cache]=d[b.cache].slice()}})}else{n(i,function(a,b){n(b.props,function(a,e){var f=b.cache;if(!l[f]&&b.to){if(d[a]==null||a==="alpha"){return}l[f]=b.to(l._rgba)}l[f][e.idx]=c(d[a],e,true)})})}return this}},is:function(a){var b=h(a),c=true,d=this;n(i,function(a,e){var f=b[e.cache],g;if(f){g=d[e.cache]||e.to&&e.to(d._rgba)||[];n(e.props,function(a,b){if(f[b.idx]!=null){c=f[b.idx]==g[b.idx];return c}})}return c});return c},_space:function(){var a=[],b=this;n(i,function(c,d){if(b[d.cache]){a.push(c)}});return a.pop()},transition:function(a,b){var d=h(a),e=d._space(),f=i[e],g=this[f.cache]||f.to(this._rgba),k=g.slice();d=d[f.cache];n(f.props,function(a,e){var f=e.idx,h=g[f],i=d[f],l=j[e.type]||{};if(i===null){return}if(h===null){k[f]=i}else{if(l.mod){if(i-h>l.mod/2){h+=l.mod}else if(h-i>l.mod/2){h-=l.mod}}k[e.idx]=c((i-h)*b+h,e)}});return this[e](k)},blend:function(b){if(this._rgba[3]===1){return this}var c=this._rgba.slice(),d=c.pop(),e=h(b)._rgba;return h(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return a==null?b>2?1:0:a});if(c[3]===1){c.pop();b="rgb("}return b+c.join(",")+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){if(a==null){a=b>2?1:0}if(b&&b<3){a=Math.round(a*100)+"%"}return a});if(c[3]==1){c.pop();b="hsl("}return b+c.join(",")+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();if(b){c.push(~~(d*255))}return"#"+a.map(c,function(a,b){a=(a||0).toString(16);return a.length==1?"0"+a:a}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}};h.fn.parse.prototype=h.fn;i.hsla.to=function(a){if(a[0]==null||a[1]==null||a[2]==null){return[null,null,null,a[3]]}var b=a[0]/255,c=a[1]/255,d=a[2]/255,e=a[3],f=Math.max(b,c,d),g=Math.min(b,c,d),h=f-g,i=f+g,j=i*.5,k,l;if(g===f){k=0}else if(b===f){k=60*(c-d)/h+360}else if(c===f){k=60*(d-b)/h+120}else{k=60*(b-c)/h+240}if(j===0||j===1){l=j}else if(j<=.5){l=h/i}else{l=h/(2-i)}return[Math.round(k)%360,l,j,e==null?1:e]};i.hsla.from=function(a){if(a[0]==null||a[1]==null||a[2]==null){return[null,null,null,a[3]]}var b=a[0]/360,c=a[1],e=a[2],f=a[3],g=e<=.5?e*(1+c):e+c-e*c,h=2*e-g,i,j,k;return[Math.round(d(h,g,b+1/3)*255),Math.round(d(h,g,b)*255),Math.round(d(h,g,b-1/3)*255),f]};n(i,function(d,e){var g=e.props,i=e.cache,j=e.to,k=e.from;h.fn[d]=function(d){if(j&&!this[i]){this[i]=j(this._rgba)}if(d===b){return this[i].slice()}var e=a.type(d),f=e==="array"||e==="object"?d:arguments,l=this[i].slice(),m;n(g,function(a,b){var d=f[e==="object"?a:b.idx];if(d==null){d=l[b.idx]}l[b.idx]=c(d,b)});if(k){m=h(k(l));m[i]=l;return m}else{return h(l)}};n(g,function(b,c){if(h.fn[b]){return}h.fn[b]=function(e){var g=a.type(e),h=b==="alpha"?this._hsla?"hsla":"rgba":d,i=this[h](),j=i[c.idx],k;if(g==="undefined"){return j}if(g==="function"){e=e.call(this,j);g=a.type(e)}if(e==null&&c.empty){return this}if(g==="string"){k=f.exec(e);if(k){e=j+parseFloat(k[2])*(k[1]==="+"?1:-1)}}i[c.idx]=e;return this[h](i)}})});n(e,function(b,c){a.cssHooks[c]={set:function(b,d){d=h(d);if(!l.rgba&&d._rgba[3]!==1){var e,f=c==="backgroundColor"?b.parentNode:b;do{e=a.curCSS(f,"backgroundColor")}while((e===""||e==="transparent")&&(f=f.parentNode)&&f.style);d=d.blend(e&&e!=="transparent"?e:"_default")}d=d.toRgbaString();b.style[c]=d}};a.fx.step[c]=function(b){if(!b.colorInit){b.start=h(b.elem,c);b.end=h(b.end);b.colorInit=true}a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}});a(function(){var a=document.createElement("div"),b=a.style;b.cssText="background-color:rgba(1,1,1,.5)";l.rgba=b.backgroundColor.indexOf("rgba")>-1});m=a.Color.names={aqua:"#00ffff",azure:"#f0ffff",beige:"#f5f5dc",black:"#000000",blue:"#0000ff",brown:"#a52a2a",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkviolet:"#9400d3",fuchsia:"#ff00ff",gold:"#ffd700",green:"#008000",indigo:"#4b0082",khaki:"#f0e68c",lightblue:"#add8e6",lightcyan:"#e0ffff",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightyellow:"#ffffe0",lime:"#00ff00",magenta:"#ff00ff",maroon:"#800000",navy:"#000080",olive:"#808000",orange:"#ffa500",pink:"#ffc0cb",purple:"#800080",violet:"#800080",red:"#ff0000",silver:"#c0c0c0",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);x00=-0;x01=-698;x02=-1289;x03=-1581;x04=-1785;x05=-2505;x06=-2894;x07=-3215;x08=-3739;x09=-3887;x10=-4041;x11=-4695;x12=-5212;x13=-5570;x14=-6443;x15=-7675;x16=-7807;x17=-8118;x18=-8266;x19=-8639;x20=-8943;x21=-9471;x22=-10028;x23=-10811;x24=-11249;x25=-11995;x26=-12569;x27=-12953;x28=-13249;x29=-14040;leidernein=-200;leGreen="#ADC401";leGray="#b0b0b0";leContentGray="#878787";active="#none";wurschtready=false;leiderneinactive=false;ajaxstatus=null;$(document).ready(function(){$.ajax({url:"data.php?p=all",success:function(a){ajaxstatus="good";$("#content").html(a).children().hide();$("#wurscht").append('<img id="wurschtimg" src="img/leiste.jpg" alt="referenzen"><img id="leiderneinimg" src="img/leidernein.jpg" alt="leidernein" style="display: none">').hide();$("#leiderneintext").html('<span style="color: black;">... und Projekte,</span><span id="leidernein"> die es fast geschafft haben und uns am Herzen liegen</span>');$("#haus").prepend('<img id="hausswitch" src="img/hausswitch.jpg" alt="haus" style="height:0px; width:0px;position: absolute; left:0px; bottom:6px;" >')},error:function(){ajaxstatus="fail"}});if($(window).height()<600){$("#watermark").hide()}});$(window).resize(function(){if($(window).height()<600){$("#watermark").hide("slow")}else{$("#watermark").show("slow")}});$("#nav a").on("click",function(){if(ajaxstatus==null){$("#content").html("Bitte warten Sie, bis die Seite geladen ist");return false}else if(ajaxstatus=="good"){return false}return true});$("body").on("dragstart","#wurscht",function(){return false});$("body").on("contextmenu","#wurscht",function(){return false});$(".navItem").on("mouseenter",function(a){if(!a.target.id.match(active.substr(1))){$(a.target).animate({color:leGreen})}});$(".navItem").on("mouseout",function(a){if(!a.target.id.match(active.substr(1))){$(a.target).animate({color:leGray})}});$("#navprofil").on("click",function(){changeContent("#profil")});$("#navkompetenz").on("click",function(){changeContent("#kompetenz")});$("#navreferenzen").on("click",function(){changeContent("#referenzen")});$("#navkunden").on("click",function(){changeContent("#kunden")});$("#navkontakt").on("click",function(){changeContent("#kontakt")});$("body").on("mouseenter click",".refItem",function(a){if(wurschtready){if(leiderneinactive){leiderneinactive=false;$("#leiderneinimg").hide("slow");$("#wurschtimg").show("slow")}moveWurscht(a)}});$("body").on("mouseenter click","#leidernein",function(a){if(wurschtready){if(!leiderneinactive){leiderneinactive=true;$("#wurschtimg").hide("slow");$("#leiderneinimg").show("slow")}moveWurscht(a)}});$("body").on("click","#wurscht",function(a){var b=a.pageX-$(this).offset().left;$(".refItem").animate({color:leContentGray},"fast");$("#wurscht").stop();$("#wurscht").animate({left:b*-1+50},"slow")});$("body").on("mouseenter","#haus",function(){$("#hausswitch").stop();$("#hausswitch").animate({width:146,height:94,bottom:6})});$("body").on("mouseleave","#haus",function(){hideHausSwitch();});$("body").on("click","#hausswitch",function(){hideHausSwitch();})
