jQuery.fn.equalHeight = function () {
	var height		= 0;
	var maxHeight	= 0;

	// Store the tallest element's height
	this.each(function () {
		height		= jQuery(this).outerHeight();
		maxHeight	= (height > maxHeight) ? height : maxHeight;
	});

	// Set element's min-height to tallest element's height
	return this.each(function () {
		var t			= jQuery(this);
		var minHeight	= maxHeight - (t.outerHeight() - t.height());
		var property	= jQuery.browser.msie && jQuery.browser.version < 7 ? 'height' : 'min-height';

		t.css(property, minHeight + 'px');
	});
};


jQuery(document).ready(function($) {
	
		$(document).pngFix();
		$(".esitle").equalHeight();
		$('.navigasyon a').each(function(){
			
			if(getpagename() == $(this).attr("href")) $(this).addClass("aktif");
		});
		
		$("#imgera").fadeTo("fast", 0.2);
		$("#imgera").hover(function(){
			$(this).animate({ opacity: 1,    width: '+=74'  });
		},function(){
			$(this).animate({ opacity: 0.2,    width: '-=74'  });
		});
		
});

function getpagename(){
	var url = document.location.href;
	url = url.substring(0, (url.indexOf("#") == -1) ? url.length : url.indexOf("#"));
	url = url.substring(0, (url.indexOf("?") == -1) ? url.length : url.indexOf("?"));
	url = url.substring(url.lastIndexOf("/") + 1, url.length);
	return url;
}

function aktifle(aktifsayfa){
	aktifsayfa.addClass("aktif");
	aktifsayfa.fadeTo("slow",1);
}
