
	var zechim = {
		
		img_url	    : '',
		images 		: new Array(),
		img_total 	: 0,
		
		set_img_url : function(img_url)
		{
			this.img_url = img_url;
		},
		
		add_image : function(link, img, over, tooltip, width)
		{
			this.images[this.img_total] = new Array(4);
			this.images[this.img_total][0] = link;
			this.images[this.img_total][1] = img;
			this.images[this.img_total][2] = over;
			this.images[this.img_total][3] = tooltip;
			this.images[this.img_total][4] = width;
			this.img_total++;
		},
		
		render : function(obj)
		{
			for (var i in this.images)
			{
				var a = '';
				var img = '';
				var s = '';
				
				a 	= $('<a href="' + this.images[i][0] + '" target="_blank" style="display:block;float:left;outline:none;position:relative;text-decoration:none !important;"></a>');
				
				img = $('<img style="position:relative;z-index:7" class="' + this.img_url + '' + this.images[i][2] + '" rel="' + this.img_url + '' + this.images[i][1] + '" src="' + this.img_url + '' + this.images[i][1] + '" />');
				
				s = $('<span style="position:absolute;height:23px;margin-top:-22px;z-index:999;width:'+this.images[i][4]+'" class="tooltip">' +
					'<span class="l" style="height:23px;width:18px;background:#fff;float:left;background:url(\'img/left.png\') top no-repeat"></span>' +
						'<p style="height:20px;padding-top:3px;color:#F27815;float:left;margin:0;display:block;font-weight:bold;text-decoration:none !important;background:url(\'img/center.png\') top repeat-x">' + zechim.images[i][3] + '</p>' +
					'<span class="r" style="height:23px;width:17px;background:#fff;float:left;background:url(\'img/right.png\') top no-repeat"></span>' +
				'</span>');
				a.append(img).hover(function(){
					var w = (($(this).find('.tooltip').width()-44) / 2);
					if(jQuery.browser.mozilla)
					{
						$(this).find('.tooltip').css('marginLeft', (w*(-1))).show();	
					}else{
						$(this).find('.tooltip').show();
					}
					$(this).find('img').attr('src', $(this).find('img').attr('class'));
				}, function(){
					$(this).find('.tooltip').hide();
					$(this).find('img').attr('src', $(this).find('img').attr('rel'));
				});
				
				a.append(s);
				
				obj.append(a);
				var w = a.find('span.l').width() + a.find('p').width() + a.find('span.r').width();
				a.find('.tooltip').width(w+10).css({left: '-' + ((w-44)/2)}).hide();
			} 
		}
		
	};
