show_subpages=function($){
	var conteiner=$('.conteiner'),
		footer=$('footer'),
		duration=1000
	footer.css({left:footer.attr('offsetLeft'),top:footer.attr('offsetTop'),margin:'0 auto'}).animate({top:document.body.offsetHeight-footer.height()},duration)
	conteiner
		.css({left:conteiner.attr('offsetLeft'),top:conteiner.attr('offsetTop'),margin:'0 auto'})
		.animate({top:0,width:'1020px',left:'+=76px'},duration,function(){
			$(this).css({left:0,marginBottom:'-38px'})
			footer.css({top:0,left:0})
			$('body').removeClass('splash').addClass('subpages')
			$('footer .header-slider-paginator').css({right:'40px',bottom:'16px'}).appendTo('header')
		})
	$('.header-slider')
		.css({width:'auto'}).animate({height:'474px'},duration)
	
	$('.header-slider img')
		.animate({width:'1020px',marginLeft:0,marginTop:'-50px'},duration)
		.parent()
			.css({overflow:'hidden'})
			.animate({height:'474px'},duration)
	$('h1').animate({left:0},duration)
	$('nav').animate({left:'446px'},duration)
	$('.splash-bg').fadeOut(duration)
	$('header .models').slideDown()
	$('#content').slideDown()
	$.scrollTo(0)
}

$(function(){
	$('.header-slider').waitImgLoad(function(){
		this._sliderCF({
			show:0,
			pagination:'.header-slider-paginator>li',
			duration:1000,
			slideshow:6000
		})
		$('.spinner',this).remove()
	})
	
	$('#content')._ajaxSlider({
		pagination:'nav>ul>li',
		area:'>a',
		spinner:'<span class="spinner"></span>'
	})
		
	
	var nav=$('nav')
	nav
		.find('>ul>li>a')
			.append('<span class="d-bg"></span>')
		.bind('mouseenter',function(){
			var th=$(this)
			th.stop().animate({color:'#fff'}),
			$('.d-bg',th).stop().animate({opacity:0})
		})
		.bind('mouseleave',function(){
			var th=$(this)
			if(th.parent().is('.active'))
				void(0)
			else
				th.stop().animate({color:'#000'}),
				$('.d-bg',th).stop().animate({opacity:1})
		})
	$('#content').one('_change',function(){
		show_subpages($)
	}).bind('_show',function(){
		$('nav>ul>li:not(.active)>a')
			.stop()
			.animate({color:'#000'})
			.find('.d-bg')
				.stop()
				.animate({opacity:1})
	})
	
	$('.dropDown',nav)._dropDownMenu({
		area:'>a'
	})
})
