/*
	This .js file created and developed by Bugra Kaan KAVUSTUK
	http://kaankavustuk.com
	<bugrakaan@gmail.com> - <mail@kaankavustuk.com>
*/
$(document).ready(function() {
		var objFound = false;
		/* function trRpl(input) {
			input = input.toLowerCase();
			input = input.replace(/s/g,"s");
			input = input.replace(/i/g,"i");
			input = input.replace(/%FD/g,"i");
			input = input.replace(/g/g,"g");
			input = input.replace(/ü/g,"u");
			input = input.replace(/ç/g,"c");
			input = input.replace(/ö/g,"o"); 
			return input;
		} This function is not used anymore! */
		$("#siteM li").each(function(i,n) {
			if(top.location.href.indexOf($(this).attr('id')) > 0) {
				$(this).attr('class', 'selected');
				objFound = true;
			}
			$(this).click(function() {
				top.location.href = "index.php?" + $(this).attr('id');
			});
		});
		if(objFound == false) {
			$("li:first").attr('class', 'selected');
		}
		$("#linkText").css({ "opacity": 0});
		$("#sValid").css({"opacity" : 0.3});
		$("#sValid").mouseover(function() {
			$(this).stop().animate({ "opacity": 1 });
		}).mouseout(function() {
			$(this).stop().animate({ "opacity": 0.3 });
		});
		$("#siteM li").css({"opacity" : 0.75});
		$(".selected").css({"opacity" : 1, "background-image" : "url(gfx/menuBG-hover.png)", "color" : "#333"});
		$("#siteM li").mouseover(function() {
			if($(this).attr('class') != "selected") {
				$(this).stop().animate({ "opacity": 1 },500);
			}
			$("#linkText").html($(this).attr("title"));
			$("#linkText").stop().animate({ "opacity": 1, "top": "62px"}, 500);
		}).mouseout(function() {
			if($(this).attr('class') != "selected") {
				$(this).stop().animate({ "opacity": 0.75 }, 500);
			}
			$("#linkText").stop().animate({ "opacity": 0, "top": "30px"}, 500);
		}); /*
		function bigLetter(obj) {
			j = $.trim($(obj).text());
			a = j.substr(0,1);
			form = "<div id=\"bigLetter\">"+a+"</div>";
			j = j.replace(a,form);
			$(obj).html(j);	
		}
		bigLetter("#firstIn");
		bigLetter("#secondIn");
		bigLetter("#thirdIn");
		That was experimental! */
		siteImages = [
			{ src: 'gfx/site.bg/site1.bg.jpg', dir: 'up' },
			{ src: 'gfx/site.bg/site2.bg.jpg', dir: 'down' } ,
			{ src: 'gfx/site.bg/site3.bg.jpg', dir: 'up' },
			{ src: 'gfx/site.bg/site4.bg.jpg', dir: 'down' } ,
			{ src: 'gfx/site.bg/site5.bg.jpg', dir: 'up' }
		];
		$('#siteIMG').crossSlide({  speed: 45, fade: 4 }, siteImages);
		N = [
			{ src: 'gfx/ref.logo/1.jpg'},
			{ src: 'gfx/ref.logo/2.jpg'},
			{ src: 'gfx/ref.logo/3.jpg'},
			{ src: 'gfx/ref.logo/4.jpg'},
			{ src: 'gfx/ref.logo/5.jpg'},
			{ src: 'gfx/ref.logo/6.jpg'},
			{ src: 'gfx/ref.logo/7.jpg'},
			{ src: 'gfx/ref.logo/8.jpg'},
			{ src: 'gfx/ref.logo/9.jpg'},
			{ src: 'gfx/ref.logo/10.jpg'},
			{ src: 'gfx/ref.logo/11.jpg'},
			{ src: 'gfx/ref.logo/12.jpg'},
			{ src: 'gfx/ref.logo/13.jpg'},
			{ src: 'gfx/ref.logo/14.jpg'}
		];
		$('#secondCFade').crossSlide({  sleep: 3, fade: 1 }, N);
		$('#secondCFade').click(function() {
			location.href = 'index.php?referanslar'
		});
});	