var title;var wind='#window';var winWidth=$(window).width();var winHeight=$(window).height();var boxSize=Array();var boxType='';var timer;var locationUrl=document.location.href;var backUrl=document.location.href;var windowOpacity=0.9;var logoOpacity=0.1;var fadeTime='slow';function setWindow(data){if(data.error=='false'){page=data.window||'#window';var display=data.display||'none';if(display=='fit'){var boxLeft=5;var boxTop=70;var boxHeight=(winHeight-125);var boxWidth=(winWidth-10)}else{var boxLeft=((winWidth-900)/2);var boxTop=(((winHeight-(117+400))/2)+42);var boxHeight=400;var boxWidth=900}boxType=display;boxSize['height']=boxHeight;boxSize['width']=boxWidth;$('#logo').fadeTo(fadeTime,logoOpacity,function(){$(wind).fadeOut(fadeTime,function(){$(page+' > div').html(data.html);$(page+' > div').prepend('<a href="#!/home" onclick="$(wind).fadeOut(\'slow\');" class="close">X</a>');$(page).css({left:boxLeft,top:boxTop,width:boxWidth,height:boxHeight});$(page).fadeTo(fadeTime,windowOpacity,function(){wind=page})})});$('.tweet').fadeTo(fadeTime,logoOpacity);$('.blog').fadeTo(fadeTime,logoOpacity);$('#qrcode').fadeTo(fadeTime,logoOpacity);$('#logobay').fadeTo(fadeTime,logoOpacity)}else{$(wind).fadeOut(fadeTime,function(){$('#logo').fadeTo(fadeTime,1)});$(wind).fadeOut(fadeTime,function(){$('.tweet').fadeTo(fadeTime,1)});$(wind).fadeOut(fadeTime,function(){$('.blog').fadeTo(fadeTime,1)});$(wind).fadeOut(fadeTime,function(){$('#logobay').fadeTo(fadeTime,1)});$(wind).fadeOut(fadeTime,function(){$('#qrcode').fadeTo(fadeTime,1)});}if(typeof(data.debug)!='undefined')alert(data.debug)}function openWin(page){$.post("ajax.php",{"page":page},function(data){setWindow(data)},"json");return false}function locationChange(){var url=document.location.href;if(locationUrl!=document.location.href&&url.indexOf('#!')>0){backUrl=locationUrl;locationUrl=document.location.href;openWin('#'+url.substr(url.indexOf('#!')+3))}timer=setTimeout("locationChange()",10)}$(window).resize(function(){winWidth=$(window).width();winHeight=$(window).height();if(boxType=='fit'){$(wind).css({width:winWidth-3});boxSize['width']=(winWidth-3)}else{if(winWidth<900){$(wind).css({width:winWidth-3});boxSize['width']=(winWidth-3)}else if(winWidth>900&&boxSize['width']<900){$(wind).css({width:900});boxSize['width']=900}}$(wind).css({left:((winWidth-boxSize['width'])/2)})});$(document).ready(function(){$('body').ajaxStart(function(){title=document.title;document.title='Yükleniyor...';$(this).css('cursor','progress')});$('body').ajaxStop(function(){document.title=title;$(this).css('cursor','auto')});var url=document.location.href;if(url.indexOf('#!')>0){}locationChange()});function isOver(thi){var ti=$(thi);ti.prepend('<a href="#" id="buyutec"></a>');$('.work').lightBox();$('#buyutec').click(function(){$(ti).find('.work').click();return false});var buyutec=$('#buyutec');buyutec.fadeIn(150);return false}function isOut(){$('#buyutec').remove();return false}function contactForm(){ $("#contactSubmit").attr('disabled', 'disabled');var name=$("#contactName").val();var email=$("#contactEmail").val();var subject=$("#contactSubject").val();var massage=$("#contactMessage").val();$.ajax({type:"POST",url:"ajax.php",data:"do=contact&name="+name+"&mail="+email+"&subject="+subject+"&message="+massage,cache:false,success:function(html){$(".message").show("slow");$("#contactSubmit").removeAttr("disabled");$(".message").html(html)}})}function language(id){$.ajax({type:"POST",url:"ajax.php",data:"lang="+id,cache:false,success:function(){window.location.reload(true)}})}
$(document).ready(function () {
	$('div#msgclose').click(function(){
		$("div.message").fadeOut();
	});
});
    $(window).load(function(){
        $("#loading").fadeOut(function(){
            $(this).remove();
            $('body').removeAttr('style');
        });
    });
	
