jQuery(document).ready(function ($) {
	/*function setHeight() {
		windowHeight = jQuery(window).innerHeight();
		// leaveHeight = jQuery('#main-header').innerHeight();
		// bannerHeight = windowHeight-leaveHeight;
		bannerHeight = windowHeight;
		jQuery('#inner-banner-wrapper .table-wrapper').css('height', bannerHeight);
	}
	setHeight();

	jQuery(window).resize(function () {
		setHeight();
	});*/

	//Fix enter forms
	form_enter_odd();

	/*console.log('DDD');*/

	function form_enter_odd() {
		$('.fsForm input, .fsForm select').keypress(function (e) {

			let thisForm = $(this).closest('.fsForm');
			let thisSubmit = thisForm.find('.fsSubmitButton');

			if (e.which == 13) {
				thisSubmit.click();

				setTimeout(function () {
					thisForm.trigger("reset");
					thisForm[0].reset();
				}, 2000);
				return false;
			}
		});
	}
});

// $( document ).ready(function() {
//   console.log( "document ready!" );
//
//   var $sticky = $('.sticky');
//   var $stickyrStopper = $('#top-footer-section');
//   if (!!$sticky.offset()) { // make sure ".sticky" element exists
//
//     var generalSidebarHeight = $sticky.innerHeight();
//     var stickyTop = $sticky.offset().top;
//     var stickOffset = 0;
//     var stickyStopperPosition = $stickyrStopper.offset().top;
//     var stopPoint = stickyStopperPosition - generalSidebarHeight - stickOffset;
//     var diff = stopPoint + stickOffset;
//
//     $(window).scroll(function(){ // scroll event
//       var windowTop = $(window).scrollTop(); // returns number
//
//       if (stopPoint < windowTop) {
//           $sticky.css({ position: 'absolute', top: diff });
//       } else if (stickyTop < windowTop+stickOffset) {
//           $sticky.css({ position: 'fixed', top: stickOffset });
//       } else {
//           $sticky.css({position: 'absolute', top: 'initial'});
//       }
//     });
//
//   }
// });
