$(document).ready(function() {


// INPTU VALUE EKLIYOR
$('.searchtext')
		.focus(function(){
			if( $(this).attr('value') == $(this).attr('title') ) {
				$(this).attr({ 'value': '' });
			}
		})
		.blur(function(){
			if( $(this).attr('value') == '' ) {
				$(this).attr({ 'value': $(this).attr('title') })
			}
		});

// DILLER START
$(" #diller").hide();

$(" #dil").hover(function(){ 
		$('#diller').slideDown(400);
		},
		
		function(){
		$('#diller').slideUp(400);
		});
// DILLER END

// DETAY TAB START

	$("#rezervasyonVERT").click(function() {
		$("#detayTAB a").removeClass("active");
		$("#rezervasyonVERT").addClass("active");
		$(".tabDIV").hide();
		$("#rezervasyonVER").fadeIn(650);	
	});
	$("#icOzellikT").click(function() {
		$("#detayTAB a").removeClass("active");
		$("#icOzellikT").addClass("active");
		$(".tabDIV").hide();
		$("#icOzellik").fadeIn(650);	
	});
	$("#disOzellikT").click(function() {
		$("#detayTAB a").removeClass("active");
		$("#disOzellikT").addClass("active");
		$(".tabDIV").hide();
		$("#disOzellik").fadeIn(650);	
	});
	$("#cevreOzellikT").click(function() {
		$("#detayTAB a").removeClass("active");
		$("#cevreOzellikT").addClass("active");
		$(".tabDIV").hide();
		$("#cevreOzellik").fadeIn(650);	
	});
	$("#googleMapsT").click(function() {
		$("#detayTAB a").removeClass("active");
		$("#googleMapsT").addClass("active");
		$(".tabDIV").hide();
		$("#googleMaps").fadeIn(650);	
	});
	$("#yorumlarT").click(function() {
		$("#detayTAB a").removeClass("active");
		$("#yorumlarT").addClass("active");
		$(".tabDIV").hide();
		$("#yorumlar").fadeIn(650);	
	});
	
	
//	DETAY TAB END



//TABLO START
	$('.tabloBACK tr:odd').addClass('trARKA')
// TABLO END

/* resim url lerine link ekliyor
function(data){
  $.each(data.items, function(i,item){
    $("<img/>").attr("src", item.media.m).appendTo("#imagesdsdsds")
      .wrap("<a href='" + item.link + "'></a>");
    if ( i == 3 ) return false;
  });
};*/





 });

// ILETISIM 


function CheckElementValue(object, controlValue)
{

	if(document.getElementById(object).value == controlValue )
	{

	document.getElementById(object).className = "textareaERROR"
	document.getElementById(object).focus();
	return false; 
	}
	else
	document.getElementById(object).className = "textareaClass"

	return true;
}


function CheckForm_Iletisim()
{ 
	if(!CheckElementValue("I_isim_soyisim","" ))
	 { return false;}

	if(!CheckElementValue("I_email","" ))
	 { return false;}

	if(!CheckElementValue("I_telefon","" ))
	 { return false;}

	if(!CheckElementValue("I_mesaj","" ))
	 { return false;}
	 
	  if(document.getElementById("kodcuk").innerHTML==document.getElementById("I_guvenlik").value)
	 {
		document.iletisim_gonder.gonderr.disabled=true;
		document.iletisim_gonder.gonderr.value='Lutfen Bekleyiniz';
		 document.iletisim_gonder.submit();	}
		else	{
			alert("Lutfen Guvenlik Kodunu Yaziniz");
			
				return false;
			
				}
				
	
	 document.iletisim_gonder.submit();
} 

// iletižim end 



