(function($){function fixTitle(a){if(a.attr('title')||typeof(a.attr('original-title'))!='string'){a.attr('original-title',a.attr('title')||'').removeAttr('title')}}function Tipsy(a,b){this.$element=$(a);this.options=b;this.enabled=true;fixTitle(this.$element)}Tipsy.prototype={show:function(){var a=this.getTitle();if(a&&this.enabled){var b=this.tip();b.find('.tipsy-inner')[this.options.html?'html':'text'](a);b[0].className='tipsy';b.remove().css({top:0,left:0,visibility:'hidden',display:'block'}).appendTo(document.body);var c=$.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var d=b[0].offsetWidth,actualHeight=b[0].offsetHeight;var e=(typeof this.options.gravity=='function')?this.options.gravity.call(this.$element[0]):this.options.gravity;var f;switch(e.charAt(0)){case'n':f={top:c.top+c.height+this.options.offset,left:c.left+c.width/2-d/2};break;case's':f={top:c.top-actualHeight-this.options.offset,left:c.left+c.width/2-d/2};break;case'e':f={top:c.top+c.height/2-actualHeight/2,left:c.left-d-this.options.offset};break;case'w':f={top:c.top+c.height/2-actualHeight/2,left:c.left+c.width+this.options.offset};break}if(e.length==2){if(e.charAt(1)=='w'){f.left=c.left+c.width/2-15}else{f.left=c.left+c.width/2-d+15}}b.css(f).addClass('tipsy-'+e);if(this.options.fade){b.stop().css({opacity:0,display:'block',visibility:'visible'}).animate({opacity:this.options.opacity})}else{b.css({visibility:'visible',opacity:this.options.opacity})}}},hide:function(){if(this.options.fade){this.tip().stop().fadeOut(function(){$(this).remove()})}else{this.tip().remove()}},getTitle:function(){var a,$e=this.$element,o=this.options;fixTitle($e);var a,o=this.options;if(typeof o.title=='string'){a=$e.attr(o.title=='title'?'original-title':o.title)}else if(typeof o.title=='function'){a=o.title.call($e[0])}a=(''+a).replace(/(^\s*|\s*$)/,"");return a||o.fallback},tip:function(){if(!this.$tip){this.$tip=$('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"/></div>')}return this.$tip},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled}};$.fn.tipsy=function(c){if(c===true){return this.data('tipsy')}else if(typeof c=='string'){return this.data('tipsy')[c]()}c=$.extend({},$.fn.tipsy.defaults,c);function get(a){var b=$.data(a,'tipsy');if(!b){b=new Tipsy(a,$.fn.tipsy.elementOptions(a,c));$.data(a,'tipsy',b)}return b}function enter(){var a=get(this);a.hoverState='in';if(c.delayIn==0){a.show()}else{setTimeout(function(){if(a.hoverState=='in')a.show()},c.delayIn)}};function leave(){var a=get(this);a.hoverState='out';if(c.delayOut==0){a.hide()}else{setTimeout(function(){if(a.hoverState=='out')a.hide()},c.delayOut)}};if(!c.live)this.each(function(){get(this)});if(c.trigger!='manual'){var d=c.live?'live':'bind',eventIn=c.trigger=='hover'?'mouseenter':'focus',eventOut=c.trigger=='hover'?'mouseleave':'blur';this[d](eventIn,enter)[d](eventOut,leave)}return this};$.fn.tipsy.defaults={delayIn:0,delayOut:0,fade:false,fallback:'',gravity:'n',html:false,live:false,offset:0,opacity:1,title:'title',trigger:'hover'};$.fn.tipsy.elementOptions=function(a,b){return $.metadata?$.extend({},b,$(a).metadata()):b};$.fn.tipsy.autoNS=function(){return $(this).offset().top>($(document).scrollTop()+$(window).height()/2)?'s':'n'};$.fn.tipsy.autoWE=function(){return $(this).offset().left>($(document).scrollLeft()+$(window).width()/2)?'e':'w'}})(jQuery);

(function($){$.fn.lightBox=function(j){j=jQuery.extend({overlayBgColor:'#000',overlayOpacity:0.8,fixedNavigation:false,imageLoading:'/design/lightbox/lightbox-ico-loading.gif',imageBtnPrev:'/design/lightbox/lightbox_back.png',imageBtnNext:'/design/lightbox/lightbox_next.png',imageBtnClose:'/design/lightbox/lighbox_close.png',imageBlank:'/design/lightbox/lightbox-blank.gif',imageBtnPrint:'/design/lightbox/drucken.png',containerBorderSize:10,containerResizeSpeed:400,txtImage:'Bild',txtOf:'von',keyToClose:'c',keyToPrev:'p',keyToNext:'n',imageArray:[],activeImage:0},j);var k=this;function _initialize(){_start(this,k);return false}function _start(a,b){$('embed, object, select').css({'visibility':'hidden'});_set_interface();j.imageArray.length=0;j.activeImage=0;if(b.length==1){j.imageArray.push(new Array(a.getAttribute('src'),a.getAttribute('alt')))}else{for(var i=0;i<b.length;i++){j.imageArray.push(new Array(b[i].getAttribute('src'),b[i].getAttribute('alt')))}}while(j.imageArray[j.activeImage][0]!=a.getAttribute('src')){j.activeImage++}_set_image_to_view()}function _set_interface(){$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" 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="'+j.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a id="lightbox-print"><img src="'+j.imageBtnPrint+'"></a> <a href="#" id="lightbox-secNav-btnClose"><img src="'+j.imageBtnClose+'"></a></div></div></div></div>');var c=___getPageSize();$('#jquery-overlay').css({backgroundColor:j.overlayBgColor,opacity:j.overlayOpacity,width:c[0],height:c[1]}).fadeIn();var d=___getPageScroll();$('#jquery-lightbox').css({top:d[1]+(c[3]/10),left:d[0]}).show();$('#jquery-overlay,#jquery-lightbox').click(function(){_finish()});$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function(){_finish();return false});$(window).resize(function(){var a=___getPageSize();$('#jquery-overlay').css({width:a[0],height:a[1]});var b=___getPageScroll();$('#jquery-lightbox').css({top:b[1]+(a[3]/10),left:b[0]})})}function _set_image_to_view(){$('#lightbox-loading').show();if(j.fixedNavigation){$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide()}else{$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide()}var a=new Image();a.onload=function(){$('#lightbox-image').attr('src',j.imageArray[j.activeImage][0]);$('#lightbox-print').attr('href',j.imageArray[j.activeImage][0]);_resize_container_image_box(a.width,a.height);a.onload=function(){}};a.src=j.imageArray[j.activeImage][0]};function _resize_container_image_box(a,b){var c=$('#lightbox-container-image-box').width();var d=$('#lightbox-container-image-box').height();var e=(a+(j.containerBorderSize*2));var f=(b+(j.containerBorderSize*2));var g=c-e;var h=d-f;$('#lightbox-container-image-box').animate({width:e,height:f},j.containerResizeSpeed,function(){_show_image()});if((g==0)&&(h==0)){if($.browser.msie){___pause(250)}else{___pause(100)}}$('#lightbox-container-image-data-box').css({width:a});$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({height:b+(j.containerBorderSize*2)})};function _show_image(){$('#lightbox-loading').hide();$('#lightbox-image').fadeIn(function(){_show_image_data();_set_navigation()});_preload_neighbor_images()};function _show_image_data(){$('#lightbox-container-image-data-box').slideDown('fast');$('#lightbox-image-details-caption').hide();if(j.imageArray[j.activeImage][1]){$('#lightbox-image-details-caption').html(j.imageArray[j.activeImage][1]).show()}if(j.imageArray.length>1){$('#lightbox-image-details-currentNumber').html(j.txtImage+' '+(j.activeImage+1)+' '+j.txtOf+' '+j.imageArray.length).show()}}function _set_navigation(){$('#lightbox-nav').show();$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({'background':'transparent url('+j.imageBlank+') no-repeat'});if(j.activeImage!=0){if(j.fixedNavigation){$('#lightbox-nav-btnPrev').css({'background':'url('+j.imageBtnPrev+') left 15% no-repeat'}).unbind().bind('click',function(){j.activeImage=j.activeImage-1;_set_image_to_view();return false})}else{$('#lightbox-nav-btnPrev').unbind().hover(function(){$(this).css({'background':'url('+j.imageBtnPrev+') left 15% no-repeat'})},function(){$(this).css({'background':'transparent url('+j.imageBlank+') no-repeat'})}).show().bind('click',function(){j.activeImage=j.activeImage-1;_set_image_to_view();return false})}}if(j.activeImage!=(j.imageArray.length-1)){if(j.fixedNavigation){$('#lightbox-nav-btnNext').css({'background':'url('+j.imageBtnNext+') right 15% no-repeat'}).unbind().bind('click',function(){j.activeImage=j.activeImage+1;_set_image_to_view();return false})}else{$('#lightbox-nav-btnNext').unbind().hover(function(){$(this).css({'background':'url('+j.imageBtnNext+') right 15% no-repeat'})},function(){$(this).css({'background':'transparent url('+j.imageBlank+') no-repeat'})}).show().bind('click',function(){j.activeImage=j.activeImage+1;_set_image_to_view();return false})}}_enable_keyboard_navigation()}function _enable_keyboard_navigation(){$(document).keydown(function(a){_keyboard_action(a)})}function _disable_keyboard_navigation(){$(document).unbind()}function _keyboard_action(a){if(a==null){keycode=event.keyCode;escapeKey=27}else{keycode=a.keyCode;escapeKey=a.DOM_VK_ESCAPE}key=String.fromCharCode(keycode).toLowerCase();if((key==j.keyToClose)||(key=='x')||(keycode==escapeKey)){_finish()}if((key==j.keyToPrev)||(keycode==37)){if(j.activeImage!=0){j.activeImage=j.activeImage-1;_set_image_to_view();_disable_keyboard_navigation()}}if((key==j.keyToNext)||(keycode==39)){if(j.activeImage!=(j.imageArray.length-1)){j.activeImage=j.activeImage+1;_set_image_to_view();_disable_keyboard_navigation()}}}function _preload_neighbor_images(){if((j.imageArray.length-1)>j.activeImage){objNext=new Image();objNext.src=j.imageArray[j.activeImage+1][0]}if(j.activeImage>0){objPrev=new Image();objPrev.src=j.imageArray[j.activeImage-1][0]}}function _finish(){$('#jquery-lightbox').remove();$('#jquery-overlay').fadeOut(function(){$('#jquery-overlay').remove()});$('embed, object, select').css({'visibility':'visible'})}function ___getPageSize(){var a,yScroll;if(window.innerHeight&&window.scrollMaxY){a=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY}else if(document.body.scrollHeight>document.body.offsetHeight){a=document.body.scrollWidth;yScroll=document.body.scrollHeight}else{a=document.body.offsetWidth;yScroll=document.body.offsetHeight}var b,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){b=document.documentElement.clientWidth}else{b=self.innerWidth}windowHeight=self.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight}else if(document.body){b=document.body.clientWidth;windowHeight=document.body.clientHeight}if(yScroll<windowHeight){pageHeight=windowHeight}else{pageHeight=yScroll}if(a<b){pageWidth=a}else{pageWidth=b}arrayPageSize=new Array(pageWidth,pageHeight,b,windowHeight);return arrayPageSize};function ___getPageScroll(){var a,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;a=self.pageXOffset}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;a=document.documentElement.scrollLeft}else if(document.body){yScroll=document.body.scrollTop;a=document.body.scrollLeft}arrayPageScroll=new Array(a,yScroll);return arrayPageScroll};function ___pause(a){var b=new Date();c=null;do{var c=new Date()}while(c-b<a)};return this.unbind('click').click(_initialize)}})(jQuery); 

(function(d){d.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,b){d.fx.step[b]=function(a){if(a.state==0){a.start=getColor(a.elem,b);a.end=getRGB(a.end)}a.elem.style[b]="rgb("+[Math.max(Math.min(parseInt((a.pos*(a.end[0]-a.start[0]))+a.start[0]),255),0),Math.max(Math.min(parseInt((a.pos*(a.end[1]-a.start[1]))+a.start[1]),255),0),Math.max(Math.min(parseInt((a.pos*(a.end[2]-a.start[2]))+a.start[2]),255),0)].join(",")+")"}});function getRGB(a){var b;if(a&&a.constructor==Array&&a.length==3)return a;if(b=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a))return[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])];if(b=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(a))return[parseFloat(b[1])*2.55,parseFloat(b[2])*2.55,parseFloat(b[3])*2.55];if(b=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))return[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16)];if(b=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(a))return[parseInt(b[1]+b[1],16),parseInt(b[2]+b[2],16),parseInt(b[3]+b[3],16)];return e[d.trim(a).toLowerCase()]}function getColor(a,b){var c;do{c=d.curCSS(a,b);if(c!=''&&c!='transparent'||d.nodeName(a,"body"))break;b="backgroundColor"}while(a=a.parentNode);return getRGB(c)};var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
