$(function(){
	$(".img-container").css("margin-left", ($("#parent").width() - 700)/8 -2);
	$(".img-container2").css("margin-left", ($("#parent").width() - 856)/9 -20);
	$(".works").css("margin-left", ($("#parent").width() - 900)/6);
	$(".works2").css("margin-left", ($("#parent").width() - 900)/6 - 11);
	
	setTimeout('if ($("#current").height() > $("#intro").height()) {$("#intro").css("height",$("#current").height());}',300);

//	setTimeout('$("#moveit").animate({left:"0px"},500)',500);
	
//	$("a").click(function(){
//	$("#moveit").animate({left:"1500px"},500);
//	});
	
//	setTimeout('if ($(window).width() > 1340) {$("h1").css("font-size","210%");} else if //($(window).width() > 1080) {$("h1").css("font-size","170%");} else if ($(window).width() > 1030) //{$("h1").css("font-size","140%");} else {$("h1").css("font-size","120%");};',300);
browser = navigator.appName;
b_version = navigator.appVersion;
version = parseFloat(b_version);
if (!((browser == "Microsoft Internet Explorer") && (version <= 7))) {
setTimeout('if ($(window).width() > 1340) {$("h1").css("font-size","210%");$("#newyear-h").css("font-size","210%");$("#newyear-spoiler").css({"clear":"none","position":"relative","left":"475px","top":"15px"});$("#content").css("padding","0 30px 0 35px");$("#intro").css("padding-right","35px");$("#newyear-div").css("left","15px");} else if ($(window).width() > 1120) {$("h1").css("font-size","170%");$("#newyear-h").css("font-size","180%");$("#newyear-spoiler").css({"clear":"none","position":"relative","left":"475px","top":"10px"});$("#content").css("padding","0 30px 0 30px");$("#intro").css("padding-right","30px");$("#newyear-div").css("left","15px");} else if ($(window).width() > 1030) {$("h1").css("font-size","140%");$("#newyear-h").css("font-size","160%");$("#newyear-spoiler").css({"clear":"both","left":"0px","top":"10px"});$("#content").css("padding","0 30px 0 30px");$("#intro").css("padding-right","30px");$("#newyear-div").css("left","5px");} else {$("h1").css("font-size","120%");$("#newyear-h").css("font-size","150%");$("#newyear-spoiler").css({"clear":"both","left":"0px","top":"10px"});$("#content").css("padding","0 30px 0 30px");$("#intro").css("padding-right","30px");$("#newyear-div").css("left","0px");};',300);
};
	
	setTimeout('$("#a-styles").css("left",60 + $("#interior-styles-content").width())',300);
	
	setTimeout('if ($(window).width() < 1050) {$("#about-styles").css("font-size","90%");} else {$("#about-styles").css("font-size","120%");};',300);
	
	$(".notb").focus(function(){
		if ($(this).attr("value") == "Сообщение" || $(this).attr("value") == "Ваше имя" || $(this).attr("value") == "Телефон" || $(this).attr("value") == "E-mail") {
			$(this).attr("oldvalue",$(this).attr("value"));
			$(this).attr("value","");
			$(this).css("color","#000");
			$(this).css("background","#FFF");
		};
	});

	$(".notb").blur(function(){
		if ($(this).attr("value") == "") {
			$(this).css("color","#555");
			$(this).attr("value",$(this).attr("oldvalue"));
			$(this).css("background","#FFFFDF");
			
		};
	});
	
	$("#bc").hover(function(){
		$("#bci").attr("src","./assets/images/arrows/back-active.png");
	}, function(){
		$("#bci").attr("src","./assets/images/arrows/back.png");
	});
	
	$("#upper").hover(function(){
		$("#upperi").attr("src","./assets/images/arrows/up-active.png");
	}, function(){
		$("#upperi").attr("src","./assets/images/arrows/up.png");
	});
	
	$("#fwd").hover(function(){
		$("#fwdi").attr("src","./assets/images/arrows/forward-active.png");
	}, function(){
		$("#fwdi").attr("src","./assets/images/arrows/forward.png");
	});
	
});
$(window).resize(function(){
		$(".img-container").css("margin-left", ($("#parent").width() - 700)/8 -2);
		$(".works").css("margin-left", ($("#parent").width() - 900)/6);
		
		if ($("#current").height() > $("#intro").height()) {
			$("#intro").css("height",$("#current").height());
			} else
			{$("#intro").css("height","auto");};
		
		
		if ($(window).width() > 1340) {
			$("h1").css("font-size","210%");
			
			$("#newyear-h").css("font-size","210%");
			$("#newyear-spoiler").css({"clear":"none","position":"relative","left":"475px","top":"15px"});
			$("#content").css("padding","0 30px 0 35px");
			$("#intro").css("padding-right","35px");
			$("#newyear-div").css("left","15px");

		} else if ($(window).width() > 1120) {
			$("h1").css("font-size","170%");
			
			$("#newyear-h").css("font-size","180%");
			$("#newyear-spoiler").css({"clear":"none","position":"relative","left":"475px","top":"10px"});
			$("#content").css("padding","0 30px 0 30px");
			$("#intro").css("padding-right","30px");
			$("#newyear-div").css("left","15px");
		} else if ($(window).width() > 1030) {
			$("h1").css("font-size","140%");
			
			$("#newyear-h").css("font-size","160%");
			$("#newyear-spoiler").css({"clear":"both","left":"0px","top":"10px"});
			$("#content").css("padding","0 30px 0 30px");
			$("#intro").css("padding-right","30px");
			$("#newyear-div").css("left","5px");
		} else {
			$("h1").css("font-size","120%");
			
			$("#newyear-h").css("font-size","150%");
			$("#newyear-spoiler").css({"clear":"both","left":"0px","top":"10px"});
			$("#content").css("padding","0 30px 0 30px");
			$("#intro").css("padding-right","30px");
			$("#newyear-div").css("left","0px");
		
		};
		
		if ($(window).width() < 1050) {$("#about-styles").css("font-size","90%");} else {$("#about-styles").css("font-size","120%");};
		
});

