$(document).ready(function(){$('.vitrin').hover(function(){$(this).addClass('vitrin-hover');},function(){$(this).removeClass('vitrin-hover');});$('.videos-next-button img').click(function(){var currentvideo=$('.videos li.current-video');if(!$('.videos li:last').prev().prev().prev().hasClass('current-video'))
{currentvideo.next().addClass('current-video');currentvideo.removeClass('current-video');$('ul.videos').animate({left:String('-'+$(".current-video").position().left+'px'),},500);}});$('.videos-previous-button img').click(function(){var currentvideo=$('.videos li.current-video');if(!$('.videos li:first').hasClass('current-video'))
{currentvideo.prev().addClass('current-video');currentvideo.removeClass('current-video');$('ul.videos').animate({left:String('-'+$(".current-video").position().left+'px'),},500);}});$('.videos-next-button2 img').click(function(){var currentvideo=$('.videos li.current-video');if(!$('.videos li:last').prev().prev().prev().hasClass('current-video'))
{currentvideo.next().addClass('current-video');currentvideo.removeClass('current-video');$('ul.videos').animate({left:String('-'+$(".current-video").position().left+'px'),},500);}});$('.videos-previous-button2 img').click(function(){var currentvideo=$('.videos li.current-video');if(!$('.videos li:first').hasClass('current-video'))
{currentvideo.prev().addClass('current-video');currentvideo.removeClass('current-video');$('ul.videos').animate({left:String('-'+$(".current-video").position().left+'px'),},500);}});$(".slide").jCarouselLite({btnGo:[".point1",".point2",".point3",".point4",".point5",".point6",".point7",".point8"],btnPause:".pause",visible:1,auto:4000,speed:1200,easing:"easeInBack"});$(".refers").jCarouselLite({visible:5,auto:4000,speed:1200,btnPrev:".prev",btnNext:".next"});$(".slayt").jCarouselLite({btnGo:[".p1",".p2",".p3",".p4"],visible:1,auto:4000,speed:200});$('#slideshow').cycle({fx:'scrollHorz',prev:'#prev',next:'#next',timeout:0});$(".sepetimci").fancybox({showCloseButton:false,ajax:{type:"GET"}});});function beklet(millis)
{var date=new Date();var curDate=null;do{curDate=new Date();}
while(curDate-date<millis);}
function guncelle(idm,adet,birim){$('#takipsonuc').html("");jQuery.ajax({type:'POST',url:'/siparisislem.php',data:"islem=siparisguncel&idm="+idm,success:function(veri){$('#takipsonuc').html(veri);},error:function(){}});}
function temizle(){document.f1.reset();var table=document.getElementById("tablogirisid");var tbody=table.tBodies[0];while(tbody.hasChildNodes&&tbody.lastChild)
{tbody.removeChild(tbody.lastChild);}
$('#takipsonuc').html("");jQuery.ajax({type:'POST',url:'/siparisislem.php',data:"islem=temizle",success:function(veri){$('#gonderbakbakalim').html(veri);},error:function(){}});}
function iframeyazdir(konum,islem)
{var i=0;for(i=0;i<=2;i++)
{if(i==0){var urunid=document.f1.urunadi.options[document.f1.urunadi.selectedIndex].value;var adet=document.f1.gizliadet.value;var birim=document.f1.birimi.options[document.f1.birimi.selectedIndex].text;var birimid=document.f1.birimi.options[document.f1.birimi.selectedIndex].value;if(birimid!="0"){gondewrs("idm="+urunid+"&adet="+adet+"&birim="+birim);}}else if(i==1){document.getElementsByName(konum)[0].contentWindow.location.href="/siparisislem.php?islem="+islem;konum.focus();konum.print();}else{songonderim();}}}
function gonder(tur,dosya,veri,nereye){jQuery.ajax({type:tur,url:dosya,data:veri,success:function(veri){$(nereye).html(veri);},error:function(){}});}
function numonly(root){var reet=root.value;var arr1=reet.length;var ruut=reet.charAt(arr1-1);if(reet.length>0){var regex=/[0-9]|\./;if(!ruut.match(regex)){var reet=reet.slice(0,-1);$(root).val(reet);}}}
function alandegis(neyi){gonder('GET','tekliislem.php','altgrup=1&idm='+neyi+'','#grup2');}
function alandegis2(neyi){gonder('GET','tekliislem.php','idm='+neyi+'','#urunler');}
function gondewrs(icerik){$('#gonderbakbakalim').html("");jQuery.ajax({type:'POST',url:'/siparisislem.php',data:"islem=ozel&"+icerik,success:function(veri){$('#gonderbakbakalim').html(veri);},error:function(){}});}
function guncellewe(icerik){$('#gonderbakbakalim').html("");jQuery.ajax({type:'POST',url:'/siparisislem.php',data:"islem=guncelle&"+icerik,success:function(veri){$('#gonderbakbakalim').html(veri);},error:function(){}});}
function kaldirmece(icerik){$('#gonderbakbakalim').html("");jQuery.ajax({type:'POST',url:'/siparisislem.php',data:"islem=kaldir&"+icerik,success:function(veri){$('#gonderbakbakalim').html(veri);},error:function(){}});}
function birimac(){return document.getElementById("birimi").disabled=false;}
function removeElement(secimci){var sonhali=secimci;document.getElementById('tablogirisid').tBodies[0].deleteRow(secimci-1)}
