// JavaScript Document

  
//Drag'n'drop DIV mit vielen Beispielen     http://interface.eyecon.ro/demos/drag.html

$(document).ready(
	function()
	{
		/*$('#drag1').Draggable({snapDistance: 10, frameClass: 'frameClass'});
		$('#drag2').Draggable(
			{
				ghosting:	true,
				opacity:	0.5,
				fx:			300
			}
		);
		$('#drag3').Draggable(
			{
				revert:		true,
				fx:			100
			}
		);
		$('#drag4').Draggable(
			{
				grid:		[50,50]
			}
		);
		$('#drag5').Draggable(
			{
				axis:	'vertically'
			}
		);
		$('#drag6').Draggable(
			{
				axis:	'horizontally'
			}
		);
		$('#drag7').Draggable(
			{
				handle:	'div'
			}
		);*/ 
		$('#content_box').Draggable(   //Inside Parent Drag    http://docs.jquery.com/UI/API/1.8/Draggable
			{
				zIndex: 	1000,
				ghosting:	false,
				opacity: 	0.7,
				//containment : 'parent'
				containment : 'document'
			}
		);
		$('#drag8').Draggable(
			{
				/* onDragModifier : function(x,y)
				{
					var centerx = 600;
					var centery = 400;
					var angle = Math.atan((centery-y)/(centerx-x));
					if((centerx-x)>=0)
						angle += Math.PI;
					radius = 160;
					return {
						x: radius * Math.cos(angle) + centerx, 
						y: radius * Math.sin(angle) + centery
					}
				}
				*/
				cursorAt: { top: -5, left: -5 }
			}
		);
	}
);






//Bottom to Top
$(document).ready(function() {					   
	$("#button2").hide();
	$("#button1").click(function() {
		$("#impressum").animate({height: 235}, 1000);
		$("#button2").animate({opacity: 'show'}, 1000);
		$("#impressum h4").addClass("active");
	});
	$("#button2").click(function() {
		$("#impressum").animate({height: 40}, 1000);
		$("#button2").animate({opacity: 'hide'}, 1000);
		$("#impressum h4").removeClass("active");
	});	
});


//Grab the original BG color of the link
//var originalBG = $("#background").css('background-image':'inherit'); 
//The color you want to fade too
//var fadeColor = "#ffffff"; 

//Now animate on links with class = animate
//$(window).load(function() {
//$(document).ready(function() {	
	//$("#background").css({'background-image': 'none'}); 
	//$("#background").click(function() { 
		//Fade to the new color
		//$(this).animate({'backgroundColor':'#ffffff'}, 750);
		//$("#background").animate({opacity: 'show', backgroundImage: 'inherit'}, 750);
		//Fade back to original color
		//$(this).animate({'background-image':'inherit'},750);
	//});
//});



	
	



