
if ( ( typeof( sfHover ) ).toLowerCase() != 'undefined' ) { event_attach( 'onload' , function () { 
	sfHover( 'rmenu2' );		
	if (document.getElementById("recent-comments") != null) { sfHover( 'recent-comments' ); }
	if (document.getElementById("bfa-recent-comments") != null) {sfHover( 'bfa-recent-comments' ); }
		} ); }


var $bfa = jQuery.noConflict();
$bfa(document).ready(function(){    
	// IE6 max-width for images 
	if ($bfa.browser.msie && /MSIE 6\.0/i.test(window.navigator.userAgent) && !/MSIE 7\.0/i.test(window.navigator.userAgent)) {
	var centerwidth = $bfa("td#middle").width(); 
	// without caption
	$bfa(".post img").each(function() { 
		var maxwidth = centerwidth - 10 + 'px';
		var imgwidth = $bfa(this).width(); 
		var imgheight = $bfa(this).height(); 
		var newimgheight = (centerwidth / imgwidth * imgheight) + 'px';	
		if (imgwidth > centerwidth) { 
			$bfa(this).css({width: maxwidth}); 
			$bfa(this).css({height: newimgheight}); 
		}
	});
	// with caption
	$bfa("div.wp-caption").each(function() { 
		var captionwidth = $bfa(this).width(); 
		var maxcaptionwidth = centerwidth + 'px';
		var captionheight = $bfa(this).height();
		var captionimgwidth =  $bfa("div.wp-caption img").width();
		var captionimgheight =  $bfa("div.wp-caption img").height();
		if (captionwidth > centerwidth) { 
			$bfa(this).css({width: maxcaptionwidth}); 
			var newcaptionheight = (centerwidth / captionwidth * captionheight) + 'px';
			var newcaptionimgheight = (centerwidth / captionimgwidth * captionimgheight) + 'px';
			$bfa(this).css({height: newcaptionheight}); 
			$bfa("div.wp-caption img").css({height: newcaptionimgheight}); 
			}
	});
	}
		$bfa(".post table tr").mouseover(function() {$bfa(this).addClass("over");}).mouseout(function() {$bfa(this).removeClass("over");});
			$bfa(".post table tr:even").addClass("alt");
			$bfa("input.text, input.TextField, input.file, input.password, textarea").focus(function () {  $bfa(this).addClass("highlight"); }).blur(function () { $bfa(this).removeClass("highlight"); })
		$bfa("input.inputblur").focus(function () {  $bfa(this).addClass("inputfocus"); }).blur(function () { $bfa(this).removeClass("inputfocus"); })
		$bfa("input.button, input.Button").mouseover(function() {$bfa(this).addClass("buttonhover");}).mouseout(function() {$bfa(this).removeClass("buttonhover");});
	// toggle "you can use these xhtml tags
	$bfa("a.xhtmltags").click(function(){ $bfa("div.xhtml-tags").slideToggle(300); });
});
