
$(function() {
	
	$('.gridly').gridly({
		base : 60, // px 
		gutter : -20, // px
		columns : 12
	});
	
	$('.gridly .brick').live('click',function(e){
		if(document.all){ //判断IE浏览器
			window.event.returnValue = false;
		}
		else{
			event.preventDefault();
			event.stopPropagation();
		};
		var js_img = $(this).attr("js-img");
		shopImageFlag = js_img;//所点击的商品图片标识
		speciFicationsFlag = 0;
		OpenPricureDialog("PopPicure", ADMINMAIN, 5);
	});
	
	$('.gridly .close-modal').click(function(){
		var curr = $(this);
		if (null != curr.prev().attr("data-id") && "" != curr.prev().attr("data-id")) {
			curr.prev().removeAttr("data-id");
			curr.prev().attr("src", ADMINIMG + "/Default.png");
		}
		return false;//防止事件冒泡
	})
	$('#img_box').live('click',function(e){
		if(document.all){ //判断IE浏览器
			window.event.returnValue = false;
		}
		else{
			event.preventDefault();
			event.stopPropagation();
		};
		var js_img = $(this).attr("js-img");
		shopImageFlag = js_img;//所点击的商品图片标识
		speciFicationsFlag = 0;
		OpenPricureDialog("PopPicure", ADMINMAIN, 5);
	});
	
	
});