// JavaScript Document

$(document).ready(function () {
							
	var baseURL = "http://www.farmshedcny.com/farmshednation/";

	$('input.rollover').hover (
		 function() {
			this.src = this.src.replace('_off','_over');
		 },
		 function(){
			this.src = this.src.replace('_over','_off');
		}
	);
	
	$('img.rollover').hover (
		 function() {
			this.src = this.src.replace('_off','_over');
		 },
		 function(){
			this.src = this.src.replace('_over','_off');
		}
	);
	
	if (jQuery.browser.msie && jQuery.browser.version == 6) {
		$('#header').css({'background':'url('+baseURL+'wp-content/themes/farmshed/images/bg_header_ie6.jpg) no-repeat bottom center', 'width':'850px'});
		$('#stage').css({'background':'url('+baseURL+'wp-content/themes/farmshed/images/bg_page_ie6.jpg) repeat-y top'});
		$('#footer').css({'background':'url('+baseURL+'wp-content/themes/farmshed/images/bg_footer_ie6.jpg) no-repeat top'});
		
	}
	
	// The sidebar is absolutely positioned.  The following code ensures the stage scales to fit the sidebar.
	var contentHeight = $('#content').height();
	var sidebarHeight = $('#sidebar').height();
	
	if(contentHeight < sidebarHeight) {
		$('#stage').height(sidebarHeight);
	}
	/////////
	
	$('#logoclick').click(function(){
		window.location.href = baseURL; 							   
	});
	

}) //end doc ready
