//functions for interval delay
jQuery.fn.slideFadeToggle = function(speed, easing, callback) {
	return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback);  
};
jQuery.fn.fadeToggle = function(speed, easing, callback) {
  return this.animate({opacity: 'toggle'}, speed, easing, callback);  
};
jQuery.fn.slideDownFade = function(speed, easing) {
	return this.animate({opacity:'.9', height: 'show'}, speed, easing);	
};
jQuery.fn.slideUpFade = function(speed, easing) {
	return this.animate({opacity:'0', height: 'hide'}, speed, easing);		
};
	
jQuery.fn.clearHiddenFields = function() {
	return this.each(function(){
		$("input[type='hidden']", this).each(function(){
			this.value = '';
		});
	});		
};
		
	
$(document).ready(function() {

	// Show Case Details
	$('a.detailsLnk').live("click", function(){
		$(this).toggleClass('collapse');
		$(this).next().next('.detailsWrap').slideFadeToggle(500);
		$(this).blur();	
	});
	
	// Show minor details
	$('a.serviceLnk').live("click", function(){
		$(this).next().slideFadeToggle(500);
		$(this).blur();																			
	});
	
	// Turn off current link
	var noClick = 'a.pageCurrent, a.detailsLnk, a.serviceLnk';
	$(noClick).live("click", function() {
		return false;														 
	});	
		
	// hide dynamic elements
	$('.detailsWrap, .nextDef').hide();
	
	//End functions
});
