// JavaScript Document
/*
Content: Common components;
Remark: 修改产品图片<=4禁止滚动;;
Version: v0.1;
Author: guanxin.com JF.Z;
Date: 2010-07-27
*/
var thisMLeft = 0;
var thisMNum = 55;
var thisMWidth;
var MoveImg;
$(function(){
	thisMWidth = $(".mover li").length*62+$(".mover li").length*10;
	$(".mover").css({"width":thisMWidth});
	$(".MoveLeft").click(function(){
		MoveLeft();
	});
	$(".MoveRight").click(function(){
		MoveRight();
	});
	$(".mover img").click(function(){
		
	});
	MoveImg = $(".mover img").length;
})
function MoveLeft(){
	if(MoveImg > 4){
		if(Math.abs(thisMLeft+thisMNum*2.5) < thisMWidth){
			thisMLeft = thisMLeft + thisMNum;
			
		}else{
			thisMLeft = 0;
		}
		$(".mover").animate({marginLeft:thisMLeft},300);
	}else{
		//return false;
	}
}
function MoveRight(){
	if(MoveImg > 4){
		if(Math.abs(thisMLeft-thisMNum*3) < thisMWidth){
			thisMLeft = thisMLeft - thisMNum;
			
		}else{
			thisMLeft = 0;
		}
		$(".mover").animate({marginLeft:thisMLeft},300);
	}else{
		//return false;
	}
	
}
$.fn.puctlict=function(a,b){
	$(b).each(function(){
	})
	.click(function(){
		$(a + " img").attr("src",$(this).attr("dd"));
		$("img.pl").css({"border":"1px solid #D7DCD7"});
		$(this).css({"border":"1px solid #F18200"});
	})
}
function picrun_ini(){

}
