function clickclear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) 
		thisfield.value = "";
}

function clickrecall(thisfield, defaulttext) {
	if (thisfield.value == "")
		thisfield.value = defaulttext;
}


function elementicek(element) {
	return document.getElementById(element);
}

function uyari(mesaj) {
	alert(mesaj);
	return false;
}

function Toggle(element) {
	var e = elementicek(element);
	if (e.style.display == 'none')
		e.style.display = '';
	else
		e.style.display = 'none';
}

function Ac(element) {
	var e = elementi_cek(element);
	e.style.display = '';
}

function oycu(yorum_id,oy){
	$.post('motor.php',	{yorum_id : yorum_id , oy : oy , islem : 'yorum_oylama'},
		function(ajaxCevap){
			$('#yorum-'+yorum_id).html(ajaxCevap); 	
		}
	);
}

function oycu_urun(urun_id,oy){
	$.post('motor.php',	{urun_id : urun_id , oy : oy , islem : 'urun_oylama'},
		function(ajaxCevap){
			$('#urun-'+urun_id).html(ajaxCevap); 	
		}
	);
}

function sepetSil(id){
	var confirmMsg = "Ürün sepetinizden silinecek! Devam etmek istiyor musunuz?";
	if (confirm(confirmMsg))
		{
		var adsoyad = $('#tes_ad_soyad').val();
		var tckimlik = $('#tes_tckimlik').val();
		var telefon = "0 ("+$('#tes_telefon1').val()+") "+$('#tes_telefon2').val();
		if(telefon.length<9)
			telefon = "";
		var telefon2 = $('#tes_telefon3').val();
		var adres = $('#tes_adres').val();
		var il = $('#tes_il').val();
		var ilce = $('#tes_ilce').val();
		var email = $('#tes_email').val();
		//var sozlesme = $('input:checkbox[name=sozlesme]:checked').val();
		$.post('motor.php',	{id : id, islem : 'sepet_sil'},
			function(ajaxCevap){
				$('#sepet_content').html(ajaxCevap); 	
				$.post('motor.php',	{id : id, islem : 'sepet_ust_toplam'},
					function(ajaxCevap){
						$('#sepet_ust_toplam').html(ajaxCevap);
						
						$.post('motor.php',	{ adsoyad : adsoyad, tckimlik : tckimlik, telefon : telefon, telefon2 : telefon2, adres : adres, il : il, ilce : ilce, email : email, islem : 'teslimat_formlar'},
							function(ajaxCevap){
								$('#teslimat_forms').html(ajaxCevap); 
								$("#tes_telefon2").mask("999 99 99");
								$("#tes_telefon3").mask("(999) 999 99 99");
							}
						);
					}
				);
			}
		);
		}
	return false;
}

function adetDegis(adet,id){
	$.post('motor.php',	{id : id, adet : adet, islem : 'fiyat_adet_degis'},
		function(ajaxCevap){
			$('#fiyat'+id).html(ajaxCevap); 	
			$.post('motor.php',	{id : id, adet : adet, islem : 'toplam_adet_degis'},
				function(ajaxCevap){
					$('#toplam_div').html(ajaxCevap); 
					$.post('motor.php',	{islem : 'sepet_ust_toplam'},
						function(ajaxCevap){
							$('#sepet_ust_toplam').html(ajaxCevap); 	
						}
					);
				}
			);
		}
	);
	return false;
}

function ilceFetch(id){
	$.post('motor.php',	{id : id , islem : 'ilce_fetch'},
		function(ajaxCevap){
			$('#ilce').html(ajaxCevap); 	
		}
	);
}

function odemeyeGec(){
	
	var hata = '';
	var adsoyad = $('#tes_ad_soyad').val();
	var telefon = "0 ("+$('#tes_telefon1').val()+") "+$('#tes_telefon2').val();
	if(telefon.length<9)
		telefon = "";
	
	var telefon2 = $('#tes_telefon3').val();
	var adres = $('#tes_adres').val();
	var il = $('#tes_il').val();
	var ilce = $('#tes_ilce').val();
	var email = $.trim($('#tes_email').val());
	//var sozlesme = $('input:checkbox[name=sozlesme]:checked').val();
	var exp = /^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$/;
	if(adsoyad=='')
		hata = hata + '* Ad alanını boş bırakmayınız.<br />';
	if(telefon=='' && telefon2=='')
		hata = hata + '* Cep Telefonu ya da Telefon alanlarından en az 1\'ini doldurunuz.<br />';
	if(adres=='')
		hata = hata + '* Adres alanını boş bırakmayınız.<br />';
	if(il=='')
		hata = hata + '* Teslimat adresi için İl seçiniz.<br />';
	if(ilce=='')
		hata = hata + '* Teslimat adresi için İlçe seçiniz.<br />';
	if(email.length>0 && !(email.match(exp)))
		hata = hata + '* Lütfen geçerli bir e-posta adresi giriniz.<br />';
	//if(sozlesme!='E')
		//hata = hata + '* Sipariş\'e devam edebilmek için sözleşmeyi okuyup kabul ettiğinizi belirten kutucuğu işaretlemeniz gerekmektedir.';
		
	if(hata!='')
		{
		$('#hata').animate({opacity: 'hide', height: 'hide'}, 'fast');
		$('#hata').html(hata).animate({opacity: 'show', height: 'show'}, 'fast');
		}
	else
		{
		$("#siparis_load").animate({opacity: 'show', height: 'show'}, 'normal');
		$("#siparis_sag").animate({opacity: 'hide', height: 'hide'}, 'normal', function(){
			$.post('motor.php',	{adsoyad : adsoyad, telefon : telefon, telefon2 : telefon2, adres : adres, il : il, ilce : ilce, email : email, islem : 'odemeye_gec'},
				function(ajaxCevap){
					//alert(ajaxCevap);
					if(ajaxCevap==1)
						{
						$.post('motor.php',	{ islem : 'odeme'},
							function(ajaxCevap){
								$.post('motor.php',	{islem : 'sepet_deaktif'},
									function(ajaxCevap){
										$('#sepet_content').html(ajaxCevap); 	
									}
								);
								//alert(ajaxCevap);
								$("#siparis_load").animate({opacity: 'hide', height: 'hide'}, 'normal');
								$('#siparis_sag').html(ajaxCevap).animate({opacity: 'show', height: 'show'}, 'normal');
								var headID = document.getElementsByTagName("head")[0];         
								var cssNode = document.createElement('link');
								cssNode.type = 'text/css';
								cssNode.rel = 'stylesheet';
								cssNode.href = 'css/uniform.aristo.css';
								cssNode.media = 'screen';
								headID.appendChild(cssNode);
								$("input.uniform, select.uniform, input.odeme_radio, input.secim_radio").uniform();
								$('#kk_no1, #kk_no2, #kk_no3, #kk_no4').autotab_magic().autotab_filter('numeric');
								$("#havale").hide(); 
								$("#kapidaodeme").hide();
								$("#pttceki").hide();
								
								$(".sozlesme").colorbox({width:"850px", height:"550px", inline:true, scrolling:true, close : 'kapat', previous : '', next : '', href:function(){
									var href = "#"+$(this).attr('rel');
									return href;
								}});
								$(".colorbox").colorbox();
								
								$('.odeme_radio').change(function() {
									var id = $(this).val();
									$(".tab_content").animate({opacity: 'hide', height: 'hide'}, 'normal');
									$("#"+id).animate({opacity: 'show', height: 'show'}, 'normal');
									//return false;
								});
								
								$.post('motor.php',	{islem : 'sozlesmeUpdate'},
									function(ajaxCevap){
										$('#sozlesme').html(ajaxCevap); 	
									}
								);
								/*$(".sozlesme").colorbox({width:"850px", height:"550px", inline:true, scrolling:true, href:function(){
									var href = "#"+$(this).attr('rel');
									return href;
								}});*/
								
							}
						);
						}
					else if(ajaxCevap==2)
						{
						$.post('motor.php',	{ adsoyad : adsoyad, telefon : telefon, telefon2 : telefon2, adres : adres, il : il, ilce : ilce, email : email, islem : 'teslimat'},
							function(ajaxCevap){
								$('#siparis_sag').html(ajaxCevap).animate({opacity: 'show', height: 'show'}, 'normal');
								$("input.uniform").uniform();
								$("#tes_telefon2").mask("999 99 99");
								$("#tes_telefon3").mask("(999) 999 99 99");
							}
						);	
						}
				}
			);
		});
		}
}

function odemeTest(odeme){
if(odeme=='kredikarti')
	{
	var pos = $('#pos').val();	
	var kksecim = $('input:radio[name=kk_secim]:checked').val();
	var kkno1 =  $('#kk_no1').val();
	var kkno2 =  $('#kk_no2').val();
	var kkno3 =  $('#kk_no3').val();
	var kkno4 =  $('#kk_no4').val();
	var cvc2 =  $('#cvc2').val();
	var ay =  $('#ay').val();
	var yil =  $('#yil').val();
	var referans =  $('#referans').val();
	$('#siparisi_tamamla').html('<img src="resimler/loading.gif" title="İşleminiz Gerçekleştiriliyor" style="margin:15px 50px 0 0;" />');
	$.post('motor.php',	{pos : pos, kksecim : kksecim, kkno1 : kkno1, kkno2 : kkno2, kkno3 : kkno3, kkno4 : kkno4, cvc2 : cvc2, ay : ay, yil : yil, referans : referans, tip : 'kredikarti', islem : 'odeme_test'},
		function(ajaxCevap){
			//alert(ajaxCevap);
			if(ajaxCevap==0)
				{
				$.post('motor.php',	{pos : pos, kksecim : kksecim, kkno1 : kkno1, kkno2 : kkno2, kkno3 : kkno3, kkno4 : kkno4, cvc2 : cvc2, ay : ay, yil : yil, islem : 'kk_hata'},
					function(ajaxCevap){
						$('#kredikarti').html(ajaxCevap); 
						$("input.uniform, select.uniform").uniform();
						$('#kk_no1, #kk_no2, #kk_no3, #kk_no4').autotab_magic().autotab_filter('numeric');
					}
				);
				}
			else if(ajaxCevap>0)
				{
				var sip_no = ajaxCevap;
				$.post('motor.php',	{siparis_no : sip_no , islem : 'siparis_tamam'},
					function(ajaxCevap){
						$('#siparis_sag').html(ajaxCevap); 
						$.post('motor.php',	{islem : 'sepet_deaktif'},
							function(ajaxCevap){
								$('#sepet_content').html(ajaxCevap); 
								$.post('motor.php',	{islem : 'sepet_ust_toplam'},
									function(ajaxCevap){
										$('#sepet_ust_toplam').html(ajaxCevap); 
										$.post('motor.php',	{ siparis_no : sip_no, islem : 'mail_gonder'});
									}
								);
							}
						);
					}
				);	
				}
		}
	);
	}
else if(odeme=='havale')
	{
	$('#siparisi_tamamla1').html('<img src="resimler/loading.gif" title="İşleminiz Gerçekleştiriliyor" style="margin:15px 50px 0 0;" />');
	var havale_secim = $('input:radio[name=havale_secim]:checked').val();
	$.post('motor.php',	{havale_secim : havale_secim, referans : referans, tip : 'havale', islem : 'odeme_test'},
		function(ajaxCevap){
			if(ajaxCevap==0)
				{
				$.post('motor.php',	{islem : 'havale_hata'},
					function(ajaxCevap){
						$('#havale').html(ajaxCevap); 
						$("input.uniform, select.uniform").uniform();
					}
				);
				}
			else if(ajaxCevap>0)
				{
				var sip_no = ajaxCevap;
				$.post('motor.php',	{siparis_no : sip_no , islem : 'siparis_tamam'},
					function(ajaxCevap){
						$('#siparis_sag').html(ajaxCevap); 
						$.post('motor.php',	{islem : 'sepet_deaktif'},
							function(ajaxCevap){
								$('#sepet_content').html(ajaxCevap); 
								$.post('motor.php',	{islem : 'sepet_ust_toplam'},
									function(ajaxCevap){
										$('#sepet_ust_toplam').html(ajaxCevap); 
										$.post('motor.php',	{ siparis_no : sip_no, islem : 'mail_gonder'});
									}
								);
							}
						);
					}
				);	
				}
		}
	);
	}
else if(odeme=='kapidaodeme')
	{
	$('#siparisi_tamamla2').html('<img src="resimler/loading.gif" title="İşleminiz Gerçekleştiriliyor" style="margin:15px 50px 0 0;" />');
	var kapida_odeme_farki = $('#kapida_odeme_farki').val();
	$.post('motor.php',	{kapida_odeme_farki : kapida_odeme_farki, referans : referans, tip : 'kapidaodeme', islem : 'odeme_test'},
		function(ajaxCevap){
			if(ajaxCevap==0)
				{
				$.post('motor.php',	{islem : 'kapidaodeme_hata'},
					function(ajaxCevap){
						$('#kapidaodeme').html(ajaxCevap); 
					}
				);
				}
			else if(ajaxCevap>0)
				{
				var sip_no = ajaxCevap;
				$.post('motor.php',	{siparis_no : sip_no , islem : 'siparis_tamam'},
					function(ajaxCevap){
						$('#siparis_sag').html(ajaxCevap); 
						$.post('motor.php',	{islem : 'sepet_deaktif'},
							function(ajaxCevap){
								$('#sepet_content').html(ajaxCevap); 
								$.post('motor.php',	{islem : 'sepet_ust_toplam'},
									function(ajaxCevap){
										$('#sepet_ust_toplam').html(ajaxCevap); 
										$.post('motor.php',	{ siparis_no : sip_no, islem : 'mail_gonder'});
									}
								);
							}
						);
					}
				);	
				}
		}
	);
	}
else if(odeme=='pttceki')
	{
	$('#siparisi_tamamla3').html('<img src="resimler/loading.gif" title="İşleminiz Gerçekleştiriliyor" style="margin:15px 50px 0 0;" />');
	var pttceki_secim = $('input:radio[name=pttceki_secim]:checked').val();
	$.post('motor.php',	{pttceki_secim : pttceki_secim, referans : referans, tip : 'pttceki', islem : 'odeme_test'},
		function(ajaxCevap){
			if(ajaxCevap==0)
				{
				$.post('motor.php',	{islem : 'pttceki_hata'},
					function(ajaxCevap){
						$('#pttceki').html(ajaxCevap); 
						$("input.uniform, select.uniform").uniform();
					}
				);
				}
			else if(ajaxCevap>0)
				{
				var sip_no = ajaxCevap;
				$.post('motor.php',	{siparis_no : sip_no , islem : 'siparis_tamam'},
					function(ajaxCevap){
						$('#siparis_sag').html(ajaxCevap); 
						$.post('motor.php',	{islem : 'sepet_deaktif'},
							function(ajaxCevap){
								$('#sepet_content').html(ajaxCevap); 
								$.post('motor.php',	{islem : 'sepet_ust_toplam'},
									function(ajaxCevap){
										$('#sepet_ust_toplam').html(ajaxCevap); 
										$.post('motor.php',	{ siparis_no : sip_no, islem : 'mail_gonder'});
									}
								);
							}
						);
					}
				);	
				}
		}
	);
	}
}


function geriDon(){
	$('.geri_don').html('<img src="resimler/loading.gif" title="İşleminiz Gerçekleştiriliyor" style="margin:15px 50px 0 0;" />');
	$.post('motor.php',	{ islem : 'teslimat'},
		function(ajaxCevap){
			$("#odeme").animate({opacity: 'hide', height: 'hide'}, 'normal');
			$('#siparis_sag').html(ajaxCevap).animate({opacity: 'show', height: 'show'}, 'normal');
			$("input.uniform").uniform();
			$("#tes_telefon2").mask("999 99 99");
			$("#tes_telefon3").mask("(999) 999 99 99");
			/*$(".sozlesme").colorbox({width:"850px", height:"550px", inline:true, scrolling:true, href:function(){
				var href = "#"+$(this).attr('rel');
				return href;
			}});*/
			$.post('motor.php',	{islem : 'sepet_aktif'},
				function(ajaxCevap){
					$('#sepet_content').html(ajaxCevap); 	
				}
			);
		}
	);	
}

function sepeteEkle(urun_id){
	
	$('html, body').animate({scrollTop:0}, 600);
	$('#sepet_ust_toplam').html('<img src="resimler/loading.gif" style="margin-right:25px; margin-top:2px;" />'); 	
	$.post('motor.php',	{urun_id : urun_id, islem : 'sepete_ekle'},
		function(ajaxCevap){
			$('#sepet_ust_toplam').html(ajaxCevap); 
			var answer = confirm("Ürününüz sepete eklendi. Ürünü hemen satın almak ister misiniz?")
			if (answer){ 
				location.href = "https://seslial.com/sepet/";
			} 
			else { return false; }
		}
	);
}

function kkSecimFetch(pos_id, toplam_tutar){
	$.post('motor.php',	{pos_id : pos_id, toplam_tutar : toplam_tutar, islem : 'kk_secim_ayikla'},
		function(ajaxCevap){
			$('#kk_secimler').html(ajaxCevap);
			$("input.secim_radio").uniform();
		}
	);
}

function siparisList(){
	$('#buton1').html('<img src="resimler/loading.gif" style="margin-left:25px;" />'); 
	var email = $('#email1').val();
	var exp = /^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$/;
	if(!(email.match(exp)))
		{
		$('#hata1').html('* Lütfen geçerli bir e-posta adresi giriniz.');
		$('#buton1').html('<img src="resimler/siparislerimi_listele.png" style="cursor:pointer;" onclick="siparisList()"  />');
		}
	else
		$.post('motor.php',	{email : email, islem : 'siparis_listele'},
			function(ajaxCevap){
				$('#siparislist').html(ajaxCevap); 
				$('#hata1').html('');
				$('#buton1').html('<img src="resimler/siparislerimi_listele.png" style="cursor:pointer;" onclick="siparisList()"  />');
			}
		);
}

function siparisleriMaille(){
	var email = $('#email3').val();
	$('#buton3').html('<img src="resimler/loading.gif" style="margin-left:25px; padding-right:5px; " align="left" /> Sipariş Dökümleriniz '+email+' adresine gönderiliyor...'); 
	var ids = new Array;
	$(".siparis_sil:checked").each(function(){
		ids.push($(this).val());
	});
	ids = ids.join(",");
	$.post('motor.php',	{email : email, ids : ids, islem : 'siparis_maille'},
		function(ajaxCevap){
			$('#siparislist').html(ajaxCevap); 
		}
	);
	return false;
}

function siparisFetch(){
	$('#buton2').html('<img src="resimler/loading.gif" style="margin-left:25px;" />'); 
	var email = $('#email2').val();
	var siparis_no = $('#siparis_no').val();
	var exp = /^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$/;
	var exp2 = /^\d+$/;
	if(!(email.match(exp)))
		{
		$('#hata2').html('* Lütfen geçerli bir e-posta adresi giriniz.');
		$('#buton2').html('<img src="resimler/siparisi_goster.png" style="cursor:pointer;" onclick="siparisFetch()"  />');
		}
	else if(!(siparis_no.match(exp2)))
		{
		$('#hata2').html('* Sipariş numaranız sayısal karakterlerden oluşmalıdır.');
		$('#buton2').html('<img src="resimler/siparisi_goster.png" style="cursor:pointer;" onclick="siparisFetch()"  />');
		}
	else
		$.post('motor.php',	{email : email, siparis_no : siparis_no, islem : 'siparis_dokumu'},
			function(ajaxCevap){
				var sonuc = ajaxCevap.substr(0,1);
				if(sonuc=='*')
					{
					$('#hata2').html(ajaxCevap);
					$('#buton2').html('<img src="resimler/siparisi_goster.png" style="cursor:pointer;" onclick="siparisFetch()"  />');
					}
				else
					$('#siparis_dokum').html(ajaxCevap); 
			}
		);
}

function siparisBack(){
	$.post('motor.php',	{ islem : 'siparis_geri'},
		function(ajaxCevap){
			$('#siparis_dokum').html(ajaxCevap);
		}
	);
	return false;
}

function sinavSec(){
	var gun = $("#gs_select").val();
	var cls = '';
	var digit = '';
	
	if (gun.length==1){
		cls = 'dashs';
		digit = '<div class="digit">'+ gun.slice(0,1) +'</div>';
	} else if (gun.length==2){
		cls = '';
		digit = '<div class="digit">'+ gun.slice(0,1) +'</div><div class="digit">'+ gun.slice(1,2) +'</div>';
	} else if (gun.length==3){
		cls = 'dashb';
		digit = '<div class="digit">'+ gun.slice(0,1) +'</div><div class="digit">'+ gun.slice(1,2) +'</div><div class="digit">'+ gun.slice(2,3) +'</div>';
	}
	
	var data = '<div class="cntdwn">'+
		'<div class="dash days_dash '+cls+'">'+
		'<span class="dash_title">GÜN</span>'+
		'<div>'+digit+'<div class="clr"></div>'+
		'</div></div></div>';
	$(".gsayim").html('');
	$(".gsayim").html(data);
}

function populer(){
	var first = 0;
	var speed = 700;
	var pause = 6000;
	
		function removeFirst(){
			first = $('div.ogrenci-yorum .yrm .pop:first').html();
			$('div.ogrenci-yorum .yrm .pop:first')
			.animate({opacity: 0}, speed)
			.slideUp('slow', function() {$(this).remove();});
			addLast(first);
		}
		
		function addLast(first){
			last = '<div class="pop" style="display:none">'+first+'</div>';
			$('div.ogrenci-yorum .yrm').append(last)
			$('div.ogrenci-yorum .yrm .pop:last')
			.animate({opacity: 1}, speed)
			.fadeIn('fast')
		}
	
        interval = setInterval(removeFirst, pause);
        //$('div.ogrenci-yorum .yrm').mouseenter(function(){
          //  clearInterval(interval);
       // });
       // $('div.ogrenci-yorum .yrm').mouseleave(function(){
			// clearInterval(interval);
            //interval = setInterval(removeFirst, pause);
       // });
	}

function bolumCheck(id){
	var bolum = $('#kriter'+id).val();
	if(bolum.length>0)
		return true;
	else
		{
		alert('Lütfen Bölüm Seçiniz.');
		return false;
		}
}
 
function bsaCheck() {
	var ad = $('#bsa_ad_soyad').val();
	var telefon = $('#bsa_telefon').val();
	var konu = $('#bsa_konu').val();
	
	if(ad=='' || ad=='Adınızı soyadınızı giriniz.')
		$('#bsa_ad_soyad').val('Adınızı soyadınızı giriniz.');	
	
	if(konu=='' || konu=='Konu Belirtiniz.')
		$('#bsa_konu').val('Konu Belirtiniz.');
	
	if (telefon.length < 11 || telefon=='Telefon Numaranızo 11 hane olmalıdır.')
		$('#bsa_telefon').val('Telefon Numaranız 11 hane olmalıdır.');	
	
	
	if(telefon.length > 10 && telefon!='Telefon Numaranız 11 hane olmalıdır.' && ad!='' && ad!='Adınızı soyadınızı giriniz.' && konu!='' && konu!='Konu Belirtiniz.')
		return true;
	else
		return false;
 }
 
function bsaCheck2() {
	var ad = $('#bsa_ad_soyad2').val();
	var telefon = $('#bsa_telefon2').val();
	var konu = $('#bsa_konu2').val();
	
	
	if(ad=='' || ad=='Adınızı soyadınızı giriniz.')
		$('#bsa_ad_soyad2').val('Adınızı soyadınızı giriniz.');	
	
	if(konu=='' || konu=='Konu Belirtiniz.')
		$('#bsa_konu2').val('Konu Belirtiniz.');	
		
	if (telefon.length < 11 || telefon=='Telefon Numaranızo 11 hane olmalıdır.')
		$('#bsa_telefon2').val('Telefon Numaranız 11 hane olmalıdır.');	
	
	
	if(telefon.length > 10 && telefon!='Telefon Numaranız 11 hane olmalıdır.' && ad!='' && ad!='Adınızı soyadınızı giriniz.' && konu!='' && konu!='Konu Belirtiniz.')
		{
		$.post('motor.php',	{ ad : ad, konu : konu, telefon : telefon, islem : 'bsa_kaydet'},
			function(ajaxCevap){
				$('#bsa2').html(ajaxCevap);
				$("#bsa_telefon2").mask("9 (999) 999 99 99");
			}
		);
		return false;	
			
		}
	else
		return false;
 }
 
function salla(){
$(".gsayim").effect("shake", { times:3 }, 100);

}
$(document).ready(function () {
	populer();
	interval = setInterval(salla, 3000);
	
});

function myPopup(url) {
	window.open( url, "myWindow", "status = 1, height = 375, width = 475, resizable = 0" )
	return false;
}

function yorumGetir(){
	$('#yorumlar_genel').html('<table border="0" cellspacing="1" cellpadding="5"><tr><td width="25"><img src="resimler/loading.gif" title="İşleminiz Gerçekleştiriliyor" /></td><td>Yorumlar Yükleniyor...</td></tr></table>');
	$.post('motor.php',	{ islem : 'yorum_getir'},
		function(ajaxCevap){
			$('#yorumlar_genel').html(ajaxCevap);
			initPagination();
			return false;
		}
	);
}

function yorumOyla(id,tip){
	var mevcut = $('#yorum'+tip+id).html(); 
	$.post('motor.php',	{id : id, tip : tip, mevcut : mevcut, islem : 'yorum_oyla'},
		function(ajaxCevap){
			$('#yorum'+tip+id).html(ajaxCevap); 	
		}
	);
	return false;
}
