$(function(){	

	var gb_header_height = $(window.parent.document).find('.model-header').height();
	var aorus_header_height = $(window.parent.document).find('#g_header').height();
	var aorus_title_height = $(window.parent.document).find('#pdif_title').height();
	mbdiv_main = gb_header_height - aorus_header_height - aorus_title_height;

	$(window.parent).scroll(function () {
		var scrollsec01 = ($('#scrollsec01').offset().top) - 200;		
		var scrollsec03 = ($('#scrollsec03').offset().top) - 200;
		
		var nowscrollVal = $(this).scrollTop();

		
		if (nowscrollVal > scrollsec01) {			
			$("#BiCS4 #tableall01 .stable01 .table1").css('width', '90%');
			$("#BiCS4 #tableall01 .stable01 .table2").css('width', '60%');
			$("#BiCS4 #tableall01 .stable01 .table3").css('width', '30%');
			$("#BiCS4 #tableall01 .stable01 #st1, #BiCS4 #tableall01 .stable01 #st2, #BiCS4 #tableall01 .stable01 #st3, #BiCS4 #tableall01 .stable01 #st4").delay(1000).fadeIn();
		}
		
		if (nowscrollVal > scrollsec03) {
			$("#temperature #tableall05 .stable01 .table1").css('width', '45%');
			$("#temperature #tableall05 .stable01 .table2").css('width', '90%');			
			$("#temperature #tableall05 .stable01 #st1, #temperature #tableall05 .stable01 #st2").delay(1000).fadeIn();
		}


	});


	



	/* Animate css wow */
	var wow = new WOW(
		{
			boxClass: 'wow',      // animated element css class (default is wow)
			animateClass: 'animated', // animation css class (default is animated)
			offset: 10,          // distance to the element when triggering the animation (default is 0)
			mobile: false       // trigger animations on mobile devices (true is default)
		}
	);
	wow.init();


	/* scrollify */
	$.scrollify({
		section: ".InnerGIGABYTEContent .scrollsection",
		sectionName: "",
		interstitialSection: ".main-content",
		easing: "easeInOutCubic",
		scrollSpeed: 1000,
		offset: 0,
		scrollbars: true,
		standardScrollElements: "",
		setHeights: 910,
		overflowScroll: false,
		updateHash: true,
		touchScroll: false,
		before: function () {

		},
		after: function () {
			$.scrollify({
				setHeights: false
			});

		},
		afterResize: function () {
			var nowwindowwidth = $(window).width();
			if (nowwindowwidth <= 1200) {
				$.scrollify.disable();
				$(".scrollsection").css('height', 'auto');
			}
		},

		afterRender: function () {

		}
	});


	var nowwindowwidthmob = $(window).width();
	if (nowwindowwidthmob <= 1200) {
		$.scrollify({
			setHeights: false,
		});
	}


});


