$(document).ready(function() {
	
	function doTop()
	{
		var rg = $('.yellow .top').offset().left;
		$('.yellow .top .left').css({'left':-rg, 'width':rg});
		$('.yellow .top .right').css({'right':-rg, 'width':rg});
	}

	function mainest()
	{
		var res = $(window).width();
		if(res < 1200)
		{
			$('.mainest').css({'width':1200});
		}
		else
		{
			$('.mainest').css({'width':'auto'});
		}
	}
	$(window).resize(function(){
		doTop();
		mainest();
	})

	$(function(){
		doTop();
		mainest();
	});

$('.click').click(function(){
      $('.black-wrap').css({'display':'block'});
      $('.black-wrap').stop().animate({'opacity':'0.6'}, 500, function(){
        $('.fixed-con').css({'display':'block'});
        $('.fixed-con').stop().animate({'opacity':'1'}, 500);
      });
   });
$('.black-wrap').click(function(){
    $('.fixed-con').stop().animate({'opacity':'0'}, 500, function(){
       $('.fixed-con').css({'display':'none'});
       $('.black-wrap').stop().animate({'opacity':'0'}, 500, function(){
           $('.black-wrap').css({'display':'none'});
       });
    });
  });
});