﻿/*
 * jQuery zoomMenu plug-in
 * http://www.dasheng.com/
 *
 * Copyright (c) 2009-2012
 * Author: Dasheng
 *
 * Date: 2009-12-07 (Mon, 07 Dec 2009)
 * Revision: 0.04
 */
(function($){
	$.fn.zoomMenu=function(setting){
		return this.each(function(){
			
			//分析参数并设定默认值
			var way		="fade";	//显示方式:show|fade|slide|rollh|rollv 默认值:fade
			var speed	="normal";	//显示速度:"fast"|"nomarl"|"slow"|(毫秒数) 默认值:"nomarl
			var loop	=false;		//无缝轮滚:true|false 默认值:false
			var auto	= false;	//自动滚动:true|false 默认值:false
			var delay	=3;			//自滚延时:(秒) 默认值:3
			
			if(!(typeof(setting)=="undefined")){
				if(!(typeof(setting.way)=="undefined")) way=setting.way;
				if(!(typeof(setting.speed)=="undefined")) speed=setting.speed;
				if(!(typeof(setting.loop)=="undefined")) loop=setting.loop;
				if(!(typeof(setting.auto)=="undefined")) auto=setting.auto;
				if(!(typeof(setting.delay)=="undefined")) delay=setting.delay;
			}
			
			$(this).find("ul > li > a > img").hover(function(){
				$(this).addClass("hover");
				$(this).animate({marginTop:"-=10px",width:"90px",height:"100px"},200);
				
			},function(){
				$(this).removeClass("hover");
				$(this).animate({marginTop:"+=10px",width:"70px",height:"80px"},200);
			});
		});
	}
})(jQuery);
