$(document).ready(

	function () {
       			if(window.location.hash) {
       			       				
       				var $URL = location.hash.replace('_link', '');						// Hash aus Window

		          	var tabContainers = $('div.tabs > div.content');
		            tabContainers.hide().filter($URL).show();
		            
		            $('div.tabs ul#tabbed_content a').click(function () {
		                    tabContainers.hide();
		                    tabContainers.filter(this.hash).fadeIn();
							
		                    $('div.tabs ul#tabbed_content a').removeClass('active');
		                    $(this).addClass('active');
		                    window.location.hash = this.hash + "_link";

		                    return false;
		            }).filter("a[href="+$URL+"]").click();

       			} else {

		            var tabContainers = $('div.tabs > div.content');
		            tabContainers.hide().filter(':first').show();
		            
		            $('div.tabs ul#tabbed_content a').click(function () {
		                    tabContainers.hide();
		                    tabContainers.filter(this.hash).fadeIn();
		                    
		                    $('div.tabs ul#tabbed_content a').removeClass('active');
		                    $(this).addClass('active');
		                    
		                    if ($clicked == "clicked") {
		                    	window.location.hash = this.hash + "_link";
		                    }
		                    return false;
		            }).filter(':first').click();
		                   	var $clicked = "clicked"; // verfolgen, ob erster tab...
		                   	
		                 
		                 
		                 
		                 
		                  $('a.tsLink').click(function () {
		                    tabContainers.hide();
		                    tabContainers.filter(this.hash).fadeIn();
		                    
		                     $('div.tabs ul#tabbed_content a').removeClass('active');
		                    
		                    
		                    $('.tablink4').addClass('active');
		                  
		                  
		                    return false;
		            })     	
		        
		                   	
	                   	
		                   	
				} // end if
				
				
				

	                   	
	



	}

); // ready
