// JavaScript Document
$(document).ready(function()
{
	$('.link_div a:not(.selected)').bind('mouseenter',function(e)
		{
		var name=$(this).attr('name');
		$('#'+name+'_over').show();
	}).bind('mouseleave',function(e)
	{
		var name=$(this).attr('name');
		$('#'+name+'_over').hide();
		
	});
});


$(document).ready(function()
{
  $(".toggle_body").hide();
 // $(".toggle_body_show").show();
  $(".toggle_head" ).click(function(e)
  {
  	e.preventDefault();
	$("body").scrollTo($(this),{duration:500});
	$(this).next(".toggle_body").toggle('blind',{direction:'vertical'},100);		
  }); 
});


var clickcount=0;

var left=0;
var top=0;
var w=0;
var h=0;

var bubblecount=0;
var ausgabe="";
var preset="#uebersicht .zeichnungen0";
var numbubbles=9;

$(document).ready(function()
{
	
	$("#cursor").hide();
	return;
	
		
	$("body").mousemove(function(e)
	{
		$("#cursor").css("left",e.pageX+1);
		$("#cursor").css("top",e.pageY+1);
		
			
	});



   $("#uebersicht").click(function(e)
  {
	  e.preventDefault();  
	  clickcount++;
	  
	  if(clickcount==1){
      
	  	left = event.pageX - $(this).offset().left;
      	top = event.pageY - $(this).offset().top;

	  }
  
  	if(clickcount==2){
		clickcount=0;
		w = event.pageX - $(this).offset().left-left;
    	h = event.pageY - $(this).offset().top-top;
		
		ausgabe+=preset+" .b"+bubblecount +"{\n"
			+ "\tleft :"+left+"px;\n"
			+ "\ttop :"+top+"px;\n"
			+ "\twidth :"+w+"px;\n"
			+ "\theight :"+h+"px;\n"
  			+ "}\n";
		if(bubblecount==numbubbles){
			alert(ausgabe);
			bubblecount=0;
			
		}
		
		bubblecount++;
		
	
	}
 	
  }); 
   
});

