(function($){ 
    $.fn.extend({
		
		DDFading: function(attr, mode) {
			
			var noRows = Math.ceil(windowHeight / liHeight);
			var noColumns = Math.floor(windowWidth / liWidth);
			
			if(mode == 'next') {
			
				for(i=1;i<=noRows;i++) {
					
					var startItem = ((i * noColumns) - noColumns)+1;
					if(startItem === 0) { var startItem = 1; }
					
					//current column item
					var colItem = 1;
				
					//animates by rows
					for(i2=startItem; i2<=(noColumns*i); i2++) {
						
						var newClass = (i2+init);
						var delay = (colItem*attr.delay)+(i*attr.delay);
						jQuery('#g_'+i2).addClass('n_'+newClass).animate({ opacity: 1 }, delay).animate({ opacity: 0 }, attr.duration,function() {
							
							var tempInit = jQuery(this).attr('class').split('_');
							var newHTML = items.children('#i_'+tempInit[1]).html();
							jQuery(this).html(newHTML).attr('class', '').animate({ opacity: 1 }, attr.duration);
							
						});
						colItem++;
						
					}
					
				}
				
			} else if(mode == 'prev') {
				
				var i3 = 1;
				for(i=noRows;i>=1;i--) {
					
					var startItem = (i*noColumns);
					
					//current column item
					var colItem = 1;
				
					//animates by rows
					for(i2=startItem; i2 > (((i-1)*noColumns)); i2--) {
						
						var newClass = (i2+init);
						var delay = (colItem*attr.delay)+(i3*attr.delay);
						jQuery('#g_'+i2).addClass('n_'+newClass).animate({ opacity: 1 }, delay).animate({ opacity: 0 }, attr.duration,function() {
							
							var tempInit = jQuery(this).attr('class').split('_');
							var newHTML = items.children('#i_'+tempInit[1]).html();
							jQuery(this).html(newHTML).attr('class', '').animate({ opacity: 1 }, attr.duration);
							
						});
						colItem++;
						
					}
					i3++;
					
				}
			
			
			//IF SHUFFLING	
			} else {
				
				//shuffles the array
				var itemsArr = $.itemsShuffle(items.children('li').length+1);
			
				for(i=1;i<=noRows;i++) {
					
					var startItem = ((i * noColumns) - noColumns)+1;
					if(startItem === 0) { var startItem = 1; }
					
					//current column item
					var colItem = 1;
				
					//animates by rows
					for(i2=startItem; i2<=(noColumns*i); i2++) {
						
						var newClass = itemsArr[i2];
						var delay = (colItem*attr.delay)+(i*attr.delay);
						
						jQuery('#g_'+i2).addClass('n_'+newClass).animate({ opacity: 1 }, delay).animate({ opacity: 0 }, attr.duration,function() {
							
							var tempInit = jQuery(this).attr('class').split('_');
							var newHTML = items.children('#i_'+tempInit[1]).html();
							jQuery(this).html(newHTML).attr('class', '').animate({ opacity: 1 }, attr.duration);
							
						});
						colItem++;
						
					}
					
				}
				
			}
			
			//calculates the total delay and does stuff when finishes it
			var totalDelay = (delay+(attr.duration*2));
			ul.animate({ opacity: 1 }, totalDelay, function() {
				
				isPlaying = 0;
				
			});
			
		},
		
		DDFadingOut: function(attr, mode) {
			
			var noRows = Math.ceil(windowHeight / liHeight);
			var noColumns = Math.floor(windowWidth / liWidth);
			
			if(mode == 'next') {
			
				for(i=1;i<=noRows;i++) {
					
					var startItem = ((i * noColumns) - noColumns)+1;
					if(startItem === 0) { var startItem = 1; }
					
					//current column item
					var colItem = 1;
				
					//animates by rows
					for(i2=startItem; i2<=(noColumns*i); i2++) {
						
						var newClass = (i2+init);
						var delay = (colItem*attr.delay)+(i*attr.delay);
						jQuery('#g_'+i2).addClass('n_'+newClass).animate({ opacity: 1 }, delay).animate({ opacity: 0, left: '-300px', top: '-300px' }, attr.duration,function() {
							
							var tempInit = jQuery(this).attr('class').split('_');
							var newHTML = items.children('#i_'+tempInit[1]).html();
							jQuery(this).html(newHTML).attr('class', '').css({ left: '300px', top: '300px' }).animate({ opacity: 1, left: 0, top: 0 }, attr.duration);
							
						});
						colItem++;
						
					}
					
				}
				
			} else if(mode == 'prev') {
				
				var i3 = 1;
				for(i=noRows;i>=1;i--) {
					
					var startItem = (i*noColumns);
					
					//current column item
					var colItem = 1;
				
					//animates by rows
					for(i2=startItem; i2 > (((i-1)*noColumns)); i2--) {
						
						var newClass = (i2+init);
						var delay = (colItem*attr.delay)+(i3*attr.delay);
						jQuery('#g_'+i2).addClass('n_'+newClass).animate({ opacity: 1 }, delay).animate({ opacity: 0, left: '300px', top: '300px' }, attr.duration,function() {
							
							var tempInit = jQuery(this).attr('class').split('_');
							var newHTML = items.children('#i_'+tempInit[1]).html();
							jQuery(this).html(newHTML).attr('class', '').css({ left: '-300px', top: '-300px' }).animate({ opacity: 1, left: 0, top: 0 }, attr.duration);
							
						});
						colItem++;
						
					}
					i3++;
					
				}
			
			
			//IF SHUFFLING	
			} else {
				
				//shuffles the array
				var itemsArr = $.itemsShuffle(items.children('li').length+1);
			
				for(i=1;i<=noRows;i++) {
					
					var startItem = ((i * noColumns) - noColumns)+1;
					if(startItem === 0) { var startItem = 1; }
					
					//current column item
					var colItem = 1;
				
					//animates by rows
					for(i2=startItem; i2<=(noColumns*i); i2++) {
						
						var newClass = itemsArr[i2];
						var delay = (colItem*attr.delay)+(i*attr.delay);
						jQuery('#g_'+i2).addClass('n_'+newClass).animate({ opacity: 1 }, delay).animate({ opacity: 0, left: '-300px', top: '-300px' }, attr.duration,function() {
							
							var tempInit = jQuery(this).attr('class').split('_');
							var newHTML = items.children('#i_'+tempInit[1]).html();
							jQuery(this).html(newHTML).attr('class', '').css({ left: '300px', top: '300px' }).animate({ opacity: 1, left: 0, top: 0 }, attr.duration);
							
						});
						colItem++;
						
					}
					
				}
				
			}
			
			//calculates the total delay and does stuff when finishes it
			var totalDelay = (delay+(attr.duration*2));
			ul.animate({ opacity: 1 }, totalDelay, function() {
				
				isPlaying = 0;
				
			});
			
		},
		
		DDFadingRandom: function(attr, mode) {
			
			var noItems = Math.ceil(windowWidth/liWidth)*Math.ceil(windowHeight/liHeight);
			var twoThirdsItems = Math.ceil((noItems/4));
			
			var itemsArr = new Array();
			
			//generates array with 2/3 of our items
			for(i=1; i<=twoThirdsItems; i++) {
				
				itemsArr.push(i);
				
			}
			
			/////////////////////
			//IF IS SHUFFLING
			/////////////////////
			if(mode == 'shuffle') { var itemsShuffleArr = $.itemsShuffle(items.children('li').length); }
			
			//goes though our lis
			var count = 1; var highest = 0;
			ul.children('li').each(function() {
				
				//generates a random delay
				var delayNum = $.shuffle(itemsArr);
				var delay = (attr.delay*delayNum[0]);
				if(delay > highest) { highest = delay; }
				var newClass = (count+init);
				
				//if is shuffle
				if(mode == 'shuffle') { var newClass = itemsShuffleArr[count]; }
				
				//animates our item
				jQuery(this).addClass('n_'+newClass).animate({ opacity: 1 }, delay).animate({ opacity: 0 }, attr.duration, function() {
					
					var tempInit = jQuery(this).attr('class').split('_');
					var newHTML = items.children('#i_'+tempInit[1]).html();
					jQuery(this).html(newHTML).attr('class', '').animate({ opacity: 1 }, attr.duration);
					
				});
				
				count++;
				
			});
			
			//calculates the total delay and does stuff when finishes it
			var totalDelay = (highest+(attr.duration*2));
			ul.animate({ opacity: 1 }, totalDelay, function() {
				
				isPlaying = 0;
				
			});
			
		},
		
		DDTopLeft: function(attr, mode) {
			
			var noItems = Math.ceil(windowWidth/liWidth)*Math.ceil(windowHeight/liHeight);
			var noRows = Math.ceil(windowHeight / liHeight);
			var noColumns = Math.floor(windowWidth / liWidth);
			
			for(i=1;i<=noRows;i++) {
				
				var startItem = ((i * noColumns) - noColumns)+1;
				if(startItem === 0) { var startItem = 1; }
				
				//current column item
				var colItem = 1;
			
				//animates by rows
				for(i2=startItem; i2<=(noColumns*i); i2++) {
					
					var thisLeft = ((colItem-1) * liWidth);
					var thisTop = ((i-1) * liHeight);
					
					jQuery('#g_'+i2).append('<span class="top">'+thisTop+'</span><span class="left">'+thisLeft+'</span>');
					
					colItem++;
					
				}
				
			}
			
			var twoThirdsItems = Math.ceil((noItems/6));
			
			var itemsArr = new Array();
			
			//generates array with 2/3 of our items
			for(i=1; i<=twoThirdsItems; i++) {
				
				itemsArr.push(i);
				
			}
			
			
			//if shuffling
			if(mode == 'shuffle') { var itemsShuffleArr = $.itemsShuffle(items.children('li').length); }
			
			//goes though our lis
			var count = 1; var highest = 0;
			ul.children('li').each(function() {
				
				//generates a random delay
				var delayNum = $.shuffle(itemsArr);
				var delay = (attr.delay*delayNum[0]);
				if(delay > highest) { highest = delay; }
				var oldLeft = jQuery(this).children('.left').text();
				var oldTop = jQuery(this).children('.top').text();
				var newClass = (count+init);
				var thisCurrentHTML = jQuery(this).html();
				
				//if shuffling
				if(mode == 'shuffle') { var newClass = itemsShuffleArr[count]; }
				
				jQuery(this).html('');
				jQuery(this).append('<div class="old" style="position: absolute; top: 0; left: 0;">'+thisCurrentHTML+'</div>');
				
				//over visible
				jQuery(this).css({ overflow: 'visible' });
				
				//animates our items
				jQuery(this).addClass('n_'+newClass).children('div').animate({ opacity: 1 }, delay).animate({ left: '-'+oldLeft, top: '-'+oldTop }, attr.duration, function() {
				
					var tempInit = jQuery(this).parent().attr('class').split('_');
					var newHTML = items.children('#i_'+tempInit[1]).html();
					
					if(newHTML) {
						
						jQuery(this).html(newHTML).animate({ top: 0, left: 0 }, attr.duration, function() {
							
							jQuery(this).parent().html(newHTML).attr('class', '').css({ overflow: 'hidden' });
							
						});
						
					} else {
						
						jQuery(this).html(newHTML).animate({ top: 0, left: 0 }, attr.duration, function() {
							
							jQuery(this).parent().html('').attr('class', '').css({ overflow: 'hidden' });
							
						});
						
					}
					
				});
				
				count++;
				
			});
			
			//calculates the total delay and does stuff when finishes it
			var totalDelay = (highest+(attr.duration*2));
			ul.animate({ opacity: 1 }, totalDelay, function() {
				
				isPlaying = 0;
				
			});
			
		},
		
		DDFloat: function(attr, mode) {
			
			var noItems = Math.ceil(windowWidth/liWidth)*Math.ceil(windowHeight/liHeight);
			var noRows = Math.ceil(windowHeight / liHeight);
			var noColumns = Math.ceil(windowWidth / liWidth);
			
			var twoThirdsItems = Math.ceil((noItems/3));
			
			var itemsArr = new Array();
			
			//generates array with 2/3 of our items
			for(i=1; i<=twoThirdsItems; i++) {
				
				itemsArr.push(i);
				
			}
			
			//if shuffling
			if(mode == 'shuffle') { var itemsShuffleArr = $.itemsShuffle(items.children('li').length); }
			
			//goes though our lis
			var count = 1; var highest = 0;
			ul.children('li').each(function() {
				
				//generates a random delay
				var delayNum = $.shuffle(itemsArr);
				var delay = (attr.delay*delayNum[0]);
				if(delay > highest) { highest = delay; }
				var newClass = (count+init);
				var thisCurrentHTML = jQuery(this).html();
				
				//if shuffling
				if(mode == 'shuffle') { var newClass = itemsShuffleArr[count]; }
				
				jQuery(this).html('');
				jQuery(this).append('<div class="old" style="position: absolute; top: 0; left: 0;">'+thisCurrentHTML+'</div>');
				
				//OVER VISIBLE
				jQuery(this).css({ overflow: 'visible' });
				
				//animates our items
				jQuery(this).addClass('n_'+newClass).children('div').animate({ opacity: 1 }, delay).animate({ top: '-50px', opacity: 0 }, (attr.duration/1.5), function() {
					
					var tempInit = jQuery(this).parent().attr('class').split('_');
					var newHTML = items.children('#i_'+tempInit[1]).html();
					
					if(newHTML) {
						
						jQuery(this).css({ top: '50px' }).html(newHTML).animate({ top: 0, opacity: 1 }, (attr.duration/1.5), function() {
							
							jQuery(this).parent().html(newHTML).attr('class', '').css({ overflow: 'hidden' });
							
						});
						
					} else {
						
						jQuery(this).html(newHTML).animate({ top: 0, left: 0 }, attr.duration, function() {
							
							jQuery(this).parent().html('').attr('class', '').css({ overflow: 'hidden' });
							
						});
						
					}
					
				});
				
				count++;
				
			});
			
			//calculates the total delay and does stuff when finishes it
			var totalDelay = (highest+((attr.duration/1.5)*2));
			ul.animate({ opacity: 1 }, totalDelay, function() {
				
				isPlaying = 0;
				
			});
			
		},
		
		DDLeft: function(attr, mode) {
			
			var noItems = Math.ceil(windowWidth/liWidth)*Math.ceil(windowHeight/liHeight);
			var noRows = Math.ceil(windowHeight / liHeight);
			var noColumns = Math.floor(windowWidth / liWidth);
			
			for(i=1;i<=noRows;i++) {
				
				var startItem = ((i * noColumns) - noColumns)+1;
				if(startItem === 0) { var startItem = 1; }
				
				//current column item
				var colItem = 1;
			
				//animates by rows
				for(i2=startItem; i2<=(noColumns*i); i2++) {
					
					var thisLeft = ((colItem-1) * liWidth)+liWidth;
					
					jQuery('#g_'+i2).append('<span class="left">'+thisLeft+'</span>');
					
					colItem++;
					
				}
				
			}
			
			var twoThirdsItems = Math.ceil((noItems/6));
			
			var itemsArr = new Array();
			
			//generates array with 2/3 of our items
			for(i=1; i<=twoThirdsItems; i++) {
				
				itemsArr.push(i);
				
			}
			
			
			//if shuffling
			if(mode == 'shuffle') { var itemsShuffleArr = $.itemsShuffle(items.children('li').length); }
			
			//goes though our lis
			var count = 1; var highest = 0;
			ul.children('li').each(function() {
				
				//generates a random delay
				var delayNum = $.shuffle(itemsArr);
				var delay = (attr.delay*delayNum[0]);
				if(delay > highest) { highest = delay; }
				var oldLeft = jQuery(this).children('.left').text();
				var newClass = (count+init);
				var thisCurrentHTML = jQuery(this).html();
				
				//if shuffling
				if(mode == 'shuffle') { var newClass = itemsShuffleArr[count]; }
				
				jQuery(this).html('');
				jQuery(this).append('<div class="old" style="position: absolute; top: 0; left: 0;">'+thisCurrentHTML+'</div>');
				
				//over visible
				jQuery(this).css({ overflow: 'visible' });
				
				//animates our items
				jQuery(this).addClass('n_'+newClass).children('div').animate({ opacity: 1 }, delay).animate({ left: '-'+oldLeft }, attr.duration, function() {
					
					var tempInit = jQuery(this).parent().attr('class').split('_');
					var newHTML = items.children('#i_'+tempInit[1]).html();
					
					if(newHTML) {
						
						jQuery(this).html(newHTML).animate({ top: 0, left: 0 }, attr.duration, function() {
							
							jQuery(this).parent().html(newHTML).attr('class', '').css({ overflow: 'hidden' });
							
						});
						
					} else {
						
						jQuery(this).html(newHTML).animate({ top: 0, left: 0 }, attr.duration, function() {
							
							jQuery(this).parent().html('').attr('class', '').css({ overflow: 'hidden' });
							
						});
						
					}
					
				});
				
				count++;
				
			});
			
			//calculates the total delay and does stuff when finishes it
			var totalDelay = (highest+(attr.duration*2));
			ul.animate({ opacity: 1 }, totalDelay, function() {
				
				isPlaying = 0;
				
			});
			
		},
		
		DDTop: function(attr, mode) {
			
			var noItems = Math.ceil(windowWidth/liWidth)*Math.ceil(windowHeight/liHeight);
			var noRows = Math.ceil(windowHeight / liHeight);
			var noColumns = Math.ceil(windowWidth / liWidth);
			
			for(i=1;i<=noRows;i++) {
				
				var startItem = ((i * noColumns) - noColumns)+1;
				if(startItem === 0) { var startItem = 1; }
				
				//current column item
				var colItem = 1;
			
				//animates by rows
				for(i2=startItem; i2<=(noColumns*i); i2++) {
					
					var thisTop = ((i-1) * liHeight)+liHeight;
					
					jQuery('#g_'+i2).append('<span class="top">'+thisTop+'</span>');
					
					colItem++;
					
				}
				
			}
			
			var twoThirdsItems = Math.ceil((noItems/6));
			
			var itemsArr = new Array();
			
			//generates array with 2/3 of our items
			for(i=1; i<=twoThirdsItems; i++) {
				
				itemsArr.push(i);
				
			}
			
			
			//if shuffling
			if(mode == 'shuffle') { var itemsShuffleArr = $.itemsShuffle(items.children('li').length); }
			
			//goes though our lis
			var count = 1; var highest = 0;
			ul.children('li').each(function() {
				
				//generates a random delay
				var delayNum = $.shuffle(itemsArr);
				var delay = (attr.delay*delayNum[0]);
				if(delay > highest) { highest = delay; }
				var oldTop = jQuery(this).children('.top').text();
				var newClass = (count+init);
				var thisCurrentHTML = jQuery(this).html();
				
				//if shuffling
				if(mode == 'shuffle') { var newClass = itemsShuffleArr[count]; }
				
				jQuery(this).html('');
				jQuery(this).append('<div class="old" style="position: absolute; top: 0; left: 0;">'+thisCurrentHTML+'</div>');
				
				//over visible
				jQuery(this).css({ overflow: 'visible' });
				
				//animates our items
				jQuery(this).addClass('n_'+newClass).children('div').animate({ opacity: 1 }, delay).animate({ top: '-'+(parseInt(liHeight)+parseInt(oldTop)) }, attr.duration, function() {
					
					var tempInit = jQuery(this).parent().attr('class').split('_');
					var newHTML = items.children('#i_'+tempInit[1]).html();
					
					if(newHTML) {
						
						jQuery(this).html(newHTML).animate({ top: 0, left: 0 }, attr.duration, function() {
							
							jQuery(this).parent().html(newHTML).attr('class', '').css({ overflow: 'hidden' });
							
						});
						
					} else {
						
						jQuery(this).html(newHTML).animate({ top: 0, left: 0 }, attr.duration, function() {
							
							jQuery(this).parent().html('').attr('class', '').css({ overflow: 'hidden' });
							
						});
						
					}
					
				});
				
				count++;
				
			});
			
			//calculates the total delay and does stuff when finishes it
			var totalDelay = (highest+(attr.duration*2));
			ul.animate({ opacity: 1 }, totalDelay, function() {
				
				isPlaying = 0;
				
			});
			
		},
		
		DDSideRandom: function(attr, mode) {
			
			//shuffles a side
			var sides = ['top', 'left', 'bottom', 'right'];
			var sidesArr = [0,1,2,3];
			
			var noItems = Math.ceil(windowWidth/liWidth)*Math.ceil(windowHeight/liHeight);
			var noRows = Math.ceil(windowHeight / liHeight);
			var noColumns = Math.ceil(windowWidth / liWidth);
			
			for(i=1;i<=noRows;i++) {
				
				var startItem = ((i * noColumns) - noColumns)+1;
				if(startItem === 0) { var startItem = 1; }
				
				//current column item
				var colItem = 1;
			
				//animates by rows
				for(i2=startItem; i2<=(noColumns*i); i2++) {
			
					sidesArr = $.shuffle(sidesArr);
					
					var thisY = liHeight;
					var thisX = liWidth;
					
					if(sides[sidesArr[0]] == 'top') { jQuery('#g_'+i2).append('<span class="top" style="display: none;">'+thisY+'</span>'); }
					else if(sides[sidesArr[0]] == 'bottom') { jQuery('#g_'+i2).append('<span class="bottom" style="display: none;">'+thisY+'</span>'); }
					else if(sides[sidesArr[0]] == 'left') { jQuery('#g_'+i2).append('<span class="left" style="display: none;">'+thisX+'</span>'); }
					else if(sides[sidesArr[0]] == 'right') { jQuery('#g_'+i2).append('<span class="right" style="display: none;">'+thisX+'</span>'); }
					
					colItem++;
					
				}
				
			}
			
			var twoThirdsItems = Math.ceil((noItems/5));
			
			var itemsArr = new Array();
			
			//generates array with 2/3 of our items
			for(i=1; i<=twoThirdsItems; i++) {
				
				itemsArr.push(i);
				
			}
			
			
			//if shuffling
			if(mode == 'shuffle') { var itemsShuffleArr = $.itemsShuffle(items.children('li').length); }
			
			//goes though our lis
			var count = 1; var highest = 0;
			ul.children('li').each(function() {
				
				//generates a random delay
				var delayNum = $.shuffle(itemsArr);
				var delay = (attr.delay*delayNum[0]);
				if(delay > highest) { highest = delay; }
				var newClass = (count+init);
				var thisCurrentHTML = jQuery(this).html();
				
				var thisSide = jQuery(this).children('span').attr('class');
				var thisPos = jQuery(this).children('span').text();
				
				//if shuffling
				if(mode == 'shuffle') { var newClass = itemsShuffleArr[count]; }
				
				var newHTML = items.children('#i_'+newClass).html();
				
				jQuery(this).html('');
				jQuery(this).append('<div class="old" style="position: absolute;">'+thisCurrentHTML+'</div>');
				
				if(thisSide == 'top') {
					
					if(newHTML) { jQuery(this).append('<div class="new" style="position: absolute; top: '+thisPos+'px;">'+newHTML+'</div>'); }
					jQuery(this).children('div.old').animate({ opacity: 1 }, delay).animate({ top: '-'+thisPos }, attr.duration);
					jQuery(this).children('div.new').animate({ opacity: 1 }, delay).animate({ top: 0 }, attr.duration);
					
				}
				else if(thisSide == 'bottom') {
					
					if(newHTML) { jQuery(this).append('<div class="new" style="position: absolute; bottom: '+thisPos+'px;">'+newHTML+'</div>'); }
					jQuery(this).children('div.old').animate({ opacity: 1 }, delay).animate({ bottom: '-'+thisPos }, attr.duration);
					jQuery(this).children('div.new').animate({ opacity: 1 }, delay).animate({ bottom: 0 }, attr.duration);
					
				}
				else if(thisSide == 'left') {
					
					if(newHTML) { jQuery(this).append('<div class="new" style="position: absolute; left: '+thisPos+'px;">'+newHTML+'</div>'); }
					jQuery(this).children('div.old').animate({ opacity: 1 }, delay).animate({ left: '-'+thisPos }, attr.duration);
					jQuery(this).children('div.new').animate({ opacity: 1 }, delay).animate({ left: 0 }, attr.duration);
					
				}
				else if(thisSide == 'right') {
					
					if(newHTML) { jQuery(this).append('<div class="new" style="position: absolute; right: '+thisPos+'px;">'+newHTML+'</div>'); }
					jQuery(this).children('div.old').animate({ opacity: 1 }, delay).animate({ right: '-'+thisPos }, attr.duration);
					jQuery(this).children('div.new').animate({ opacity: 1 }, delay).animate({ right: 0 }, attr.duration);
					
				}
					
				jQuery(this).animate({ opacity: 1 }, (highest+(attr.duration*2)), function() {
					
					var thisFinalHTML = jQuery(this).children('div.new').html();
					jQuery(this).html(thisFinalHTML);
					
				});
				
				count++;
				
			});
			
			//calculates the total delay and does stuff when finishes it
			var totalDelay = (highest+(attr.duration*2));
			ul.animate({ opacity: 1 }, totalDelay, function() {
				
				isPlaying = 0;
				
			});
			
		},
		
		DDTopIn: function(attr, mode) {
			
			var noItems = Math.ceil(windowWidth/liWidth)*Math.ceil(windowHeight/liHeight);
			var noRows = Math.ceil(windowHeight / liHeight);
			var noColumns = Math.floor(windowWidth / liWidth);
			
			for(i=1;i<=noRows;i++) {
				
				var startItem = ((i * noColumns) - noColumns)+1;
				if(startItem === 0) { var startItem = 1; }
				
				//current column item
				var colItem = 1;
			
				//animates by rows
				for(i2=startItem; i2<=(noColumns*i); i2++) {
					
					var thisTop = ((i-1) * liHeight)+liHeight;
					
					jQuery('#g_'+i2).append('<span class="top">-'+thisTop+'</span>');
					
					colItem++;
					
				}
				
			}
			
			var twoThirdsItems = Math.ceil((noItems/4));
			
			var itemsArr = new Array();
			
			//generates array with 2/3 of our items
			for(i=1; i<=twoThirdsItems; i++) {
				
				itemsArr.push(i);
				
			}
			
			
			//if shuffling
			if(mode == 'shuffle') { var itemsShuffleArr = $.itemsShuffle(items.children('li').length); }
			
			//goes though our lis
			var count = 1; var highest = 0;
			ul.children('li').each(function() {
				
				//generates a random delay
				var delayNum = $.shuffle(itemsArr);
				var delay = (attr.delay*delayNum[0]);
				if(delay > highest) { highest = delay; }
				var oldTop = jQuery(this).children('.top').text();
				var newClass = (count+init);
				
				//removes span and gets current HTML
				jQuery(this).children('span').remove();
				var currentHTML = jQuery(this).html();
				
				//if shuffling
				if(mode == 'shuffle') { var newClass = itemsShuffleArr[count]; }
				
				var newHTML = items.children('#i_'+newClass).html();
				
				//over visible
				jQuery(this).css({ overflow: 'visible' });
				
				if(newHTML) { jQuery(this).html('<div class="old">'+currentHTML+'</div><div class="new" style="position: absolute; top: '+oldTop+'px;">'+newHTML+'</div>'); }
				else { jQuery(this).html('<div class="old">'+currentHTML+'</div><div class="new" style="position: absolute; top: '+oldTop+'px;"></div>'); }
				
				//animates our items
				jQuery(this).children('div.new').animate({ opacity: 1 }, delay).animate({ top: 0 }, attr.duration, function() {
						
					jQuery(this).parent().css({ overflow: 'hidden' });
					
					jQuery(this).parent().children('.old').fadeOut(200, function() {
					
						//gets the div HTML and puts it in the li removing the div
						var thisNewHTML = jQuery(this).parent().children('.new').html();
						jQuery(this).parent().html(thisNewHTML);
						
					});
					
				});
				
				count++;
				
			});
			
			//calculates the total delay and does stuff when finishes it
			var totalDelay = (highest+(attr.duration*2));
			ul.animate({ opacity: 1 }, totalDelay, function() {
				
				isPlaying = 0;
				
			});
			
		}
		
	});
	
})(jQuery);
