$(document).ready(function() {
	//Menü üstüne gelindiğinde
function megaHoverOver(){
    $(this).find(".sub").stop().fadeTo('fast', 1).show(); //Alt menüleri bul
    (function($) {
        //Toplam genişlik ayarı
        jQuery.fn.calcSubWidth = function() {
            rowWidth = 0;
            //Satırları hesapla
            $(this).find("ul").each(function() { //her ul için...
                rowWidth += $(this).width(); //diğer ul leri de katarak genişlik ayarla
            });
        };
    })(jQuery); 
    if ( $(this).find(".row").length > 0 ) { //Eğer sıra çıkılırsa...
        var biggestRow = 0;	
        $(this).find(".row").each(function() {	//her sıra için...
            $(this).calcSubWidth(); //bütün ul ler için genişletme işlevini çağır
            //en büyük sırayı bul
            if(rowWidth > biggestRow) {
                biggestRow = rowWidth;
            }
        });
        $(this).find(".sub").css({'width' :biggestRow}); //genişlik ayarla
        $(this).find(".row:last").css({'margin':'0'});  //son sırayının marginini bitir
 
    } /*else { //eğer satırdan çıkmazsa..
 
        $(this).calcSubWidth();  //bütün ul ler için genişletme işlevini çağır
        $(this).find(".sub").css({'width' : 1022}); //genişlik
 
    }*/
}
//üzerinden çekildiğinde
function megaHoverOut(){
  $(this).find(".sub").stop().fadeTo('fast', 0, function() { //Opasite 0 olsun
      $(this).hide();  //solma bittiğinde
	 
  });
}
	var config = {    
		 sensitivity: 1, // sayı = sensitivity threshold (must be 1 or higher)    
		 interval: 0, // sayı = milisaniye onMouseOver üzerine geldikten kaç milisaniye sonra açılsın    
		 over: megaHoverOver, // işlev = onMouseOver çağır (REQUIRED)    
		 timeout: 100, // sayı = milsaniye onMouseOut üzerinden çekildikten kaç milisaniye sonra kaybolsun
		 out: megaHoverOut // işlev = onMouseOut çağır (REQUIRED)    
	};
	$("ul#anamenu li .sub").css({'opacity':'0'});
	$("ul#anamenu li").hoverIntent(config);
	$("ul#anamenu li .sub").click(function () { 
      $(this).hide(); 
    });
});



function uzerinegelince() { 
	if (document.getElementById && document.createTextNode) { 
		var tables=document.getElementsByTagName('table');
		for (var i=0;i<tables.length;i++) { 
			if(tables[i].className=='uzerinde') { 
				var trs=tables[i].getElementsByTagName('tr');
				for(var j=0;j<trs.length;j++) {
					if(trs[j].parentNode.nodeName=='TBODY') {
						trs[j].onmouseover=function(){this.className='uzerineGelince';return false}
						trs[j].onmouseout=function(){this.className='';return false} 
					} 
				} 
			} 
		} 
	} 
} 

