(function($){


$.fn.slideRight=function(){
return this.each(function() {      
jQuery(this).animate({width: 'show'});
});  
}

$.fn.slideLeft=function(){   
return this.each(function() {      
jQuery(this).animate({width: 'hide'});
});
}



$.fn.mooSlideDown=function(speed,callback){ 
return this.each(function() { 
var $this = $(this);

if($this.data('animating')){
return false;}
else{	
$this.data('animating','true');
divHeight=$this.height();
$this.css({ "display":"block", "marginTop": "-"+divHeight+"px" });
$this.wrap('<div class="jwrapper"/>');
$this.parent().animate({			   
"height" : divHeight					   
}, speed, function() {
});

$this.animate({			   
"marginTop" : "0px"
}, speed, function() {	
$this.unwrap('.jwrapper');
$this.removeData('animating');
if (callback && $.isFunction(callback)) 
{callback.call($this);}
});
}

//Close this each
})
//Close mooSlideDown function
}





$.fn.mooSlideUp=function(speed,callback){ 

return this.each(function() { 
var $this = $(this);

if($this.data('animating')){
return false;}
else{	
$this.data('animating','true');
divHeight=$this.height();
$this.wrap('<div class="jwrapper"/>');
$this.parent().css({ "height": divHeight+"px" });
$this.parent().animate({			   
"height" : "0px"					   
}, speed, function() {
});

$this.animate({			   
"marginTop" : "-"+divHeight
}, speed, function() {
$this.css({ "display" : "none" });	
$this.unwrap('.jwrapper');
$this.removeData('animating')
if (callback && $.isFunction(callback)) 
{callback.call($this);}
});
}

//Close this each
})
//Close mooSlideUp function
}






$.fn.mooSlideToggle = function(speed, callback) {	
return this.each(function() {					  
var $this = $(this);
if($this.is(":visible")) {	
$this.mooSlideUp(speed, callback);
} else {
$this.mooSlideDown(speed, callback);
}
});
};
   








// CLOSE FUNCTION
})(jQuery);
		
