$(window).load(function() {
	if ($.browser.msie && $.browser.version == '6.0') {	} else {
	$('.rotate1').rotateAnimation(-30);
	$('.rotate2').rotateAnimation(-30);
	$('.rotate3').rotateAnimation(-30);
	$('.rotate4').rotateAnimation(-30);
	$('.rotate5').rotateAnimation(-30);
	$('.rotate6').rotateAnimation(-30);
	$('.rotate7').rotateAnimation(-30);
	$('.rotate8').rotateAnimation(-30);
	$('.rotate9').rotateAnimation(-30);
	$('.rotate10').rotateAnimation(-30);
	$('.rotate11').rotateAnimation(-30);
	$('.rotate12').rotateAnimation(-30);
	}
});

$(document).ready(function() {
    $("#menu li a").bind("mouseenter",function() {
		$(".menu-back", this).fadeIn("fast");
		$("#menu li.selected").addClass("selected2");
		$("#menu li.selected").removeClass("selected");
	});
    $("#menu li a").bind("mouseleave",function() {
		$(".menu-back").fadeOut("fast");
		$("#menu li.selected2").addClass("selected");
		$("#menu li.selected").removeClass("selected2");
	});	
	
	$("#make-buy, .button1, .button3", this).bind("mouseenter",function() {
		$("#show-d, .show-d", this).fadeIn("fast");
	});
    $("#make-buy, .button1, .button3", this).bind("mouseleave",function() {
		$("#show-d, .show-d").fadeOut("fast");
	});	
	$("#make-buy, .button4", this).bind("mouseenter",function() {
		$("#show-d2, .show-d2", this).fadeIn("fast");
	});
    $("#make-buy, .button4", this).bind("mouseleave",function() {
		$("#show-d2, .show-d2").fadeOut("fast");
	});	
	
	$('#block1, #block2, #block3').bind("mouseenter",function() {
		$(".main-block-content-back", this).animate({marginTop: "0px"},500)
	});
	$('#block1, #block2, #block3').bind("mouseleave",function() {
		$(".main-block-content-back", this).animate({marginTop: "169px"},500)
	});


	$("#tabs").tabs({
		cookie: { expires: 7, name: "startTab" }
	});

	var hb = $('body').height();
	var ha = $('#all').height();

	$('.tit').css({
		'min-height': ha - 126 - 300 - 190
	});

	$('.ins').css({
		'min-height': ha - 126 - 170 - 190
	});

	$(window).resize(function(){
		var hb = $('body').height();
		var ha = $('#all').height();

		$('.tit').css({
			'min-height': ha - 126 - 300 - 190
		});

		$('.ins').css({
			'min-height': ha - 125 - 170- 190
		});
	});

	$('.rotate1', this).rotate({maxAngle:0,minAngle:-20,angle:0,
		bind:				
			[
			{"mouseenter":function() {$('.rotate1').rotateAnimation(20)}},
			{"mouseleave":function() {$('.rotate1').rotateAnimation(-30)}}
			]
	});
	
	$('.rotate2', this).rotate({maxAngle:0,minAngle:-20,angle:0,
		bind:				
			[
			{"mouseenter":function() {$('.rotate2').rotateAnimation(20)}},
			{"mouseleave":function() {$('.rotate2').rotateAnimation(-30)}}
			]
	});
	
	$('.rotate3', this).rotate({maxAngle:0,minAngle:-20,angle:0,
		bind:				
			[
			{"mouseenter":function() {$('.rotate3').rotateAnimation(30)}},
			{"mouseleave":function() {$('.rotate3').rotateAnimation(-30)}}
			]
	});
	
	$('.rotate4', this).rotate({maxAngle:0,minAngle:-20,angle:0,
		bind:				
			[
			{"mouseenter":function() {$('.rotate4').rotateAnimation(20)}},
			{"mouseleave":function() {$('.rotate4').rotateAnimation(-30)}}
			]
	});
	
	$('.rotate5', this).rotate({maxAngle:0,minAngle:-20,angle:0,
		bind:				
			[
			{"mouseenter":function() {$('.rotate5').rotateAnimation(20)}},
			{"mouseleave":function() {$('.rotate5').rotateAnimation(-30)}}
			]
	});
	
	$('.rotate6', this).rotate({maxAngle:0,minAngle:-20,angle:0,
		bind:				
			[
			{"mouseenter":function() {$('.rotate6').rotateAnimation(20)}},
			{"mouseleave":function() {$('.rotate6').rotateAnimation(-30)}}
			]
	});
	$('.rotate7', this).rotate({maxAngle:0,minAngle:-20,angle:0,
		bind:				
			[
			{"mouseenter":function() {$('.rotate7').rotateAnimation(20)}},
			{"mouseleave":function() {$('.rotate7').rotateAnimation(-30)}}
			]
	});	
	$('.rotate8', this).rotate({maxAngle:0,minAngle:-20,angle:0,
		bind:				
			[
			{"mouseenter":function() {$('.rotate8').rotateAnimation(20)}},
			{"mouseleave":function() {$('.rotate8').rotateAnimation(-30)}}
			]
	});
	$('.rotate9', this).rotate({maxAngle:0,minAngle:-20,angle:0,
		bind:				
			[
			{"mouseenter":function() {$('.rotate9').rotateAnimation(20)}},
			{"mouseleave":function() {$('.rotate9').rotateAnimation(-30)}}
			]
	});
	$('.rotate10', this).rotate({maxAngle:0,minAngle:-20,angle:0,
		bind:				
			[
			{"mouseenter":function() {$('.rotate10').rotateAnimation(20)}},
			{"mouseleave":function() {$('.rotate10').rotateAnimation(-30)}}
			]
	});
	$('.rotate11', this).rotate({maxAngle:0,minAngle:-20,angle:0,
		bind:				
			[
			{"mouseenter":function() {$('.rotate11').rotateAnimation(20)}},
			{"mouseleave":function() {$('.rotate11').rotateAnimation(-30)}}
			]
	});
	$('.rotate12', this).rotate({maxAngle:0,minAngle:-20,angle:0,
		bind:				
			[
			{"mouseenter":function() {$('.rotate12').rotateAnimation(20)}},
			{"mouseleave":function() {$('.rotate12').rotateAnimation(-30)}}
			]
	});
});