jQuery(document).ready(function(){
	input(3);
	noSpam();
});

function input(topValue){
	jQuery('input[type=password], input[type=text]').each(function(){
		var $this = jQuery(this);
		if($this.attr('alt') !== '' && jQuery.trim($this.attr('value')) === ''){
			$this.after('<span class="label">'+$this.attr('alt')+'</span>');
			var $label = $this.next('.label');
			$label.css({
				'color':'#aaa',
				'padding':'10px',
				'position':'absolute',
				'top':$this.position().top-topValue,
				'left':$this.position().left,
				'text-shadow':'none'
			});
			if($this.attr('value') !== ''){
				$this.next('.label').hide();
			}
		}
	});
	
	jQuery('.label').click(function(){
		jQuery(this).hide();
		jQuery(this).prev('input').focus();
	});
	
	jQuery('input[type=password], input[type=text]').focus(function(){
		if(jQuery(this).attr('alt') !== ''){
			jQuery(this).next('.label').hide();
		}
	});
	
	jQuery('input[type=password], input[type=text]').blur(function(){
		if(jQuery(this).attr('alt') !== '' && jQuery(this).attr('value') === ''){
			jQuery(this).next('.label').show();
		}
	});
}
jQuery(document).ready(function(){			  
	noSpam();
	smoothscroll();
	jQuery('#gototop').topLink({fadeSpeed: 300});	
	if(jQuery('a[rel^=lightbox]').length > 0){
		jQuery('a[rel^=lightbox]').fancybox({
					'overlayShow'	: true,
					'transitionIn'	: 'elastic',
					'transitionOut'	: 'elastic'				
		});
	}
	if(jQuery('a.xxx').length > 0){
		jQuery('a.xxx').fancybox({
				'overlayShow'	: true,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
				'width'				: '50%',
				'height'			: '75%',
				'type' : 'iframe',
				'autoScale'			: false
		});
	}
	jQuery('body').prepend('<div id="cboxOverlay"></div>');
	$overlay = jQuery('#cboxOverlay');
	$overlay.css({
		position:'fixed',
		width:'100%',
		height:'100%',
		background:'#000',
		zIndex:999
	}).fadeOut(0);
});
	
function noSpam(){
	jQuery('a.email').each(function(){
		jQuery(this).find('span').first().html('@');
		jQuery(this).attr('href','mailto:'+jQuery(this).text());
	});
}

/*
 * jQuery Tooltip plugin 1.3
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
 * http://docs.jquery.com/Plugins/Tooltip
 *
 * Copyright (c) 2006 - 2008 Jörn Zaefferer
 *
 * $Id: jquery.tooltip.js 5741 2008-06-21 15:22:16Z joern.zaefferer $
 * 
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else
show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)helper.body.append("<br/>");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else
helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else
helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))helper.parent.stop().fadeTo(tsettings.fade,0,complete);else
helper.parent.stop().fadeOut(tsettings.fade,complete);}else
complete();if(settings(this).fixPNG)helper.parent.unfixPNG();}})(jQuery);

// form_validation v. 2.2 incl. newslettererror
//  ----------------------------
// | Euroweb Internet GmbH     |
//  ----------------------------
//	Last changed:	15. 02. 2011
// by Sebastian Pontow - s.pontow@euroweb.de
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('j 1h(J){9 4=0;9 2=\'\';9 8=\'\';9 e=\'\';9 6=\'\';1g(9 i=0;i<h.C("l").1f;i++){2=h.C("l")[i];5(2.I){8=h.o(2.I)}e=2.3;6=2.3.H(/ 4/,\'\');5(2.1j==J&&8){5(8.1l==\'1k\'){5(8.E==m){h.o(\'l-y\').3+=\' k D\'}b{9 F=h.o(\'l-y\').3.H(/ k D/,\'\');h.o(\'l-y\').3=F}}5(e.g(/k/)){5(8.14==\'13\'){5(8.17[1].18){2.3=6;2.3+=\' 4\';4=1}b{2.3=6}}b 5(8.1c==\'1b\'){5(8.E==v){2.3=6;2.3+=\' 4\';4=1}b{2.3=6}}b{5(8.n==\'\'){2.3=6;2.3+=\' 4\';4=1}b{2.3=6}}}5(e.g(/1o/)){9 x=G(8);5(!x&&!e.g(/k/)&&8.n!=\'\'){2.3=6;2.3+=\' 4\';4=1}b{2.3=6}5(!x&&e.g(/k/)){2.3=6;2.3+=\' 4\';4=1}b{5(4==0){2.3=6}}}5(e.g(/1n/)){9 z=12(8);5(!z&&8.n!=\'\'){2.3=6;2.3+=\' 4\';4=1}b{2.3=6}5(!z&&e.g(/k/)){2.3=6;2.3+=\' 4\';4=1}b{5(4==0){2.3=6}}}}}5(4===0){q m}b{9 $c=f(\'#1p\');$c.M(\'N\');$c.1s(\'<r>1t 1w B 1v 1u.</r> 1G 1q 1x 1D 1B 19 K&L;1F. 1z 1A K&L;1a 15 B <r 16="4">1d</r> 1i.<1e /><a 10="A">11 Q R&P;O</a>\').S(d);f(\'#t\').T(d,0.7);f(\'#A\').X(\'W\',\'U\').V(j(){$c.s(d);f(\'#t\').s(d)});q v}}j G(u){9 p=(1E(1m(u.n))==m)?v:m;q p}j 12(u){9 p=(u.n.g(/^[\\w\\.\\-]+@([\\w\\-]+\\.)+[a-1C-Z]+$/))?m:v;q p}j 1r(){9 $c=f(\'#1y\');$c.1H(\'<a 10="Y">11 Q R&P;O</a>\');$c.M(\'N\');$c.S(d);f(\'#t\').T(d,0.7);f(\'#Y\').X(\'W\',\'U\').V(j(){$c.s(d);f(\'#t\').s(d)})}',62,106,'||currentLabel|className|error|if|newClass||currentField|var||else|errorbox|300|klasse|jQuery|match|document||function|required|label|true|value|getElementById|returnvar|return|strong|fadeOut|cboxOverlay|field|false||numeric|telefon|valid|errorclose|sind|getElementsByTagName|rueckruf|checked|newTelClass|isNumber|replace|htmlFor|formular|ausgef|uuml|appendTo|body|en|szlig|Meldung|schlie|fadeIn|fadeTo|pointer|click|cursor|css|errorclose2||id|Diese|isMailValid|SELECT|tagName|Punkte|class|childNodes|selected|Pflichtfelder|llten|checkbox|type|rot|br|length|for|validateForm|gekennzeichnet|form|Rueckruf|name|parseInt|mail|number|fehlermeldung|haben|newsletterError|html|Beim|aufgetreten|Fehler|Abschicken|eventuell|fehlermeldung2|Die|falsch|alle|zA|nicht|isNaN|llt|Sie|append'.split('|'),0,{}))


// smoothscroll and gototop-button
//	Last changed:	Sebastian Pontow - s.pontow@euroweb.de
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('2.z.y=5(6){6=2.A({b:B},6);3 g;3 f=c;3 $e=2(8);3 $7=2(7);3 d=2(D.o).x(0).E().d;$7.t(5(){7.u(g);g=7.w(5(){9($7.p()<=d){f=c;$e.m(6.b)}K 9(f==c){f=h;$e.F(h,h).N(6.b).n(5(){$e.m(6.b)})}},G)})};5 H(){2(\'a[J*=#]\').n(5(){9(j.k.i(/^\\//,\'\')==8.k.i(/^\\//,\'\')&&j.l==8.l){3 $4=2(8.r);$4=$4.q&&$4||2(\'[M=\'+8.r.I(1)+\']\');9($4.q){3 s=$4.L().d;2(\'P,o\').O({p:s},C);v c}}})};',52,52,'||jQuery|var|target|function|settings|window|this|if||fadeSpeed|false|top|message|displayed|scroll_timer|true|replace|location|pathname|hostname|fadeOut|click|body|scrollTop|length|hash|targetOffset|scroll|clearTimeout|return|setTimeout|children|topLink|fn|extend|200|1000|document|position|stop|100|smoothscroll|slice|href|else|offset|name|fadeIn|animate|html'.split('|'),0,{}))

var timeOutFadeIn;

jQuery(document).ready(function(){
	jQuery(window).load(function(){
		jQuery('#fade').css('display', 'none').css('visibility', 'visible');
		window.clearTimeout(timeOutFadeIn);
		timeOutFadeIn = window.setTimeout(function(){
		jQuery('#fade').fadeIn(600);
		},1600);
	});	

});

jQuery(document).ready(function(){
	jQuery('#content img').hover(function() {
		jQuery(this).fadeTo(115, 0.7);
	}, function() {
		jQuery(this).fadeTo(180, 1);
	});
});

