sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
         if (document.getElementById("sermonLists")) {
            document.getElementById("sermonLists").style.visibility="hidden";
         }
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			if (document.getElementById("sermonLists")) {
            document.getElementById("sermonLists").style.visibility="visible";
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

$(document).ready(function(){

  $(".monkForm > fieldset > legend").addClass("first");
  $("#sidebar .dailySpecials .post p").hide();
  $("#sidebar .dailySpecials .post:last, #sidebar .latestPosts .post:last").css("border-bottom", "none");

	// color box launch
	$('a.thickbox').colorbox(); // Default
	$('a.thickbox[href*="ssl.monkdev.com"]').colorbox({iframe:true,width:500, height:600}); // All SSL
	$('a.thickbox[href*="loginMCMS.php"]').colorbox({iframe:true,width:450, height:300}); // Login	
	$('#content .slideshow').colorbox({
		slideshow:true,
		photo:true,
		preloading:true,
		slideshowSpeed:5000
	});
	/*
	$('#login .thickbox, #comments .thickbox').colorbox({iframe:true,width:400, height:250});
	$('#checkout .thickbox').colorbox({iframe:true,width:400, height:500});
	$('#footer .thickbox,#content .thickbox').colorbox();
	$('.rsvp .thickbox').colorbox({iframe:true,width:450, height:570});
	$('#options .thickbox,.section .thickbox').colorbox({iframe:true,width:500, height:570});
	*/
	
  var sbHeight = $("#sidebar").height();
  var contentHeight = $("#content").height();
  if (sbHeight > contentHeight) {
    $("#content").css("height", sbHeight);
  }  


$("#checkout .monkCart tr:odd").addClass("odd");   

	$('#billboard').cycle({ 
           fx:     'fade', 
           speed:  'slow', 
           timeout: 6000
       }); 

});

