jQuery(document).ready( function() {
    
  jQuery('a#gotop').click(function(){
			jQuery.scrollTo( 0, 2500);//reset the screen to (0,0)

			return false;
		});

  jQuery("#tabcontent").accessibleTabs({
	    tabhead:'h2',
	    fx:"fadeIn"
	});
	
	jQuery("#commentsTrack").accessibleTabs({
	    tabhead:'h2',
	    fx:"fadeIn"
	});


  jQuery('#newestarticles').css('cursor', 'pointer'); 
  jQuery('#recentcomments').css('cursor', 'pointer'); 
  jQuery('#tagcloud').css('cursor', 'pointer');
  
  jQuery('#opensingle').css('cursor', 'pointer'); 
  jQuery('#openalben').css('cursor', 'pointer'); 
  jQuery('#openapple').css('cursor', 'pointer'); 
  
  jQuery("#opensingle" ).click(function() {      
      jQuery('#slidesingle').toggle('slow'); 
      jQuery('#opensingle').html('Plätze 4 bis 10 ausblenden'); 
  });
  
  jQuery("#openalben" ).click(function() {      
      jQuery('#slidealben').toggle('slow'); 
      jQuery('#openalben').html('Plätze 4 bis 10 ausblenden'); 
  });
  jQuery("#openapple" ).click(function() {      
      jQuery('#slideapple').toggle('slow'); 
      jQuery('#openapple').html('weitere Produkte ausblenden'); 
  });
 
}); 

this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	jQuery("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		jQuery("body").append("<p id='tooltip'>"+ this.t +"</p>");
	
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		jQuery("#tooltip").remove();
    });	
	jQuery("a.tooltip").mousemove(function(e){
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};



// starting the script on page load
jQuery(document).ready(function(){
	tooltip();
});