$(document).ready(function () {
  $('.m3 div').ifixpng();

/*
	jQuery(function($) {
		$("a.zoom").slimbox({
      'overlayOpacity': 0.0,
      'overlayFadeDuration': 0,
      'imageFadeDuration': 0,
      'captionAnimationDuration': 0,
      'resizeDuration': 0
    }, null, function(el) {
			return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
		});
	});
*/
	var img = '/inc/2/jquery/lightboxclone/images/';
  $('.zoom').lightBoxClone({
		overlayOpacity:	0.6,
		containerResizeSpeed:	100,
		imageLoading:	img + 'lightbox-ico-loading.gif',
		imageBtnPrev:	img + 'lightbox-btn-prev.gif',
		imageBtnNext:	img + 'lightbox-btn-next.gif',
		imageBtnClose:	img + 'lightbox-btn-close.gif',
		imageBlank:	img + 'lightbox-blank.gif'
		});
	
	$(".m2 td").bind("mouseover", function(e){
		$(this).find("div.m3").show(0);
	});
	$(".m2 td").bind("mouseout", function(e){
		$(this).find("div.m3").hide(0);
	});
});
function popup_big_pic(path, width, height, title, alt)
{
  if(!title) title = "Увеличенное изображение";
  if(!alt) alt = "Закрыть";
  var scroll = "no";
  var top=0, left=0;
  if(width > screen.width-10 || height > screen.height-28) scroll = "yes";
  if(height < screen.height-28) top = Math.floor((screen.height - height)/2-14);
  if(width < screen.width-10) left = Math.floor((screen.width - width)/2-5);
  width = Math.min(width, screen.width-10);
  height = Math.min(height, screen.height-28);
  var wnd = window.open("","","scrollbars="+scroll+",resizable=yes,width="+width+",height="+height+",left="+left+",top="+top);
  wnd.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
  wnd.document.write("<html>\n<head>\n");
  wnd.document.write("<title>"+title+"</title>\n");
  wnd.document.write("<script  type=\"text/javascript\">\n");
  wnd.document.write("<!--\n");
  wnd.document.write("function KeyPress()\n");
  wnd.document.write("{\n");
  wnd.document.write("if(window.event.keyCode == 27)\n");
  wnd.document.write("window.close();\n");
  wnd.document.write("}\n");
  wnd.document.write("//-->\n");
  wnd.document.write("</"+"script>\n");
  wnd.document.write("</head>\n");
  wnd.document.write("<body style=\"margin:0px;padding:0px;\" onKeyPress=\"KeyPress()\">\n");
  wnd.document.write("<a href=# title=Закрыть onclick='window.close()'><img src=\""+path+"\" border=\"0\" alt=\""+alt+"\"></a>");
  wnd.document.write("\n</body>");
  wnd.document.write("\n</html>");
  wnd.document.close();
  return false;
}
function ShowPage(PagePath, width, height)
{
  var scroll = 'no';
  var top=0, left=0;
  if(width > screen.width-10 || height > screen.height-28)
          scroll = 'yes';
  if(height < screen.height-28)
          top = Math.floor((screen.height - height)/2-14);
  if(width < screen.width-10)
          left = Math.floor((screen.width - width)/2);
  width = Math.min(width, screen.width-10);
  height = Math.min(height, screen.height-28);
  scroll = 'yes';
  window.open(PagePath,'','scrollbars='+scroll+',resizable=yes, width='+width+',height='+height+',left='+left+',top='+top);
  return false;
}

