$(document).ready(function() {

	$("#gallery a, ul.web-thumb a").fancybox({
		'zoomOpacity'			: true,
		'overlayShow'			: false,
		'zoomSpeedIn'			: 500,
		'zoomSpeedOut'			: 500
	});


	$(".btn-slide").click(function(){
		$("#vollbild-right").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".btn-web-regent").click(function(){
		$("#panel-web-regent").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});


	$(".btn-web-rapidnews").click(function(){
		$("#panel-web-rapidnews").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});


	$(".btn-web-gtu").click(function(){
		$("#panel-web-gtu").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".btn-web-uniquesupport").click(function(){
		$("#panel-web-uniquesupport").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".btn-web-demenga").click(function(){
		$("#panel-web-demenga").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".btn-web-autohausboss").click(function(){
		$("#panel-web-autohausboss").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".btn-web-hdg").click(function(){
		$("#panel-web-hdg").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".btn-web-ruheraum").click(function(){
		$("#panel-web-ruheraum").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".btn-web-tattooornot").click(function(){
		$("#panel-web-tattooornot").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".btn-web-morphexpert").click(function(){
		$("#panel-web-morphexpert").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".btn-web-sunservices").click(function(){
		$("#panel-web-sunservices").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".btn-web-yourip").click(function(){
		$("#panel-web-yourip").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".btn-web-herzarzt").click(function(){
		$("#panel-web-herzarzt").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".btn-web-camarata").click(function(){
		$("#panel-web-camarata").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".btn-web-kalkboedele").click(function(){
		$("#panel-web-kalkboedele").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});


	$(".btn-web-hairsun").click(function(){
		$("#panel-web-hairsun").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

	$(".tooltip a").hover(function() {
		$(this).next("em").animate({opacity: "show", top: "-75"}, "fast");
	}, function() {
		$(this).next("em").animate({opacity: "hide", top: "-85"}, "fast");
	});


});


jQuery(function( $ ){
	/**
	 * Demo binding and preparation, no need to read this part
	 */
		//borrowed from jQuery easing plugin
		//http://gsgd.co.uk/sandbox/jquery.easing.php
		$.easing.elasout = function(x, t, b, c, d) {
			var s=1.70158;var p=0;var a=c;
			if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
			if (a < Math.abs(c)) { a=c; var s=p/4; }
			else var s = p/(2*Math.PI) * Math.asin (c/a);
			return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
		};
		$('a.back').click(function(){
			$(this).parents('div.pane').scrollTo( 0, 800, { queue:true } );
			$(this).parents('div.section').find('span.message').text( this.title );
			return false;
		});
		//just for the example, to stop the click on the links.
		$('ul.links').click(function(e){
			e.preventDefault();
			var link = e.target;
			link.blur();
			if( link.title )
				$(this).parent().find('span.message').text(link.title);
		});
	
	//by default, the scroll is only done vertically ('y'), change it to both.
	$.scrollTo.defaults.axis = 'xy'; 			
	//this one is important, many browsers don't reset scroll on refreshes
	$('div.pane').scrollTo( 0 );//reset all scrollable panes to (0,0)
	$.scrollTo( 0 );//reset the screen to (0,0)
	
	//TOC, shows how to scroll the whole window
	$('#toc a').click(function(){//$.scrollTo works EXACTLY the same way, but scrolls the whole screen
		$.scrollTo( this.hash, 1500, { easing:'elasout' });
		$(this.hash).find('span.message').text( this.title );
		return false;
	});
	
	//Target examples bindings
	var $paneTarget = $('#pane-target');			
	
	//options examples bindings, they will all scroll to the same place, with different options
	function reset_o(){//before each animation, reset to (0,0), skip this.
		$paneOptions.stop().stop();
		$paneOptions[0].scrollLeft = $paneOptions[0].scrollTop = 0;
	};
	var $paneOptions = $('#pane-options');
	
});


$(document).ready(function(){
	$('input[type=checkbox],input[type=radio]').prettyCheckboxes();
});

$(document).ready(function(){

//Larger thumbnail preview 

$("ul.web-thumb li").hover(function() {
	$(this).css({'z-index' : '10'});
	$(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '-110px', 
			marginLeft: '-110px', 
			top: '50%', 
			left: '50%', 
			width: '174px', 
			height: '174px',
			padding: '20px' 
		}, 600);
	
	} , function() {
	$(this).css({'z-index' : '0'});
	$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '100px', 
			height: '100px', 
			padding: '5px'
		}, 400);
});

$(document).ready(function(){


	$(".listitem li a").jFade({
		trigger: "mouseover",
		property: 'color',
		start: '7e7e7e',
		end: 'FFFFFF',
		steps: 10,
		duration: 5
	}).jFade({
		trigger: "mouseout",
		property: 'color',
		start: 'FFFFFF',
		end: '7e7e7e',
		steps: 10,
		duration: 10
	});

	$(".listitem .open a").jFade({
		trigger: "mouseover",
		property: 'color',
		start: 'fdc857',
		end: 'FFFFFF',
		steps: 10,
		duration: 5
	}).jFade({
		trigger: "mouseout",
		property: 'color',
		start: 'FFFFFF',
		end: 'fdc857',
		steps: 10,
		duration: 10
	});

	$(".listitem .open li a").jFade({
		trigger: "mouseover",
		property: 'color',
		start: '7e7e7e',
		end: 'FFFFFF',
		steps: 10,
		duration: 5
	}).jFade({
		trigger: "mouseout",
		property: 'color',
		start: 'FFFFFF',
		end: '7e7e7e',
		steps: 10,
		duration: 10
	});

});


$(document).ready(function(){

	$("#menu-startseite span, #menu-preise span, #menu-ueber-uns span, #menu-referenzen span, #menu-kontakt span, #header-left-logo #logo span").css("opacity","0");
		$("#menu-startseite span, #menu-preise span, #menu-ueber-uns span, #menu-referenzen span, #menu-kontakt span, #header-left-logo #logo span").hover(function () {
		$(this).stop().animate({
			opacity: 1
		}, 'normal');
	},

	function () {
		$(this).stop().animate({
			opacity: 0
		}, 'slow');
	});
});

 
});
