
var gelenJSONdata;var gelenXMLHTTPREQUEST;var gelenAJAXREQUEST;var gelenJSONerror;function getirJSONdata(url){$.ajax({type:"GET",beforeSend:function(){},url:url,dataType:"json",cache:!false,async:true,success:function(gelen){gelenJSONdata=gelen;},complete:function(xmlHttp){gelenXMLHTTPREQUEST=xmlHttp;},error:function(objAJAXRequest,strError){gelenAJAXREQUEST=objAJAXRequest;gelenJSONerror=strError;}});}
function gosterJSONdonmedolap(imajlar,imgRoot){$(imajlar).each(function(index,value){value=imgRoot+value.img.src;var list=$('<li id="portfolio_'+index+'"></li>').attr('class','loading');$('ul#portfolio').append(list);var curr=$("ul#portfolio li#portfolio_"+index);var img=new Image();$(img).load(function(){$(this).css('display','none');$(curr).removeClass('loading').append(this);$(this).fadeIn();}).error(function(){$(curr).remove();}).attr('src',value);});}
var $buyuksayfaASPX="buyuksayfa1024T2.aspx";var domainvirtualname;var scrollStepLength=216;var imgLeftRightSpace=1;var galerim;var allimageswidth=0;var imagesroot;if(location.host.indexOf("localhost")==0)
domainvirtualname="deryaatici.comYeni";else
domainvirtualname=location.host;function DataYukle(jsondosyam){var status;if(turing=="tur")
status="YÜKLENİYOR...";else
status="LOADING...";var yetkili;var copyright;var siteadi;$.ajax({type:"GET",beforeSend:function(){$("#ALLPICSDIV").append("<span style='font-family:impact; font-size:100px; color:#efefef; margin-top:10px; display:block'>"+status+"</span>");},url:jsondosyam,dataType:"json",cache:!false,async:true,success:yukleVeInsaaEt,complete:function(){$("#ALLPICSDIV span").remove();},error:function(objAJAXRequest,strError){$("#ALLPICSDIV").append("<span>Bir Hata Oluştu !</span>");}});function yukleVeInsaaEt(icerik){yetkili=icerik.yetkili;copyright=icerik.copyright;siteadi=icerik.siteadi;imagesroot=icerik.imagesroot;galerim=icerik.resimCat2;$.each(galerim,function(i,resmin){var mdiv=document.createElement("div");if(resmin.resimdizim!=undefined)
{$.each(resmin.resimdizim,function(i,resmin){allimageswidth+=(parseInt(resmin.img.width,10)+imgLeftRightSpace);$("#ALLPICSDIV").append(imgelerimiOlustur(mdiv,resmin));})}
else
{allimageswidth+=(parseInt(resmin.img.width,10)+imgLeftRightSpace);$("#ALLPICSDIV").append(imgelerimiOlustur(mdiv,resmin));}});allimageswidth=(50+allimageswidth+50)+10;}
function imgelerimiOlustur(mdiv,resmin){var mimg=document.createElement("img");mimg.setAttribute("src",imagesroot+resmin.img.src);mimg.setAttribute("alt",resmin.img.alt+" "+resmin.sene+" "+copyright);mimg.setAttribute("title",resmin.img.alt+" "+resmin.sene+" "+copyright);mdiv.appendChild(mimg);return mdiv;}}
function kurulum(klonla)
{if(hardcoded)
{$("div.serit div.ELEMANLAR img").each(function(i){allimageswidth+=(this.width+imgLeftRightSpace);});allimageswidth=allimageswidth+10;}
else
{}
if(klonla){$("div.serit div.ELEMANLAR div").clone(true).appendTo($("div.serit div.ELEMANLAR"));allimageswidth+=allimageswidth;$("div.serit div.ELEMANLAR").css("left",-allimageswidth/2);}
else
{$("div.ELEMANLAR").css("left",0);}
$("div.serit div.ELEMANLAR").width(allimageswidth);}
function DonmeDolap(){kurulum(klonla);$("div.serit div.ELEMANLAR").draggable({"axis":"x",cursor:"crosshair"});var lastuniquedotdown="";var lastuniquedotup="";var leftrightdirection="left";var mouseXdown=0;var mouseXup=0;$("#ALLPICSDIV div img").live("mousedown",function(e){lastuniquedotdown=e.pageX+","+e.pageY
mouseXdown=e.pageX;});$("#ALLPICSDIV div img").live("mouseup",function(e){lastuniquedotup=e.pageX+","+e.pageY
mouseXup=e.pageX;if(lastuniquedotdown==lastuniquedotup){var clickedimgsrc;clickedimgsrc=$(this).attr("src");var p=clickedimgsrc.indexOf(domainvirtualname);if(p!=-1)clickedimgsrc=clickedimgsrc.substring(p+domainvirtualname.length+1);var pth=clickedimgsrc.substring(0,clickedimgsrc.lastIndexOf("/")+1);var filenm=clickedimgsrc.substring(clickedimgsrc.lastIndexOf("/")+1);imgfile=filenm.replace("_thn","_big");var clickedimgsrcbig=pth+imgfile;var openbig;var fullscr="type=fullWindow,fullscreen";fullscr="top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=yes";var acilanbupencere=window.open($buyuksayfaASPX+"?bu="+pth+imgfile,openbig,fullscr,true);acilanbupencere.focus();}
else
{if(mouseXdown>mouseXup)
{scrollStepLength=(mouseXdown-mouseXup);leftrightdirection="left";}
else
{scrollStepLength=(mouseXdown-mouseXup)*-1;leftrightdirection="right";}}
habireDon();});function habireDon()
{var gecen=parseInt($("div.ELEMANLAR").css("left"),10);if(-allimageswidth>gecen)
{$("div.ELEMANLAR").css("left",screen.availWidth);}
else if(screen.availWidth<gecen)
{$("div.ELEMANLAR").css("left",-allimageswidth);}
else
{if(gecen>0){}
if(gecen<0){}
if(leftrightdirection=="left")
$("div.ELEMANLAR").animate({"left":"-="+(1*scrollStepLength)+"px"},"slow");else
$("div.ELEMANLAR").animate({"left":"+="+(1*scrollStepLength)+"px"},"slow");}}
$("#ALLPICSDIV img").live("mouseover",function(){$(this).fadeTo("fast",.8);});$("#ALLPICSDIV img").live("mouseout",function(){$(this).fadeTo("fast",1);});$("div.ELEMANLAR").live("mouseover",function(){$(document).stopTime();});$("div.ELEMANLAR").live("mouseout",function(){$(document).everyTime(2000,habireDon);});$(document).oneTime(1,function(){$(document).everyTime(2000,habireDon);});$("#ESG").mousedown(function(e){lastuniquedotdown=e.pageX+","+e.pageY
mouseXdown=e.pageX;});$("#ESG").mouseup(function(e){lastuniquedotup=e.pageX+","+e.pageY
mouseXup=e.pageX;if(lastuniquedotdown==lastuniquedotup){var seritgenisligi=parseInt($("div.serit").css("width"),10);$("div.ELEMANLAR").animate({"left":-allimageswidth+seritgenisligi},"slow");}
else
{if(mouseXdown>mouseXup)
{scrollStepLength=(mouseXdown-mouseXup);leftrightdirection="left";}
else
{scrollStepLength=(mouseXdown-mouseXup)*-1;leftrightdirection="right";}
habireDon();}});$("#EBG").mousedown(function(e){lastuniquedotdown=e.pageX+","+e.pageY
mouseXdown=e.pageX;});$("#EBG").mouseup(function(e){lastuniquedotup=e.pageX+","+e.pageY
mouseXup=e.pageX;if(lastuniquedotdown==lastuniquedotup){$("div.ELEMANLAR").animate({"left":0},"slow");}
else
{if(mouseXdown>mouseXup)
{scrollStepLength=(mouseXdown-mouseXup);leftrightdirection="left";}
else
{scrollStepLength=(mouseXdown-mouseXup)*-1;leftrightdirection="right";}
habireDon();}});}