/*  jQuery functions for all public pages  */

$(document).ready(function(){
	
	// Get position of lowest parts of sidebars (which are position:absolute)
	// and make sure the content is long enough to push footer down.
	// What a bodge!
	var st = Math.floor($('#salesAd').position().top);
	var sh = $('#salesAd').height();
	var ah = ( $('#ad_pane').height() ? $('#ad_pane').height() : 0 );
	var minh = (st+sh > ah ? st+sh : ah);
	$('#content').css({minHeight: minh+'px'});

	function logoPlace () {
		var wid = $(window).width();
		var hig = $(window).height();
		if (hig > 680 && wid > 1110) {
			$('#logo_bottom').html('<img src="'+domainPath+'chrome/trailblazer.png" width="250" height="225" alt="Trailblazer" />');
		} else {
			$('#logo_bottom').html('');
		};
	}
	logoPlace(); // run on document.ready
	$(window).resize(function() { // and run on resize
		logoPlace();
	});
	
		
});
