$(
	function()
	{
		$("a.cssViewComment").each(
			function()
			{
				$(this).click(
					function()
					{
						//alert($(this).attr('i'));
						$("#viewcomment").remove();
						$(this).parent().parent().parent().children("div.cssItemFooter").before("<div id='viewcomment'></div>");
						
						objPost = new Object();
						objPost.action 	= 'info';
						objPost.do1 	= 'getComment';
						objPost.i	= $(this).attr('i');
		
						$("#viewcomment").load('library/flow/index.php' , objPost );
					}
				);
			}
		);
	/*
		if ($("div.cssLeftPanel").height() >= $("div.cssRightPanel").height())
			$("div.cssLeftPanel").css('border-right','1px');
		else
			$("div.cssRightPanel").css('border-left','1px');
	*/
	
		$("div.cssImg").each(
			function(i)
			{
				intLimitW = 700;
				strPath = $(this).children("input:eq(0)").val();
				$(this).attr("id","itemab"+i);

				objImg = new Image();
				$(objImg).load(
					function()
					{
						$("#itemab"+i).append(this);
						
						intW = $(this).width();
						intH = $(this).height();

						if (intW > intLimitW )
						{
							intH = intLimitW / intW * intH;

							$(this).css('width' , intLimitW );
							$(this).css('height', intH);
							intW = intLimitW;
						}

						//$(this).css('margin-left' , );
						
						$(this).mouseover(
							function()
							{
								$(this).css('cursor','pointer');
							}
						)

						$(this).click(
							function()
							{
								jsOpenImgLayer($(this).attr('src'));
							}
						);
					}
				).attr('src',strPath);

			}
		);
	}
);

function jsOpenImgLayer(strSrc)
{
	if (strSrc != "" )
	{
		jsShowImageFullSize(strSrc);		
	}
}

