$.extend(_fw.meth,{	
	parallax:{
		stretch:false,
		smoothScroll:false,
		scrollStep:400,
		scrollDuration:600,
		scrollEasing:'swing',
		imgCSS:{
			position:'fixed',
			top:0,
			left:'50%'
		},
		preFu:function(){
			var _=this,
				bg
			_.img
				.css(_.imgCSS)
				.css({marginLeft:-_.img.width()/2})
			_.imW=_.img.width()
			_.imH=_.img.height()
			bg='url('+_.img.attr('src')+') 50% 0 no-repeat'
			_.img.remove()
			_.img=$('<div></div>')
				.css({
					background:bg,
					height:_.imH,
					left:0,
					right:0,
					top:0,
					position:'fixed',
					zIndex:-1
				})
				.appendTo('body')
		},
		stretchFu:function(){
			var _=this,
				holder=_.holder=$(_.stretch),
				n=_.holder.children().length-1
			_.chi=[]
			_.holder
				.height(_.hHeight=_.holder.height()*_.k)
				.css({position:'relative'})
				.children()
					.each(function(i){
						if(i<n)
							$(this).css('top',_.chi[i]=this.offsetTop*_.k)
					})
					.css({position:'absolute'})
			for(var i=0,tmp=[];i<_.chi.length-1;i++)
				tmp[i]=_.chi[i+1]/1.3-200
			
			_.areas=tmp
		},
		changePos:function(){
			var _=this
			_.pos=_.body.attr('scrollTop')/(_.body.attr('scrollHeight')-_.body.attr('offsetHeight'))
			_.moveImgFu()
		},
		moveImgFu:function(){
			var _=this,
				newPos=-((_.imH-_.body.attr('offsetHeight'))*_.pos)
			_.img.css('top',newPos)
		},
		scrollFu:function(d){
			var _=this
			_.body
				.stop()
				.animate({
					scrollTop:'+='+(-_.scrollStep*d)+'px'
				},{
					duration:_.scrollDuration,
					easing:_.scrollEasing
				})
		},
		init:function(_){
			_.img=this
			_.win=$(window),
			_.body=_.win._scrollable()
			
			
			if(_.stretch)
				_.stretchFu()
			
			_.preFu()
			
			//$('html').css({overflow:'hidden'})
			_.navs=$('nav li')
			_.win
				.bind('scroll',function(){
					_.changePos()
					for(var i=1,pos=_.body.attr('scrollTop')-document.body.offsetHeight/6;i<_.areas.length;i++)
						if(pos>=_.areas[i-1]&&pos<_.areas[i])
							_.navs.removeClass('active').eq(i<2?i:i-1).addClass('active'),
							Cufon.refresh()
						else
							if(pos<_.areas[0]/2)
								_.navs.removeClass('active'),
								Cufon.refresh()
						if(pos>_.areas[_.areas.length-1])
							_.navs.removeClass('active').eq(-1).addClass('active'),
							Cufon.refresh()
				})
			
			
			var bl=true,
				timer
			
			if(_.smoothScroll)
				_.body
					.bind('mousewheel',function(e,d){
						if(bl)
							bl=false,
							timer=setTimeout(function(){bl=true},150),
							_.scrollFu(d)
						return false
				})
			_.changePos()
		}
	},
	gSlider:{
		items:'>li',
		clone:true,
		show:3,
		duration:600,
		easing:'swing',
		cloneCl:'_clone',
		nextBu:false,
		prevBu:false,
		mwFu:function(){
			var _=this
		_.holder
			.bind('mousewheel',function(e,d){
				if(d<0){
					if(_.mousewheel)
						_.mousewheel=false,
						_.changeFu('next'),
						setTimeout(function(){
							_.mousewheel=true
						},140)
				}else{
					if(_.mousewheel)
						_.mousewheel=false,
						_.changeFu('prev'),
						setTimeout(function(){
							_.mousewheel=true
					},140)
				}
				return false
			})
		},
		preFu:function(){
			var _=this,
				itemW=_.itemW=_.itms.outerWidth()+parseInt(_.itms.css('marginRight'))+parseInt(_.itms.css('marginLeft'))
			if(_.clone)
				_.itms.clone().addClass(_.cloneCl).appendTo(_.ul),
					_.itms=$(_.items,_.ul)
			if(_.show)
				_.holder
					.width(itemW*_.show)
					.height(_.itms.height())
					.css({overflow:'hidden',zIndex:1})
			if(_.holder.css('position')=='static')
					_.holder.css({position:'relative',zIndex:1})
			_.ul.css({position:'relative',width:itemW*_.itms.length})
			var tmp=Math.round(_.itms.length/4),
				i=tmp
			while(i--)
				_.ul.find('li').eq(-1).prependTo(_.ul)
			_.ul
				.css({left:(_.sX=-Math.floor(tmp)*itemW)})
		},
		changeFu:function(side){
			var _=this
				itemW=_.itemW
			if(side=='next'||side=='prev')
				if(side=='prev')
					(_.itms=$(_.items,_.ul)).eq(-1)
						.prependTo(
							_.ul
								.stop()
								.css({
									left:parseInt(_.ul.css('left'))-itemW
								})
						)
				else
					(_.itms=$(_.items,_.ul)).eq(0)
						.appendTo(
							_.ul
								.stop()
								.css({
									left:parseInt(_.ul.css('left'))+itemW
								})
							)
			_.showFu()
		},
		showFu:function(){
			var _=this
			_.ul
				.stop()
				.animate({
					left:_.sX
				},{
					duration:_.duration,
					easing:_.easing
				})
		},
		init:function(_){
			var holder=_.holder=this,
				ul=_.ul=holder.children('ul'),
				itms=_.itms=$(_.items,_.ul)
			_.preFu()
			if(_.nextBu)
				$(_.nextBu)
					.click(function(){
						_.changeFu('next')
						return false
					})
			if(_.prevBu)
				$(_.prevBu)
					.click(function(){
						_.changeFu('prev')
						return false
					})
			if(_.mousewheel&&$.fn.mousewheel)
					_.mwFu()
		}
	},
	sprites:{
		method:'gStretch',
		hover:false,
		bg:false,
		duration:600,
		easing:'swing',
		ieOpacityFix:false,
		add:false,
		els:[],
		elsh:[],
		pasta:'<div></div>',
		bodyEv:'sp-rfrsh',
		hold:'.active',
		holdOn:function(){},
		hoverIn:function(){},
		hoverOut:function(){},
		getWH:function(fn){
			var _=this,
				img=new Image(),
				url=_.url,
				src=_.src
			if(src=='none')
				return false
			_.hw=_.holder.outerWidth()
			_.hh=_.holder.outerHeight()
			_.bgc=_.holder.css('backgroundColor')
			img=$(img).appendTo('#glob')
			$(img).attr({src:src})
			if(img[0].complete)
				_.width=img.width(),
				_.height=img.height(),
				img.remove(),
				fn()
			else
				img.load(function(){
					_.width=img.width()
					_.height=img.height()
					img.remove()
					fn()
				})
		},
		preFu:function(){
			var _=this,
				tmp
			_.ieOpacityFix=$.browser.msie&&$.browser.version<9
			if(_.holder.css('zIndex')=='auto')
					_.holder.css({zIndex:6000})
			if(_.holder.css('position')=='static')
				_.holder.css({position:'relative'})
			_.url=_.holder.css('backgroundImage')
			_.src=_.url.replace(/(^url\('?"?)|('?"?\)$)/g,'')
			if(_.method=='gStretch')
				_.getWH(function(){
					_.holder.css({backgroundImage:'none'})
					_.holder.css({backgroundColor:'none'})
					_.els.push(_.l=$(_.pasta)
						.css({
							width:_.width,
							bottom:0,
							position:'absolute',
							background:_.url+' 0 0 no-repeat',
							left:0,
							top:0,
							zIndex:-1
						})
						.appendTo(_.holder))
					_.els.push(_.r=$(_.pasta)
						.css({
							width:_.width,
							bottom:0,
							position:'absolute',
							background:_.url+' 0 -'+_.hh+'px  no-repeat',
							right:0,
							top:0,
							zIndex:-1
						})
						.appendTo(_.holder))
					_.els.push(_.t=$(_.pasta)
						.css({
							bottom:0,
							position:'absolute',
							background:_.url+' 0 -'+_.hh*2+'px',
							left:_.width,
							right:_.width,
							top:0,
							zIndex:-1
						})
						.appendTo(_.holder))
					if(_.hover)
						_.elsh.push(_.lh=_.l.clone()
							.css({
								background:_.url+' 0 -'+_.hh*3+'px no-repeat'
							})
							.appendTo(_.holder)
							.hide()),
						_.elsh.push(_.rh=_.r.clone()
							.css({
								background:_.url+' 0 -'+_.hh*4+'px no-repeat'
							})
							.appendTo(_.holder)
							.hide()),
						_.elsh.push(_.th=_.t.clone()
							.css({
								background:_.url+' 0 -'+_.hh*5+'px'
							})
							.appendTo(_.holder)
							.hide()),
						(function(){
							if(!_.ieOpacityFix)
								_.lh
									.add(_.rh)
									.add(_.th)
									.css({opacity:0})
						})()
				})
			if(_.method=='corners')
				_.getWH(function(){
					_.holder.css({'background':'none'})
					_.lt=$(_.pasta)
						.css({
							width:_.width/4,
							height:_.height/4,
							position:'absolute',
							backgroundImage:_.url,
							backgroundPosition:'0 0',
							left:0,
							top:0,
							zIndex:-1							
						})
						.appendTo(_.holder)
					_.rt=$(_.pasta)
						.css({
							width:_.width/4,
							height:_.height/4,
							position:'absolute',
							backgroundImage:_.url,
							backgroundPosition:'-'+(_.width/4)+'px 0',
							right:0,
							top:0,
							zIndex:-1							
						})
						.appendTo(_.holder)
					_.lb=$(_.pasta)
						.css({
							width:_.width/4,
							height:_.height/4,
							position:'absolute',
							backgroundImage:_.url,
							backgroundPosition:'0 -'+(_.height/4)+'px',
							left:0,
							bottom:0,
							zIndex:-1							
						})
						.appendTo(_.holder)
					_.rb=$(_.pasta)
						.css({
							width:_.width/4,
							height:_.height/4,
							position:'absolute',
							backgroundImage:_.url,
							backgroundPosition:'-'+(_.width/4)+'px -'+(_.height/4)+'px',
							right:0,
							bottom:0,
							zIndex:-1							
						})
						.appendTo(_.holder)
					_.tt=$(_.pasta)
						.css({
							position:'absolute',
							left:_.width/4,
							right:_.width/4,
							top:0,
							height:_.height/4,
							backgroundImage:_.url,
							backgroundPosition:'0 -'+(_.height/2)+'px',
							zIndex:-1
						})
						.appendTo(_.holder)
						.clone()
							.appendTo(_.holder)
							.css({backgroundPosition:'-'+(_.width/2)+'px -'+(_.height/2)+'px'})
					_.tb=$(_.pasta)
						.css({
							position:'absolute',
							left:_.width/4,
							right:_.width/4,
							bottom:0,
							height:_.height/4,
							backgroundImage:_.url,
							backgroundPosition:'0 -'+(_.height/2+_.height/4)+'px',
							zIndex:-1
						})
						.appendTo(_.holder)
						.clone()
							.appendTo(_.holder)
							.css({backgroundPosition:'-'+(_.width/2)+'px -'+(_.height/2+_.height/4)+'px'})
					_.tl=$(_.pasta)
						.css({
							position:'absolute',
							top:_.height/4,
							bottom:_.height/4,
							left:0,
							width:_.width/4,
							backgroundImage:_.url,
							backgroundPosition:'-'+(_.width/2)+'px 0',
							zIndex:-1
						})
						.appendTo(_.holder)
						.clone()
							.appendTo(_.holder)
							.css({backgroundPosition:'-'+(_.width/2)+'px -'+(_.height/2)+'px'})
					_.tr=$(_.pasta)
						.css({
							position:'absolute',
							top:_.height/4,
							bottom:_.height/4,
							right:0,
							width:_.width/4,
							backgroundImage:_.url,
							backgroundPosition:'-'+(_.width/2+_.width/4)+'px 0',
							zIndex:-1
						})
						.appendTo(_.holder)
						.clone()
							.appendTo(_.holder)
							.css({backgroundPosition:'-'+(_.width/2+_.width/4)+'px -'+(_.height/2)+'px'})
					if(_.bg)
						tmp=$.browser.msie&&~_.bg.indexOf('rgba')?/,([0-9.]+)\)/g.exec(_.bg)[1]:1,
						_.bg=$.browser.msie&&~_.bg.indexOf('rgba')?_.bg.replace('rgba','rgb').replace(/(,[0-9.]+\))/,')'):_.bg,
						_.c=$(_.pasta)
							.css({
								position:'absolute',
								left:_.width/4,
								right:_.width/4,
								top:_.height/4,
								bottom:_.height/4,
								background:_.bg,
								opacity:tmp
							})
							.appendTo(_.holder)
					
				})
		},
		showFu:function(){
			var _=this
			$(_.elsh).each(function(i){
				var el=$(this)
				if(_.ieOpacityFix)
					el
						.show()
				else
					el		
						.show()
						.stop()
						.animate({
							opacity:1
						},{
							duration:_.duration,
							easing:_.easing
						})
				})
		},
		hideFu:function(){
			var _=this
			if(_.holdOn())
				_.show()
			else
			$(_.elsh).each(function(){
				var el=$(this)
				if(_.ieOpacityFix)
					el
						.hide()
				else
					el		
						.stop()
						.animate({
							opacity:0
						},{
							duration:_.duration,
							easing:_.easing,
							complete:function(){
								$(this).hide()
							}
						})
				})
		},
		hoverFu:function(){
			var _=this
			_.holder
				.bind('mouseenter',function(){
					_.showFu()
					_.hoverIn()
				})
				.bind('mouseleave',function(){
					_.hideFu()
					_.hoverOut()
				})				
		},
		init:function(_){
			var holder=_.holder=this
			_.preFu()
			if(_.hover)
				_.hoverFu()
		}
	},
	shadowBox:{
			target:false,
			showEv:'click',
			closeBu:'a.close',
			fader:true,
			duration:400,
			faderCSS:{
				position:'fixed',
				left:0,
				top:0,
				bottom:0,
				right:0,
				zIndex:9999,
				opacity:.7,
				background:'#000'
			},
			boxCSS:{
				position:'fixed',
				left:'50%',
				top:'50%',
				zIndex:9999
			},
			callback:function(){},
			preFu:function(){
				var _=this
				if(_.fader)
					_.fader=$('<div>')
						.css(_.faderCSS)
						.bind(_.showEv,function(){
							_.hideFu()
							return false
						})
				_.box=$('<div>')
					.css(_.boxCSS)
					.append(_.target)
			},
			showFu:function(){
				var _=this
				_.fader
					.appendTo('body')
					.css({opacity:0})
					.stop()
					.animate({
						opacity:_.faderCSS.opacity
						},{
						duration:_.duration,
						complete:function(){
							_.box
								.appendTo('body')
								.css({
									marginLeft:-_.box.width()/2,
									marginTop:-_.box.height()/2
								})
								.hide()
								.slideDown(_.duration,function(){
									_.callback()
								})
						}						
						})
			},
			hideFu:function(){
				var _=this
				_.box.slideUp(function(){$(this).detach()})
				_.fader
					.stop()
					.animate({
						opacity:0
						},{
						duration:_.duration,
						complete:function(){
							_.fader.detach()
						}
					})
			},
			init:function(_){
				var target=_.target=$(this)
				if(!target.length)
					return false
				else
					_.preFu()
				if(_.links)
					$(_.links).live(_.showEv,function(){
						_.showFu()
						return false
					})
				if(_.closeBu)
					$(_.closeBu).live(_.showEv,function(){
						_.hideFu()
						return false
					})
			}
		}
})
