$.extend(_fw.meth,{
	uSlider:{
		items:false,
		pagination:false,
		pagArea:'>a',
		pagEv:'click',
		pagActiveCl:'active',
		navLinks:'a[rel=nav]',
		changeEv:'_change',
		pagCallback:false,
		duration:600,
		minSleep:300,
		easing:'',
		wrapper:'<div class="wrapper"></div>',
		show:false,
		nextBu:false,
		prevBu:false,
		beforeChange:function(){},
		afterChange:function(){},
		animationCallback:function(){},
		navFu:function(){
			var _=this
			$(_.navLinks).live('click',function(){
				if(_.holder.is(':visible'))
					_.holder.show()
				_.changeFu($(this))
				return false 
			})
		},
		preFu:function(){
			var _=this,
				itms=_.itms=[]
			if(_.items)
				$(_.items).each(function(){
					itms.push($(this))
				}),
				_.method='html'
			else
				_.method='ajax'
		},
		pagPreFu:function(){
			var _=this,
				tagName,
				pags=_.pags=$(_.pagination)
			pags
				.parent()
					.each(function(){
						$(this).find(tagName='>'+pags.attr('tagName'))
							.each(function(i){
								var th=
								$(this)
									.data({num:i})
									.find(_.pagArea)
										.bind(_.pagEv,function(){
											_.changeFu(i)
											return false
										})
								if(_.method=='ajax')
									_.itms[i]=th.attr('href')
							})
					})
		},
		pagFu:function(num){
			var _=this
			_.pags.each(function(){
				var th=$(this)
				if(th.data('num')==num)
					th.addClass(_.pagActiveCl)
				else
					th.removeClass(_.pagActiveCl)
			})
			if(_.pagCallback)
				_.pagCallback()
		},
		showFu:function(){
			var _=this
			if(_.method=='html')
				$(_.itms).each(function(){
					$(this).hide()
				}),
				_.next.show()

			_.next
				.stop()
				.css({opacity:0})					
				.animate({
					opacity:1
				},{
					duration:_.duration,
					easing:_.easing,
					complete:function(){
						if(_.animationCallback)
							_.animationCallback()
					}
				})
		},
		changeFu:function(num){
			var _=this,
				tmp
			if(num==_.currN)
				return false
			if(num.attr)
				_.next=num.attr('href'),
				_.pags.removeClass(_.pagActiveCl),
				_.currN=-1
			else				
				_.next=_.itms[num],
				_.currN=num,
				_.pagFu(num)
			if(_.method=='html')
				_.showFu()
			_.beforeChange
			if(_.method=='ajax')
				_.spinner.appendTo(_.holder),
				$.ajax({
					url:_.next,
					cache:false,
					success:function(res){
								setTimeout(function(){
									res=$(res)
									_.next=res
										.appendTo(_.holder.empty())
									_.showFu()									
									_.afterChange()
									_.holder.trigger(_.changeEv)
								},_.minSleep)
							}
					})
		},
		nextFu:function(){
			var _=this,
				n=_.currN
			_.changeFu(++n<_.itms.length?n:0)
		},
		prevFu:function(){
			var _=this,
				n=_.currN
			_.changeFu(--n>=0?n:_.itms.length-1)
		},
		init:function(_){
			var holder=_.holder=this
			if(_.spinner)
				_.spinner=$(_.spinner,holder)
			else
				_.spinner=$()
				
			_.preFu()
			
			if(_.pagination)
				_.pagPreFu()
			
			if(_.nextBu)
				$(_.nextBu).click(function(){
					_.nextFu()
					return false
				})
			if(_.prevBu)
				$(_.prevBu).click(function(){
					_.prevFu()
					return false
				})
			if(_.navLinks)
				_.navFu()
			if(_.show!==false)
				_.changeFu(_.show)
		}
	},
	forms:{
		target:'input[type=text],input[type=password],input[type=tel],input[type=email],textarea',
		buttons:'a[rel=reset],a[rel=submit]',
		event:'click',
		backBu:false,
		afterFu:function(){},
		submitFu:function(){
			var opt=this,
				method=opt.form.attr('method')
			method=!!method?method:'get'
			$.ajax({
				url:opt.form.attr('action'),
				method:method,
				cache:false,
				data:opt.form.serializeArray(),
				success:function(r){
					opt.response=r
					opt.showFu()
				}
			})
		},
		showFu:function(){
			var opt=this
			opt.form.parent().height(opt.form.parent().height())
			opt.form.fadeOut(function(){
				opt.response=$('<div>'+opt.response+'</div>')
					.width(opt.form.width())
					.css({minHeight:opt.form.outerHeight(),width:opt.form.outerWidth()})
				if(opt.backBu)
					opt.backBu=$(opt.backBu),
					opt.response.append(opt.backBu)
				opt.form.before(opt.response)
				opt.form.parent().height('auto')
				opt.backBu.click(function(){
					opt.hideResFu()
					return false
				})
				opt.afterFu()
			})
		},
		hideResFu:function(){
			var opt=this
			opt.form.parent().height(opt.form.parent().height())
			opt.response.remove()
			opt.form.fadeIn(function(){
				opt.form.parent().height('auto')
			})
		},
		init:function(opt){
			var form=opt.form=this,
				inputs=opt.inputs=$(opt.target,form)
			inputs.each(function(){
				var th=$(this)
				th.data({defValue:th.attr('value')})
				th
					.bind('focus',function(){
						if(th.attr('value')==th.data('defValue'))
							th.attr({value:''})
					})
					.bind('blur',function(){
						if(th.attr('value')=='')
							th.attr({value:th.data('defValue')})
					})					
			})
			$(opt.buttons,form).each(function(){
				var th=$(this)
				th.bind(opt.event,function(){
					if(this.rel=='submit')
						opt.submitFu()
					else
					form[0][this.rel]()
					return false
				})
			})
			form.data({opt:opt})
		}
	}
})
