// JavaScript Document
var expandDescription = function()
	{
		var self = this;
		this.sAtt = "showDescription";
		this.sElN="a";
		
	this.init = function()
			{
				this.setEvent();
			}
		
	this.setEvent = function()
		{
				
				var sElm=this.sElN+"["+this.sAtt+"]";
				var sAtt=this.sAtt;
					//set the hover (mouse over and mouse out)

				$(sElm).click(function()
									   {
										  
										  var a=$(this).attr(sAtt);
										  var e = $("#"+a); 

 										//e.slideToggle(100);
										 /*    this function catures the "this" and events from the on mouse over   
										 */

										if(e.is(":visible"))
											{
												self.hideWindow(a);
											}
										else{
												self.showWindow(a);
											}
										}

								
									);
			}
	
	this.showWindow = function(sEl)
		{
			var e=$("#"+sEl);
			e.show(20);
		}
		
	this.hideWindow = function(sEl)
		{
			var e=$("#"+sEl);
			e.hide(100);
		}
		
	this.hideAll = function()
		{
			var sEl=this.sElN+"["+this.sAtt+"]";
			var sAtt=this.sAtt;
			var oEl=$(sEl);
			$(oEl).each(function(){$("#"+ $(this).attr(sAtt)).slideUp(200)});
		}
		
	this.showAll = function(sElm)
		{
			var sEl=this.sElN+"["+this.sAtt+"]";
			var sAtt=this.sAtt;
			var oEl=$(sEl);
			$(oEl).each(function(){$("#"+ $(this).attr(sAtt)).slideDown(200)});
		}
		// end function
	}
	