$(document).ready(function() {

$('#menu').each(function() {
		var $links = $(this).find('a'),
			mainIds = $links.map(function() { return this.hash; }).get().join(","),
			$content = $(mainIds),
			$contentwrapper = $content.filter(':first').parent(),
			delay = 500;
			
		$content.hide();

		$links.click(function() {
			var $link = $(this),
				link = (this);
				
			if ($link.is('.current')) {
				return;
			}
		
			$links.removeClass('current');
			$link.addClass('current');
			
			$content.animate({ opacity : 1 }, delay);
			$contentwrapper.animate({
				height: 0
			}, delay, function() {
				// var height = $panels.hide().filter(link.hash).show().css('opacity', 1).outerHeight();
				
				var filtered = $content.hide().filter(link.hash).show().css('opacity', 1);
				if ($.browser.msie)
				  filtered.each(function() { this.style.removeAttribute('filter'); });
				var height = filtered.outerHeight();
							
				$contentwrapper.animate({
					height: height
				}, delay);
			});	
			
			return false;
		});
		
		var showtab = window.location.hash ? '[hash=' + window.location.hash + ']' : ':first';
		
		$links.filter(showtab).click();
	
});

$('.anasayfa').append('<span class="hover"></span>')
	.each(function () {	  
		var $span = $('> span.hover', this).css('opacity', 0);	  
		$(this).hover(function () {	    
			$span.stop().fadeTo(500, 1);	  
		}, 
		function () {	    
			$span.stop().fadeTo(500, 0);	  
		});	
});
$('.nelerYapar').append('<span class="hover"></span>')
	.each(function () {	  
		var $span = $('> span.hover', this).css('opacity', 0);	  
		$(this).hover(function () {	    
			$span.stop().fadeTo(500, 1);	  
		}, 
		function () {	    
			$span.stop().fadeTo(500, 0);	  
		});	
});
$('.yaptigiIsler').append('<span class="hover"></span>')
	.each(function () {	  
		var $span = $('> span.hover', this).css('opacity', 0);	  
		$(this).hover(function () {	    
			$span.stop().fadeTo(500, 1);	  
		}, 
		function () {	    
			$span.stop().fadeTo(500, 0);	  
		});	
});
$('.nasilUlasirim').append('<span class="hover"></span>')
	.each(function () {	  
		var $span = $('> span.hover', this).css('opacity', 0);	  
		$(this).hover(function () {	    
			$span.stop().fadeTo(500, 1);	  
		}, 
		function () {	    
			$span.stop().fadeTo(500, 0);	  
		});	
});
	
});	//document ready closed
Cufon.replace('h1,p,li', { fontFamily: 'Androgyne Medium'}); 

