/* !Footer Fix */

	// get the window height
	function getWindowHeight() {
		var windowHeight = 0;
		windowHeight = $(window).height();
		return windowHeight;
	}
	
	
	// set the footer size
	function setFooter() {
			
		var windowHeight = getWindowHeight();
		
		if (windowHeight > 0) {
		
			var wrapperHeight = $('#content_holder').outerHeight();
			var footerHeight = 190; //$('#footer').outerHeight();
			
			//console.log('content_holder = ' + wrapperHeight, 'footer = ' + footerHeight);
			//console.log(windowHeight - wrapperHeight);
			
			if (windowHeight - (wrapperHeight+(footerHeight-100)) >= 0) {
				$("#footer").css('height', ((windowHeight - wrapperHeight) + 100 + "px"));
				//console.log('help');
			} else {
				$("#footer").css('height', '190px');
				//console.log('no help');
			}
			
		}
	}
	
	// place footer
	$(window).resize(function(){
		setFooter();
	});
	
	
	$(document).ready( function() {
		setFooter();
	});
