debugMode = true;
// MENU BASLADI
var $ =jQuery.noConflict(); 
var toggleID_temp = "";
var ototimeout = 30000;
var otomatikkapanis = null;
var acikID = "";
var menuSiraID = 1;
var birinciResim = "";
var oncekiResim = "";
function menuScript(id, degisecekResim, sayisi) {	
	menuSiraID = id;
	birinciResim = degisecekResim;
	hei = 25 * Math.ceil(sayisi / 4);
	acikID = "menuListe" + id + "ID";
	$("div[id^=menuOklarID_]").hide();
	$("#bannerustresimdegisimID").attr("src", "images/banner_top.png");
	if(toggleID_temp == id) {
		$("#panel").slideToggle(300, function () {
			$("#bottomcenter_top").hide();
		}).html("");
		toggleID_temp = "";
		acikID = "";
		kapanistetikleyici(-1);
	} else if(toggleID_temp != id) {
		$("#menuListe" + toggleID_temp + "ID").css("background-image", "url(" + oncekiResim + ")");
		if(toggleID_temp != "") {
			$("#panel").slideToggle(300, function () { 
				$.ajax({
					cache: false,
					type: "POST",
					url: "includes/locajaxdosya.php",
					data: "actions=ustPanel&id="+id,
					timeout: 30000,
					error: function() {
						if(confirm("Sorun oluştu. Sayfa refresh edilsin mi?"))
							window.location.reload();
					},
					success: function(icerik) {
						$("#menuOklarID_" + menuSiraID).show();
						$("#bottomcenter_top").show();
						$("#panel").html(icerik);
						$("#panel").slideToggle(300, function () {
							$("#bannerustresimdegisimID").attr("src", "images/banner_top2.png");
						});
						kapanistetikleyici(ototimeout);
					}
				});
			});
		} else {
			$.ajax({
				cache: false,
				type: "POST",
				url: "includes/locajaxdosya.php",
				data: "actions=ustPanel&id="+id,
				dataType: "html",
				timeout: 30000,
				error: function() {
					if(confirm("Sorun oluştu. Sayfa refresh edilsin mi?"))
						window.location.reload();
				},
				success: function(icerik) {
					$("#menuOklarID_" + menuSiraID).show();
					$("#bottomcenter_top").show();
					$("#panel").html(icerik);
					$("#panel").slideToggle(300, function () {
						$("#bannerustresimdegisimID").attr("src", "images/banner_top2.png");
					});
					kapanistetikleyici(ototimeout);
				}
			});
		}
		$(this).toggleClass("active"); 
		toggleID_temp = id;
		
	}
	
	oncekiResim = degisecekResim;
	return false;
}

function otomatikKapanisFc() {
	$("#" + acikID + "").css("background-image", "url(" + birinciResim + ")");
	acikID = "";
	$("#bannerustresimdegisimID").attr("src", "images/banner_top.png");
	$("#panel").slideToggle(300, function () {
		$("#bottomcenter_top").hide();
		$("#menuOklarID_" + menuSiraID).hide();
	}).html("");
	toggleID_temp = "";
	clearTimeout(otomatikkapanis);
}
function kapanistetikleyici(saniye) {
	clearTimeout(otomatikkapanis);
	otomatikkapanis = null;
	if(saniye != -1)
		otomatikkapanis = setTimeout("otomatikKapanisFc()", saniye);
}
function degistirResim(resim, id) {
	if(acikID != id)
		$("#" + id + "").css("background-image", "url(" + resim + ")");
	return false;
}
// MENU BITTI

// ACCORDION BASLADI	
	var openAccordion = '';
	var nID = "";
	var eskiIndex = "-1";
	accordionparca_index = 0;
	loaded_accordionparcalar = new Array();
	loaded_accordionparcalar[accordionparca_index] = "";
	
	function animate(lastTick, timeLeft, closingId, openingId) {  
		var curTick = new Date().getTime();
	  	var elapsedTicks = curTick - lastTick;
	  
	  	var opening = (openingId == '') ? null : document.getElementById(openingId);
	  	var closing = (closingId == '') ? null : document.getElementById(closingId);
	 	
	  	if(timeLeft <= elapsedTicks) {
			if(opening != null) {
				opening.style.width = ContentHeight + 'px';
			}
		
			if(closing != null) {
				closing.style.display = 'none';
				closing.style.width = '0px';
			}
			return;
	  	} else
			newClosedHeight = 0;
	 
	  	timeLeft -= elapsedTicks;
	  	var newClosedHeight = Math.round((timeLeft/TimeToSlide) * ContentHeight);
		//$("#ajaxIslemID").append("<br>" + ContentHeight + " # " + newClosedHeight);
	  	if(opening != null) {
			if(opening.style.display != 'block')
		  		opening.style.display = 'block';
		
			opening.style.width = (ContentHeight - newClosedHeight) + 'px';
	  	}
	  	if(closing != null) {
			//$("#ajaxIslemID").append("<br><br>BJURDA<br><br>");
			if(timeLeft <= elapsedTicks && $.browser.opera) {
				newClosedHeight = 0;
			}
			closing.style.width = newClosedHeight + 'px';
	  	}
		
	  	setTimeout("animate(" + curTick + "," + timeLeft +",'" + closingId + "','" + openingId + "')", 33);
	}
	
	var accDeneme = 0;
	function runAccordion(index, id) {
		nID = "Accordion" + index + "Content";
		if(eskiIndex > 0) {
			changeAccordionTitle(eskiIndex, "http://dis.fatih.edu.tr/images/accordion_button/" + button1_array[eskiIndex - 1] + "");
		}
		if(index > 0) {
			changeAccordionTitle(index, "http://dis.fatih.edu.tr/images/accordion_button/" + button2_array[index - 1] + "");
		}
	
		if(openAccordion == nID) {
			if(!tiklanincaKapanma)
				return false;
			nID = '';
		} 
		if(!inArray(loaded_accordionparcalar, index)) {
			$.ajax({
				type: "POST",
				cache: true,
				url: "includes/locajaxdosya.php",
				data: "actions=akordiyonYukle&sira=" + index + "&id=" + id + "",
				timeout: 5000,
				error: function () {
					accDeneme += 1;
					$("#" + nID + "").html("İşlem yapılamadı, tekrar deneniyor. (" + accDeneme + ")");
					setTimeout("runAccordion(" + index + ", " + id + ");", 1000);
				}, 
				success: function(ajaxCevap) {
					accDeneme = 0;
					accordionparca_index += 1;
					loaded_accordionparcalar[accordionparca_index] = index;
					$("#" + nID + "").html(ajaxCevap);
				}
			});
		}
		//setTimeout("animate(" + new Date().getTime() + "," + TimeToSlide + ",'" + openAccordion + "','" + nID + "')", 33);
		animate(new Date().getTime(), TimeToSlide , openAccordion , nID );
		openAccordion = nID;
		eskiIndex = index;
	}
	
	var ilkAcilis = 1;
	function changeAccordionTitle(sira, resimDosyasi) {
		var idsi = "accordionTitileID" + sira;
		$("#" + idsi + "").attr("src", resimDosyasi);
	}
	
	
	var selectedmenuitem=1;
	function changeMenu(id) {
		selectedmenuitem=id;
		
		for(i=1;i<=6;i++) {
			document.getElementById('mlayer'+i).style.display='none';
			document.getElementById('mcell'+i).className='menu';
		}
		document.getElementById('mlayer'+id).style.display='';
		document.getElementById('mcell'+id).className='smenu';
	}
// ACCORDION BITTI
function carouselIsaretle(sayisi) {
	sayi = Math.ceil(sayisi / 2);
	$("#scrollcontrol_orta div").removeClass("scrollcontrol_orta_active").addClass("scrollcontrol_orta_normal");
	$("#scrollcontrol_orta div:eq(" + (sayi - 1) + ")").addClass("scrollcontrol_orta_active");
}
acc_sayi = 1;
function haydiBaslaBakalim(carousel) {
	carouselIsaretle(acc_sayi);
	$("#scrollcontrol_orta div").bind("click", function () {
		acc_sayi = ((parseInt($(this).attr("title")) - 1) * 2) + 1;
		carousel.scroll($.jcarousel.intval(acc_sayi));
		carouselIsaretle(acc_sayi);
		return false;
	});
	$("#scrollcontrol_prev").click(function () {
		acc_sayi = (acc_sayi - 1) <= 1 ? 1 : (acc_sayi - 1);
		carouselIsaretle(acc_sayi);
		carousel.prev();
		return false;
	});
	$("#scrollcontrol_next").click(function () {
		acc_sayi = (acc_sayi + 1) >= caroselLimit ? caroselLimit : (acc_sayi + 1);
		carouselIsaretle(acc_sayi);
		carousel.next();
		return false;
	});
	
}
function initMyCarousel() {
	
	var k = 1;
	for(i = 1; i <= caroselLimit; i++) {
		$("#mycarousel").append("<li id=\"mcID_" + i + "\">Yükleniyor...</li>");
	}
	
	$('#mycarousel').jcarousel({
		//size: caroselLimit,
		scroll: 1,
		start: 1,
		animation: 100,
		initCallback: haydiBaslaBakalim
	});
	
	if(caroselLimit >= 1) {
		/*
		$.ajax({
			type: "POST",
			cache: true,
			url: "includes/locajaxdosya.php",
			data: "actions=mycarouselYukle&sira=1&sonsira=" + caroselLimit,
			timeout: 2000,
			error: function () {
				$("#mcID_1").html("Hata işlem yapılamadı");
			}, 
			success: function(ajaxCevap) {
				$("#mcID_1").html(ajaxCevap);
			}
		});
		*/
		carouselYukle(1, caroselLimit);
	}
}
var carouselDeneme = 0;
function carouselYukle(sira, sonsira) {
	$.ajax({
		type: "POST",
		cache: true,
		url: "includes/locajaxdosya.php",
		data: "actions=mycarouselYukle&sira=" + sira + "&sonsira=" + sonsira,
		timeout: 2000,
		error: function () {
			carouselDeneme += 1;
			$("#mcID_" + sira + "").html("İşlem yapılamadı, tekrar deneniyor. (" + carouselDeneme + ")");
			setTimeout("carouselYukle(" + sira + ", " + sonsira + ");", 1000);
		}, 
		success: function(ajaxCevap) {
			carouselDeneme = 0;
			$("#mcID_" + sira).html(ajaxCevap);
		}
	});
	
}

//ETKINLIKLER BASLADI
	var num_projects_per_page 	= 4;
	var num_sidebar_projects 	= 0;
	var project_height			= 74;
	var current_top_project		= 0;
	var animation_speed			= 100;
	
	function viewWork(url) {
		if (current_top_project > 0) {
			window.location = url + "?nav=" + current_top_project;
		}
		else {
			window.location = url;
		}
	}
	
	function initScrollPosition() {
		
		var distance = project_height * (current_top_project) ;
		$('#portfolio_table').css('top', "-" + distance + "px");
	}			
	
	function currentBottomProject() {
		return current_top_project + num_projects_per_page;
	}
	
	function checkNavArrows() {
		if (canScrollUp()) {
			$('#portfolio_nav_up').css('background-position', '0px -30px');
		}
		else {	
			$('#portfolio_nav_up').css('background-position', '0px 0px');		
		}
	
		if (canScrollDown()) {
			$('#portfolio_nav_down').css('background-position', '0px -30px');		
		}
		else {
			$('#portfolio_nav_down').css('background-position', '0px 0px');		
		}
	}	
	
	function canScrollDown() {
		return (current_top_project > 0);
	}			
	
	function canScrollUp() {
		
		return (currentBottomProject() < num_sidebar_projects);
	}			
	
	function scrollDown() {
		var distance = project_height * (current_top_project + 1);
	
		$("#portfolio_table").animate({ 
			left: 0,
			top: -distance
		}, animation_speed );
	
		current_top_project += 1;					
		checkNavArrows();					
	}			
	
	function scrollUp() {
		var distance = project_height * (current_top_project - 1);
	
		$("#portfolio_table").animate({ 
			left: 0,
			top: -distance
		}, animation_speed );
	
		current_top_project -= 1;					
		checkNavArrows();
	}		
	(function ($) {
    
	$.fn.simpleSpy = function (limit, interval) {
		limit = limit || 3;
		interval = interval || 4000;
		
		return this.each(function () {
			var $list = $(this),
				items = [], // uninitialised
				currentItem = limit,
				total = 0, // initialise later on
				height = $list.find('> li:first').height();				
			// capture the cache
			$list.find('> li').each(function () {
				items.push('<li>' + $(this).html() + '</li>');
			});
			
			total = items.length;
			
			$list.wrap('<div class="spyWrapper" />').parent().css({ height : height * limit });
			
			$list.find('> li').filter(':gt(' + (limit - 1) + ')').remove();
	 
			// 2. effect        
			function spy() {
				if(total <= limit) {
					return false;
				}
				if (currentItem >= total) {
					currentItem = 0;
				}
				var $insert = $(items[currentItem]).css({
					height : 0,
					opacity : 0,
					display : 'none'
				}).prependTo($list);
							
				// fade the LAST item out
				$list.find('> li:last').animate({ opacity : 0}, 1000, function () {
					// increase the height of the NEW first item
					if(jQuery.browser.msie) 
						$insert.animate({ height : height }, 1000).animate({ opacity : 1 }, 1000, function() { this.style.removeAttribute('filter'); });
					else
						$insert.animate({ height : height }, 1000).animate({ opacity : 1 }, 1000);
					
					$(this).remove();
				});
				
				currentItem++;
				setTimeout(spy, interval)
			}
			
			spy();
		});
	};
		
	})(jQuery);

function etkinliklerYukle(sira, toplam, toplamegitim) {
	$.ajax({
		type: "POST",
		data: "actions=anasayfaEtkinlikYukle&startlimit=" + sira + "&toplam=" + toplam + "&toplamegitim=" + toplamegitim,
		url: "includes/locajaxdosya.php",
		timeout: 5000,
		error: function () {
		},
		success: function (ajaxCevap) {
			$("table[id=portfolio_table] > tbody").append(ajaxCevap);
		}
	});
}
//ETKINLIKLER BITTI


//WEB SITE RESIMLERI BASLADI
var websiteDeneme = 0;
function webSiteYukle(durum) {
	sira_temp = sirasi;
	if(durum == "ileri")
		sira_temp += 1;
	else
		sira_temp -= 1;
	
	array_uzunluk = (websiteler_array.length) - 1;
	if(sira_temp < 0)
		sira_temp = array_uzunluk;
	else if(sira_temp > array_uzunluk)
		sira_temp = 0;
		
	$.ajax({
		beforeSend: function () {
			$("#websitelerID").html("<img vspace='6' style='margin-top:16px; margin-left:108px;' src='images/fatih_loading.gif' align='absmiddle'><br><font style='margin-left:94px; color:#a6c7ff; font-size:10px'>YÜKLENİYOR</font>");
		},
		type: "POST",
		data: "actions=websitegetir&ID=" + websiteler_array[sira_temp],
		url: "includes/locajaxdosya.php",
		timeout: 5000,
		error: function () {
			websiteDeneme += 1;
			$("#websitelerID").html("İşlem yapılamadı, tekrar deneniyor. (" + websiteDeneme + ")");
			setTimeout("webSiteYukle(" + durum + ");", 1000);
		},
		success: function (ajaxCevap) {
			websiteDeneme = 0;
			sirasi = sira_temp;
			$("#websitelerID").html(ajaxCevap);
		}
		
	});
	
}
//WEB SITE RESIMLERI BITTI

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};





// ARAMA FORMU BASLADI
function aramaFormYaziDegis() {
	$("#aramasolbuyutecID").css("background-image", "url(images/fatih_ara_sol2.png)");
	/*
	if($("input[name=aramaAlani]").val() == "Aramak İstediğiniz Kelime")
		$("input[name=aramaAlani]").val("");
	return false;
	*/
}
function aramaFormYaziDegis1() {
	$("#aramasolbuyutecID").css("background-image", "url(images/fatih_ara_sol.png)");
	/*
	if($("input[name=aramaAlani]").val() == "")
		$("input[name=aramaAlani]").val("Aramak İstediğiniz Kelime");
	return false;
	*/
}
function aramadugmeDegistir(img) {
	$("#go").attr("src", img);
}
// ARAMA FORMU BITTI

//BANNER BAŞLADI
	function mycarousel_banner_initCallback(carousel) {
		// Disable autoscrolling if the user clicks the prev or next button.
		carousel.buttonNext.bind('click', function() {
			carousel.startAuto(0);
		});

		carousel.buttonPrev.bind('click', function() {
			carousel.startAuto(0);
		});
		
		jQuery('.jcarousel-control_banner a').bind('click', function() {
			carousel.startAuto(0);
		});
		
		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
		});
			
		// Create navigation elements
		jQuery('.jcarousel-control_banner a').bind('click', function() {
			carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
			return false;
		});

		jQuery('.jcarousel-scroll select').bind('change', function() {
			carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value);
			return false;
		});

		jQuery('#mycarousel-banner-next').bind('click', function() {
			carousel.next();
			return false;
		});

		jQuery('#mycarousel-banner-prev').bind('click', function() {
			carousel.prev();
			return false;
		});
		
	};

	// it will append class="selected" into <a>
	// <a href="#">1</a> to <a href="#" class="selected">1</a>
	function highlight(carousel, obejctli,liindex,listate){
		 jQuery('.jcarousel-control_banner a:nth-child('+ liindex +')').attr("class","selected");
	};
	// it will remove last selected slide from <a>
	// <a href="#" class="selected">1</a> to <a href="#">1</a>
	function removehighlight(carousel, obejctli,liindex,listate){
		 jQuery('.jcarousel-control_banner a:nth-child('+ liindex +')').removeAttr("class","selected");
	}; 
	var bannerDeneme = 0;
	function bannerYukle(sira, toplam) {
		//alert(banner_arr[3] + " - " + banner_arr[6]);
		
		if(sira >= toplam)
			$("#banner_control_container").show();
		arr_sira = (parseInt(sira) > parseInt(toplam) ? "0" : parseInt(sira) - 1 );
		$("#ajaxIslemID").append("<br> Debug Mode (Banner Ajax): " + sira + " > " + toplam + " == " + banner_arr[arr_sira] + " -- " + arr_sira);
		$.ajax({
			type: "POST",
			data: "actions=banneryukle&sira=" + sira + "&toplam=" + toplam + "&asry_id=" + banner_arr[arr_sira],
			url: "includes/locajaxdosya.php",
			timeout: 5000,
			error: function () {
				bannerDeneme += 1;
				$("li[id=mainbannerID_" + sira + "]").html("İşlem yapılamadı, tekrar deneniyor. (" + bannerDeneme + ")");
				setTimeout("bannerYukle(" + sira + ", " + toplam + ");", 1000);
			},
			success: function (ajaxCevap) {
				bannerDeneme = 0;				
				$("li[id=mainbannerID_" + sira + "]").html(ajaxCevap);
			}
		});
	}
//BANNER BİTTİ

/*************** arrayi shuffle yapar ********************/
(function($){
  $.fn.shuffle = function() {
    return this.each(function(){
      var items = $(this).children();
      return (items.length)
        ? $(this).html($.shuffle(items))
        : this;
    });
  }
 
  $.shuffle = function(arr) {
    for(
      var j, x, i = arr.length; i;
      j = parseInt(Math.random() * i),
      x = arr[--i], arr[i] = arr[j], arr[j] = x
    );
    return arr;
  }
})(jQuery);
/*************** arrayi shuffle yapar ********************/
/*************** array kontrolu ********************/
function inArray(arrayi, aranan) {
	for(i = 0; i < arrayi.length; i++)
		if(arrayi[i] == aranan) 
			return true;
	return false;
}
/*************** etkinlik linki ********************/
function linkeGonder(linkin) {
	if(linkin != "")
		window.open(linkin);
//	window.location.href = linkin;
}
function linkAc(linkin) {
	window.location.href = linkin;
}
var openAccessNum = 0;
$(document).ready(function() {
// HABER DUYURULAR BASLADI
	$("#banner_control_container").hide();
	$("#habersol").show();
    jQuery('#yourcarousel').jcarousel({
		vertical: true,
        auto: 4,
        wrap: 'last',
		scroll: 1,
        animation: 100
        //initCallback: mycarousel_initCallback
    });

// HABER DUYURULAR BITTI

// ACCORDION BASLADI
	$("div[class=AccordionContainer]").each(function (val, obj) {
		$(this).css({
			"width" : containerWidth
		});
	});
	var div_sayisi = 0;
	$("div[class=AccordionTitle]").each(function () {
		div_sayisi++;
		$(this).css({
			"width" : headWidht
		});
	});
	$("div[class=AccordionTitle]:eq(" + (div_sayisi - 1) + ")").css("border-right", "0px");
	ContentHeight = parseFloat(containerWidth) - parseFloat(div_sayisi * headWidht);
	
	if(ilkAcilan > div_sayisi)
		ilkAcilan = div_sayisi;
	if(ilkAcilan < 0)
		ilkAcilan = 0;
	
	setTimeout("runAccordion(ilkAcilan, denden);", 1);
// ACCORDION BITTI

// MENU BASLADI
	$("#panel").mouseleave(function() {
		if(acikID != "")
			kapanistetikleyici(ototimeout);
	}).mouseenter(function() {
		kapanistetikleyici(-1);
	});
// MENU BITTI

// ETKINLIKLER SAGINDAKI CAROUSER BASLADI
	initMyCarousel();
// ETKINLIKLER SAGINDAKI CAROUSER BITTI

	

		
// ETKINLIKLER BASLADI
	setTimeout("etkinliklerYukle(4, " + etkinlik_sayisi + ", " + egitim_sayisi + ");", 3000);
	$('#current_page').html($('#project_page_1').html());
	
	num_sidebar_projects 		= 12;
	current_top_project 		= 0;
	
	$("#portfolio_nav_up").mouseover(function(e){
		if (canScrollUp()) {
			$(this).css('background-position',"0 -60px");
		}				
	});
	$("#portfolio_nav_up").mouseout(function(e){checkNavArrows();});
	$("#portfolio_nav_up").click(function(e){
		if (canScrollUp()) {scrollDown();}					
		return false;
	});
	
	$("#portfolio_nav_down").mouseover(function(e){					
		if (canScrollDown()) {
			$(this).css('background-position',"0 -60px");						
		}				
	});
	$("#portfolio_nav_down").mouseout(function(e){checkNavArrows();});				
	$("#portfolio_nav_down").click(function(e){													
		if (canScrollDown()) {scrollUp();}
		return false;
	});
	
	if (canScrollDown()) {initScrollPosition();}
	$('#projects').show();
	checkNavArrows();
	
// ETKINLIKLER BITTI
	sirasi = -1;
	webSiteYukle("ileri");

	num_sidebar_projects = (etkinlik_sayisi == "0" ? egitim_sayisi : etkinlik_sayisi); 
	
//BANNER BASLADI
	jQuery.easing['easeOutExpo'] = function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	};
	$("#habersag").show();
	
	$('#mycarousel_banner').jcarousel({
		auto: 5,
		wrap: 'last',
		scroll: 1,
		easing: "easeInCirc", // "easeOutBack", 
		animation: 700,
		itemVisibleInCallback:  highlight,
		itemVisibleOutCallback: removehighlight,
		initCallback: mycarousel_banner_initCallback
	});
	
	//alert(banner_arr);
	bannerYukle(1, banner_sayisi);
//	alert(banner_sayisi);
	
//BANNER BITTI

// ARAMA FORMU BASLADI
	$("input[type=radio][name=aramaFormradio]").click(function (obj, aa) {
		$("label[id^=aramatextID_]").removeClass("aramanavisi_aktif").addClass("aramanavisi_pasif");
		$("label[id=aramatextID_" + $(this).val() + "]").removeClass("aramanavisi_pasif").addClass("aramanavisi_aktif");
		
		switch($(this).val()) {
			case "1":
				$("form[name=searchform]").attr({
					"action": "http://www.fatih.edu.tr/?sarirehber",
					"method": "POST"
				});
				break;
			case "2":
				$("form[name=searchform]").attr({
					"action": "http://www.google.com/u/fatih?domains=fatih.edu.tr&sitesearch=fatih.edu.tr",
					"method": "GET"
				});
				break;
			case "3":
				$("form[name=searchform]").attr({
					"action": "http://www.google.com/u/fatih?domains=fatih.edu.tr",
					"method": "GET"
				});
				break;
		}
		$("input[type=text][name=q][id=s1]").focus();
	
	});
// ARAMA FORMU BITTI
});


//ARAMA FORMU BASLADI
function aramaFormKontrol() {
	if($("form[name=searchform] input[type=text][name=q]").val().length < 3)
		return false;
}
//ARAMA FORMU BITTI

var goster = 0;
function validateGoster() {
	if(goster == 0) {
		$("#cssvalidID").fadeIn(3000, function () { goster = 1; } );
	} else {
		$("#cssvalidID").fadeOut(3000, function () { goster = 0; } );
	}
}
