$(document).ready(function(){
  if($(document).width()>1080)
    $("#feedback").show();
  imgpos=new Array();
  zoomansicht="Zoom-Ansicht";
  $("#paper img").each(function (i) {
    if($(this).parents().is('a')){
    } else {
      var imgsrc=fnm($(this).attr("src")).replace(/,rauch-it,/gi, ".rauch-it.");
      var img=new Image();
      $(this).attr("bigsrc",imgsrc);
      $(img).load(function () {
        if(!$("#paper img[bigsrc='"+imgsrc+"']").attr("title"))
          $("#paper img[bigsrc='"+imgsrc+"']").attr("title",zoomansicht);
        $("#paper img[bigsrc='"+imgsrc+"']").wrap("<a class='zoomit' href='"+imgsrc+"'></a>");
        $(".zoomit").append("<div class='zoomitimg' title='"+zoomansicht+"'></div>").lightBox();
      }).attr('src',imgsrc);
    }
  });
});
$(window).resize(function() {
  if($(document).width()>1080)
    $("#feedback").show(); else $("#feedback").hide();
});
function fnmALTEVERSION(filename) {
  y=filename.split('.');
  z=y.pop();
  return y+".gross."+z;
}
function fnm(filename) {
  zoomsize="500"; // 500 oder 640
  y=filename.split('.');
  ext=y.pop();
  size=y.pop();
  if(size>=zoomsize) zoomsize="nozoom";
  return y+"."+zoomsize+"."+ext;
}
