/**
 * @author admin
 */
var thumbnail = function(C,B){
				C.target.empty()
				var 	obj = [],
					limit = ( typeof C.limit != 'undefined' ? C.limit : ''),
					column = (typeof C.column != 'undefined' ? C.column :3),
					isto = this;
				this.body = $('<div></div>').appendTo(C.target)
				this.height=0;
				this.run = function(Data){
					isto.body.empty()
					var positionLeft = 0,
					positionTop = 0,
					maxHeight=0
					j=0,heightArray=new Array();
					$.each(Data, function(i, item){
						if (i < limit || limit == '') {
							obj[i] = $('<div></div>').html(C.structure(item)).css({
								overflow: 'hidden',
								position: 'absolute',
								left: positionLeft,
								top: positionTop
							}).css(C.style).appendTo(isto.body).hide()
							if (maxHeight < obj[i].height()) maxHeight = obj[i].height()
							heightArray[j] = maxHeight
							positionLeft += obj[i].width() + ((typeof C.style.__whiteSpace != 'undefined') ? C.style.__whiteSpace : 0)
							if ((i + 1) % column == 0) {
								j++
								positionLeft = 0
								positionTop += maxHeight + ((typeof C.style.__whiteSpace != 'undefined') ? C.style.__whiteSpace : 0)
								maxHeight = 0
							}
							obj[i].fadeIn('fast')
						}
					})
					if(j!=0)
					for(i=0;i<j;i++)
						isto.height+=heightArray[i]
					else	isto.height=heightArray[0]
					
					imageLoader = isto.body.find('img').hide()
					imageLoader.load(function(){
						$(this).fadeIn('fast')
					})

				}
		}