$j=jQuery.noConflict();
$j(function(){
	$j('#to_top').click(function() {
		var $target = $j(this.hash);
		$target = $target.length && $target || $j('[@name=' + this.hash.slice(1) +']');
		if ($target.length) {
			new Effect.ScrollTo($target, {offset:-140}); return false;
		return false;
       }
	});
	if ($j('#headerControlSearchBox').val().length == 0) {
		$j('#headerControlSearchBox').val('Search...');
	}
	$j('#headerControlSearchBox').focus(function() {
		$j('#headerControlSearchBox').val('');
	}).blur(function() {
		if ($j('#headerControlSearchBox').val().length == 0) {
			$j('#headerControlSearchBox').val('Search...');
		}
	});
});


function resizeImages($, inSelect, inMaxW, inMaxH) {
	// Bail on this function if we're using MSIE
	if ($.browser.msie)
		return;

	//Get all images...
	var imgs = $('img', inSelect);
	$(imgs).each(function() {
		//console.log($(this).attr('src') + ' | ' + $(this).height() + ' | ' + $(this).css('height'));
		if ($(this).height() > $(this).width()) {
			if ($(this).height() > inMaxH) {
				$(this).height(inMaxH);
			} else if ($(this).width() > inMaxW) {
				$(this).width(inMaxW);
			}
		} else {
			if ($(this).width() > inMaxW) {
				$(this).width(inMaxW);
			} else if ($(this).height() > inMaxH) {
				$(this).height(inMaxH);
			};
		}
		$(this).removeAttr("height");
		$(this).removeAttr("width");
//		$(this).removeAttr("align");
//		//$(this).css("float", "left");
//		$(this).parents(".entryBody").css("min-height", $(this).height() + 10);
//		$(this).wrap("<div style='float: left;'>").append("<div style='clear:both;'></div>");
		//console.log('IMG:' + $(this).height() + " | " + $(this).parents(".entryBody").height());
	});
		//Resize Images
	//Get image height
	//Increase height of div if req'd
}