/* */
  
jQuery.fn.hideVisible = function(params){
	if(this.css('display')!='none')
		return this.SlideOutUp(params); 
	else
		return this;
}

jQuery.fn.showHidden = function(params){
	if(this.css('display')=='none')
		return this.SlideInUp(params);
	else
		return this;
}


jQuery.fn.slideUpVisible = function(params){
	if(this.css('display')!='none')
		return this.slideUp(params);
	else
		return this;
}

jQuery.fn.slideDownHidden = function(params){
	if(this.css('display')=='none')
		return this.slideDown(params);
	else
		return this;
}


jQuery.fn.emptyOrDefaultValue = function(params){
	var attrname = params?(params.attr?params.attr:'title'):'title';
	if(	this.val() == '' || 
		this.val() == 
		this.attr(attrname)){
		return true;
	}else{
		return false;
	}
}
/* */


jQuery.fn._srcAddListener	=	function(param){
	return this.bind(jQuery.fn.src.EVENTNAME, null, param);
}

jQuery.fn._srcChange	=	function(param){
	return this.each(
		function(a, e){
			$this	=	$(this);
			if(this.nodeName.toLowerCase() == 'img') {
				$this.trigger(jQuery.fn.src.EVENTNAME);
				$this.attr('src', param );
			}else{
				//
			}
		}
	)
}

jQuery.fn.src	=	function(param){
	if(typeof param == "function"){
		return this._srcAddListener(param);
	}else if(typeof param == "string"){
		return this._srcChange(param);
	}else{
		return this;
	}
}

jQuery.fn.src.EVENTNAME	=	'_srcChange';