/////////////////////////////////////////////////////////////////ONLOAD//////////////////////////////////////////////////////////////////////////////////////////
$(document).ready(function(){
						   
		$("body").show();
		
	   $(".entry img").parent().css("border","none");
	   
		isExplorer6();
		////////////MOUSE OVER////////////////////// 	
		$(".btn1,.btn2,.btn3").hover(
				function(){
						$(this).children("img").css("visibility","hidden");
				}
				,function(){
						$(this).children("img").css("visibility","visible");
				}
		);
		////////////MOUSE OVER////////////////////// 
		
		
		////////////MOUSE OVER////////////////////// 	
		$("#trafo_logo, #raf_logo, #tra_logo").hover(
				function(){
						$(this).children("img").attr("src",$(this).children("img").attr("src").split("_out").join("_over"));
				}
				,function(){
						$(this).children("img").attr("src",$(this).children("img").attr("src").split("_over").join("_out"));
				}
		);
		////////////MOUSE OVER////////////////////// 
		
		$("#raf_logo, #tra_logo").css("marginTop", ($(".general").height()-1630)+"px");
		
		
		$(".alignnone").click(
				function(){
					$(this).parent().attr("href",$(this).parent().parent().parent().parent().children("a").attr("href"));
					$(this).parent().attr("target","_self");
				}		  
		);
		
		$(".addthis_container img").attr("src","http://blog.trafo.com.tr/wp-content/themes/trafozip/images/share.gif");
		
});
//////////////////////////////////////////////////////////////////ONLOAD//////////////////////////////////////////////////////////////////////////////////////////
function newsletter(root){
	$("#newsletter_msg").html("Lütfen Bekleyin...");
	$("#newsletter_msg").show();
	if($("#newsletter_email").val().length<4 || $("#newsletter_email").val().indexOf("@")<1 || ($("#newsletter_email").val().indexOf("@")+2)>$("#newsletter_email").val().lastIndexOf(".") || $("#newsletter_email").val().lastIndexOf(".")>($("#newsletter_email").val().length-2)){
		$("#newsletter_msg").html("Geçersiz E-posta!");
		$("#newsletter_email").focus();
	}else{
			$.ajax({
				type: "GET",
				url: root+"ajax.php",
				data: "action=newsletter&email="+$("#newsletter_email").val(),
				success: function(msg){
						if(msg == "err") {$("#newsletter_msg").html("Bu E-posta zaten kayıtlı!");}
						else{$("#newsletter_msg").html("Kayıt başarılı");}
			}
		});
	}
	return false;
}

function fcs(fcs,input,msg){
	if(fcs==1) if($("#"+input).val()==msg) $("#"+input).val("");
	if(fcs==0) if($("#"+input).val()=="") $("#"+input).val(msg);
}

////////////////BUNLARA IE6 PNG TRANSPARENCY UYGULA////////////
function isExplorer6() {
	var appVer = navigator.appVersion;
	appVer = appVer.split(';');
	if(appVer[1] == ' MSIE 6.0') {
		$("div").ifixpng();
		$("img").ifixpng();
		$("a").ifixpng();
		$("p").ifixpng();
		$("h2").ifixpng();
		return true;
	}				
}
////////////////BUNLARA IE6 PNG TRANSPARENCY UYGULA////////////


////////////////EVENT CALENDAR//////////////////
///////Öncelikle ec3.js nin içindeki WindowOnload ve update days in içine switchtoTR() yi yapıştır
function switchtoTR(){
	$("#ec3_prev").html(convertShort($("#ec3_prev").html()));
	$("#ec3_next").html(convertShort($("#ec3_next").html()));
	$("#wp-calendar caption a").html(convertLong($("#wp-calendar caption a").html()));
	$("#wp-calendar table thead tr").html('<th scope="col">P</th><th scope="col">S</th><th scope="col">Ç</th><th scope="col">P</th><th scope="col">C</th><th scope="col">C</th><th scope="col">P</th>');
}

function convertShort(bu){
	if(bu) var bu = bu.split("Jan").join("Ocak").split("Feb").join("Şubat").split("Mar").join("Mart").split("Apr").join("Nisan").split("May").join("Mayıs").split("Jun").join("Haziran").split("Jul").join("Temmuz").split("Aug").join("Ağustos").split("Sep").join("Eylül").split("Oct").join("Ekim").split("Nov").join("Kasım").split("Dec").join("Aralık");
	return bu;
}

function convertLong(bu){
	if(bu) var bu = bu.split("January").join("Ocak").split("February").join("Şubat").split("March").join("Mart").split("April").join("Nisan").split("May").join("Mayıs").split("June").join("Haziran").split("July").join("Temmuz").split("August").join("Ağustos").split("September").join("Eylül").split("October").join("Ekim").split("November").join("Kasım").split("December").join("Aralık");
	return bu;
}
////////////////EVENT CALENDAR//////////////////



