var bos = false;
$(document).ready(function(){
	en = $(window).width()-scrollbarWidth();
	boy = $(window).height();
	$("#site").width(en+"px");
	$("#site").height(boy+"px");
	$("#siteic").width(en+"px");
	$("#siteic").height(boy+"px");
	$("#site").fadeTo(1,0);
	$("#site").css("visibility","visible");
	$("#site").fadeTo("slow",1);
	
	$(".btn").hover(function(){
		cevir();
		
	},function(){
		//cevir();
	});
});


function flu(olay){
	if(olay==true){
		$("#site").fadeTo("slow",0.5);
	}else{
		$("#site").fadeTo("slow",1);
	}
}



function cevir(){
	$("#siteic").fadeTo(300,0,function(){
		$("#siteic").fadeTo(300,1);
		var no = Math.ceil(Math.random()*10);
		var bg = $(".bek"+no).css("background-image");
		$(this).css({"background-image":bg});
	});
}
function scrollbarWidth() { 
    var div = $('<div style="width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div>'); 
    // Append our div, do our calculation and then remove it 
    $('body').append(div); 
    var w1 = $('div', div).innerWidth(); 
    div.css('overflow-y', 'scroll'); 
    var w2 = $('div', div).innerWidth(); 
    $(div).remove(); 
    return (w1 - w2); 
}