//var $j = jQuery.noConflict();
$(document).ready(function(){ 
	$('img.pngFix').ifixpng();
	$('a.practiceLogo').ifixpng();
	$('div#leftCHeader').ifixpng();
	$('div#leftCFooter').ifixpng();
	
	// QC Contact 
	$(".qc-hidden").hide(); 		
	
	  
	// Show the hidden fields
	$("textarea").focus(function() {		   
	   $(".qc-hidden").fadeIn("slow");
	});
	
	// The below code will change the active fields CSS class (.active) and remove the initial text.  
	//$("input, textarea").focus(function(){
//	  $(this).addClass("active");
//		  if( this.value == this.defaultValue ) {
//			this.value = "";
//		}
//	});

	// The below code will remove the CSS class (.active) and add back the initial text if nothing was entered. 
	//$("input, textarea").blur(function(){
//	  $(this).removeClass("active");
//		if( !this.value.length ) {
//			this.value = this.defaultValue;
//		}
//	});

	// If you click any of the defined elements below you will close the open fields. 
	$("#leftColumn, #mast, #header, #topNav, #sideNav, #empty").click(function(){
		$(".qc-hidden").fadeOut();

	});
	

	
	$('a[@rel*=lightbox]').lightBox();
	
	animatedcollapse.addDiv('blogContent', 'fade=1,group=left')
	animatedcollapse.addDiv('aboutContent', 'fade=1,group=left')
	
	animatedcollapse.init()
	
});

// Suckerfish


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

// Clear/Replace Fields
function clearText(thefield) {
  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
}

function replaceText(thefield) {
  if (thefield.value=="") { thefield.value = thefield.defaultValue }
}


