(function($){ 
    $.fn.extend({
		
		DDInit: function() {
			
			//important variables and globals
			var wrapperCont = this;
			fCont = this.parent().children('#fixed');
			var cont = this.children('#container');
			var ul = cont.children('ul#grid');
			var items = cont.children('ul#items');
			var itemsHome = cont.children('ul#home-items');
			var windowWidth = jQuery(window).width();
			var windowHeight = jQuery(window).height();
			var navCont = wrapperCont.children('#nav_hover');
			liWidth = (items.children('li').width()+1);
			liHeight = (items.children('li').height()+1);
			if(fCont.length > 0) { fWidth = (fCont.width() + (parseInt(fCont.css('padding-left'))) + (parseInt(fCont.css('padding-right')))); } else { fWidth = 0; }
			init = 1; constants = 0; curSlide = 1; isPlaying = 0; alertOn = 0; initialWindow = 1;
			contentCont = jQuery('#content');
			contentOver = jQuery('#content-over');
			
			//our attributes
			attr = arguments[0] || {};
			if(attr.transition === undefined) { attr.transition = 'random'; }
			if(attr.alertResize === undefined) { attr.alertResize = true; }
			if(attr.hoverOpacity === undefined) { attr.hoverOpacity = .2; }
			if(attr.duration === undefined) { attr.duration = 600; }
			if(attr.delay === undefined) { attr.delay = 50; }
			if(attr.transitionArray === undefined) { attr.transitionArray = ['fading', 'fadingOut', 'fadingRandom', 'topLeft', 'float', 'left', 'topOutIn', 'sideRandom', 'topIn']; }
			if(attr.pagination === undefined) { attr.pagination = true; }
			if(attr.floatTop === undefined) { attr.floatTop = 50; }
			if(attr.floatBottom === undefined) { attr.floatBottom = 50; }
			if(attr.fadingOutTop === undefined) { attr.fadingOutTop = 300; }
			if(attr.fadingOutLeft === undefined) { attr.fadingOutLeft = 300; }
			if(attr.hoverAlwaysOn === undefined) { attr.hoverAlwaysOn = false; }
			
			//adds lis to our grid (maximum res 2550x1440)
			var maximumLis = Math.ceil((2550-fWidth)/liWidth)*Math.ceil(1400/liHeight);
			for(i=1;i<=maximumLis;i++) { ul.append('<li id="g_'+i+'"></li>'); }
			
			//Ids our items
			items.html(itemsHome.html());
			var id = 1; items.children('li').each(function() { if(!jQuery(this).attr('id')) { jQuery(this).attr('id', 'i_'+id); id++; } });
			totalLis = items.children('li').length;
			
			//adds current to our 'home' menu items
			jQuery('#fixed .menu .home').addClass('current');
			
			var attr = '';
			
			//Starts by resizing our window
			wrapperCont.DDResize(attr);
			
		},
		
		DDShowcase: function() {
			
			//important variables and globals
			wrapperCont = this;
			var cont = this.children('#container');
			var ul = cont.children('ul#grid');
			var ulItems = cont.children('ul#items');
			var windowWidth = jQuery(window).width();
			var windowHeight = jQuery(window).height();
			var navCont = wrapperCont.children('#nav_hover');
			
			//our attributes
			attr = arguments[0] || {};
			if(attr.transition === undefined) { attr.transition = 'random'; }
			if(attr.alertResize === undefined) { attr.alertResize = true; }
			if(attr.hoverOpacity === undefined) { attr.hoverOpacity = .2; }
			if(attr.duration === undefined) { attr.duration = 600; }
			if(attr.delay === undefined) { attr.delay = 50; }
			if(attr.transitionArray === undefined) { attr.transitionArray = ['fading', 'fadingRandom', 'topLeft', 'float', 'left', 'topOutIn', 'sideRandom', 'topIn']; }
			if(attr.pagination === undefined) { attr.pagination = true; }
			
			jQuery(window).resize(function() {
				
				wrapperCont.DDResize(attr);
				wrapperCont.alertResize(attr.alertResize);
				
				//if its an image popup
				if(initialWindow == 'image') { contentCont.centerImageResize(); }
				if(initialWindow == 'video') { contentCont.centerVideoResize(); }
				if(initialWindow == 'page') { contentCont.centerPageResize(); }
				
			});
			
			//organises the initial content
			wrapperCont.DDInitItems(attr, 'home');
			
			//when users hovers nav
			navCont.hover(function() { navCont.children('#nav, #pagination').stop().animate({ bottom: 0 }, 300); navCont.children('span').stop().animate({ bottom: '-30px' }, 300); },
						function() { navCont.children('#nav, #pagination').stop().animate({ bottom: '-53px' }, 300); navCont.children('span').stop().animate({ bottom: 10 }, 200); });
						
			//when users presses next
			navCont.children('#nav').children('#next').click(function() {
				
				wrapperCont.playNext(attr, 'next');
				
			});
						
			//when users presses prev
			navCont.children('#nav').children('#prev').click(function() {
				
				wrapperCont.playNext(attr, 'prev');
				
			});
						
			//when users presses shuffle
			navCont.children('#nav').children('#shuffle').click(function() {
				
				wrapperCont.playNext(attr, 'shuffle');
				
			});
						
			//when users presses pagination
			paginationCont.children('ul').children('li').click(function() {
				
				var pag_clicked = jQuery(this).attr('id').split('_');
				wrapperCont.playNext(attr, 'pagination', pag_clicked[1]);
				
			});
			
			jQuery(document).keydown(function(e) {
					
				switch(e.keyCode) {
					
					case 37:
					
						if(initialWindow === 1) { wrapperCont.playNext(attr, 'prev'); }
						break;
						
					case 39:
						if(initialWindow === 1) {wrapperCont.playNext(attr, 'next'); }
						break;
						
					case 83:
						if(initialWindow === 1) {wrapperCont.playNext(attr, 'shuffle'); }
						break;
					
				}
					
			});
			
			ul.hoverItems();
			ul.clickItems();
			ul.clickItemsTwice();
			wrapperCont.menuHandler();
			
			cont.animate({ opacity: 1 }, 500, function() {
				
				navCont.fadeIn(500);
				jQuery('.loading').removeClass('loading');
				
			});
			
			//if hover is always on
			if(attr.hoverAlwaysOn == true) {
				
				//dims thumbnails
				ul.children('li').children('.image').css({ opacity: attr.hoverOpacity });
				ul.children('li').children('.images').css({ opacity: attr.hoverOpacity });
				
				//shows info
				ul.children('li').children('.item-info').css({ opacity: 1 });
				
				//dims items
				ulItems.children('li').children('.image').css({ opacity: attr.hoverOpacity });
				ulItems.children('li').children('.images').css({ opacity: attr.hoverOpacity });
				
				//shows info
				ulItems.children('li').children('.item-info').css({ opacity: 1 });
				
			}
			
		},
		
		DDResize: function(attr) {
			
			//function responsible for resizing our page
			//important variables
			wrapperCont = this;
			cont = this.children('#container');
			ul = cont.children('ul#grid');
			ulItems = cont.children('ul#items');
			itemsHome = cont.children('ul#home-items');
			windowWidth = jQuery(window).width();
			windowHeight = jQuery(window).height();
			navCont = wrapperCont.children('#nav_hover').children('#nav');
			paginationCont = wrapperCont.children('#nav_hover').children('#pagination');
			
			
			//resizes the wrapper to 100%
			wrapperCont.css({ width: (windowWidth-fWidth), height: windowHeight });
			fCont.css({ height: windowHeight });
			
			//calculate the container width and height on the number of items 
			//we can fit in the wrapper (but still show one)
			//var contWidth = (Math.ceil(((windowWidth-fWidth) / liWidth))) * liWidth;
			var contWidth = (Math.floor(((windowWidth-fWidth) / liWidth))) * liWidth;
			var contHeight = (Math.floor((windowHeight / liHeight))) * liHeight;
			//sets the container width and height
			cont.css({ width: contWidth, height: contHeight });
			
			//centers our #nav
			var centerNav = (((windowWidth-fWidth) / 2)-(navCont.width() / 2));
			navCont.css({ left: centerNav });
			
			
			//Pagination
			totalDisplay = ((Math.floor((windowWidth / liWidth))))*((Math.floor((windowHeight / liHeight))))-1;
			totalSlides = Math.floor(totalLis/(Math.floor(totalDisplay/2)));
			
			var totalDisplay = ((Math.floor((windowWidth / liWidth))))*((Math.floor((windowHeight / liHeight))))-1;
			var totalSlides = Math.floor(totalLis/(Math.floor(totalDisplay/2)));
			var centerIndicator = (((windowWidth-fWidth) / 2)-(navCont.parent().children('span').width() / 2));
			paginationCont.children('ul').html('');
			for(i=1; i <= totalSlides; i++) {
				
				if(i == curSlide) {
					
					paginationCont.children('ul').append('<li class="active" id="pag_'+i+'">'+i+'</li>');
					
				} else {
					
					paginationCont.children('ul').append('<li id="pag_'+i+'">'+i+'</li>');
					
				}
				
			}
			
			//centers our #pagination
			var centerPag = (((windowWidth-fWidth) / 2)-(navCont.width() / 2) + navCont.width() + 5);
			paginationCont.css({ left: centerPag });
			
			navCont.parent().children('span').css({ left: centerIndicator });
			
		},
		
		DDInitItems: function(attr) {
			
			ulItems.children('li').children('.item-info').css({ display: 'block', opacity: 0 });
			ulItems.children('li').children('.images').css({ display: 'block', opacity: 0 });
			
			//if hover is always on
			if(attr.hoverAlwaysOn == true) {
				
				//dims items
				ulItems.children('li').children('.image').css({ opacity: attr.hoverOpacity });
				ulItems.children('li').children('.images').css({ opacity: attr.hoverOpacity });
				
				//shows info
				ulItems.children('li').children('.item-info').css({ opacity: 1 });
				
			}
			
			//appends the first 64 items to the grid
			var i = 1;
			ul.children('li').each(function() {
				
				var thisHTML = ulItems.children('#i_'+i).html();
				
				//if HTML exists
				if(thisHTML != '') {
					
					ul.children('#g_'+i).html(thisHTML);
					
				}
				i++;
				
			});
			
			//our logo
			ul.children('#g_0').html(ulItems.children('#logo').html());
			
		},
		
		playNext: function(attr, mode, pageNum) {
			
			clearInterval(thisBGSlide);
			
			//defines our transition
			if(attr.transition == 'fading' || attr.transition == 'fadingOut' || attr.transition == 'fadingRandom' || attr.transition == 'topLeft' || attr.transition == 'float' || attr.transition == 'left' || attr.transition == 'topOutIn' || attr.transition == 'sideRandom' || attr.transition == 'topIn' || attr.transition == 'fadingOut') { var nextTransition = attr.transition } else {
				
				//transition array
				var numTrans = new Array();
				for(i=0; i<attr.transitionArray.length; i++) { numTrans.push(i); }
				
				//shuffles it and returns
				var nextTransShuffle = $.shuffle(numTrans);
				var nextTransition = attr.transitionArray[nextTransShuffle[0]];
				
			}
			
			//allows it to play or not
			allowPlay = 0;
			
			//finds the init constant
			if(mode == 'next') {
				
				//how many we actually display?
				var totalDisplay = ((Math.floor((windowWidth / liWidth))))*((Math.floor((windowHeight / liHeight))))-1;
				var totalSlides = Math.floor(totalLis/(Math.floor(totalDisplay/2)));
				if(curSlide < totalSlides && isPlaying === 0) {
					
					allowPlay = 1; isPlaying = 1;
					init = (Math.floor(totalDisplay / 2))*curSlide;
					curSlide++;
					
				}
				
			} else if(mode == 'prev') {
				
				//how many we actually display?
				var totalDisplay = ((Math.floor((windowWidth / liWidth))))*((Math.floor((windowHeight / liHeight))))-1;
				if(curSlide > 1 && isPlaying === 0) {
					
					allowPlay = 1; isPlaying = 1;
					init = init-(Math.floor(totalDisplay / 2));
					curSlide--;
					
				}
				
				
			} else if(mode == 'shuffle') {
				
				if(isPlaying === 0) {
					
					allowPlay = 1; isPlaying = 1;
					init = 0;
					curSlide = 1;
					
				}
				
			} else {
				
				if(isPlaying === 0 && (curSlide != (pageNum))) {
					
					var totalDisplay = ((Math.floor((windowWidth / liWidth))))*((Math.floor((windowHeight / liHeight))))-1;
					init = (Math.floor(totalDisplay / 2))*(pageNum-1);
					allowPlay = 1; isPlaying = 1;
					curSlide = pageNum;
					
				}
				
			}
			
			if(nextTransition == 'fading' && allowPlay === 1) { wrapperCont.DDFading(attr, mode); allowPlay = 0; }
			if(nextTransition == 'fadingOut' && allowPlay === 1) { wrapperCont.DDFadingOut(attr, mode); allowPlay = 0; }
			if(nextTransition == 'fadingRandom' && allowPlay === 1) { wrapperCont.DDFadingRandom(attr, mode); allowPlay = 0; }
			if(nextTransition == 'topLeft' && allowPlay === 1) { wrapperCont.DDTopLeft(attr, mode); allowPlay = 0; }
			if(nextTransition == 'float' && allowPlay === 1) { wrapperCont.DDFloat(attr, mode); allowPlay = 0; }
			if(nextTransition == 'left' && allowPlay === 1) { wrapperCont.DDLeft(attr, mode); allowPlay = 0; }
			if(nextTransition == 'topOutIn' && allowPlay === 1) { wrapperCont.DDTop(attr, mode); allowPlay = 0; }
			if(nextTransition == 'sideRandom' && allowPlay === 1) { wrapperCont.DDSideRandom(attr, mode); allowPlay = 0; }
			if(nextTransition == 'topIn' && allowPlay === 1) { wrapperCont.DDTopIn(attr, mode); allowPlay = 0; }
			
			//fixes up the pagination
			if(mode != 'shuffle') {
				paginationCont.children('ul').children('li.active').removeClass('active');
				paginationCont.children('ul').children('li#pag_'+curSlide).addClass('active');
			} else {
				paginationCont.children('ul').children('li.active').removeClass('active');
				paginationCont.children('ul').children('li#pag_1').addClass('active');
			}
			
			
		},
		
		alertResize: function(el) {
			
			if(el === true && alertOn === 0) {
				
				alertOn = 1;
				wrapperCont.children('#alert').fadeIn(300).delay(5000).fadeOut(200, function () { alertOn = 0; });
				
			}
			
		},
		
		hoverItems: function() {
			
			this.children('li').hover(function() {
				
				if(isPlaying === 0) {
					
					jQuery(this).children('.image').children('img').stop().animate({ opacity: attr.hoverOpacity }, 100);
					jQuery(this).children('.item-info').stop().animate({ opacity: 1 }, 200);
					
					//plays the bg slideshow
					if(jQuery(this).children('.images').length) {
						
						var gridCont = jQuery(this);
						
						var i = 1;
						jQuery(this).children('.images').children('img').each(function() {
							
							jQuery(this).addClass('image_'+i);
							
						});
						
						//our slider
						thisBGSlide = setInterval(function() {
							
							if(attr.hoverAlwaysOn != true) { gridCont.children('.images').css({ width: liWidth+'px', height: liHeight+'px' }).stop().animate({ opacity: 1 }, attr.duration); }
							else { gridCont.children('.images').css({ width: liWidth+'px', height: liHeight+'px' }).stop().animate({ opacity: attr.hoverOpacity }, attr.duration); }
							
							//if our initial image is shown
							if(gridCont.children('.image').children('img').css('opacity') > 0) {
								
								//shows our next image over it
								gridCont.children('.images').children('img:first').addClass('current').css({ display: 'block', opacity: 0 });
								gridCont.children('.images').children('img:first').stop().animate({ opacity: attr.hoverOpacity }, attr.duration);
								gridCont.children('.image').children('img').stop().animate({ opacity: 0 }, attr.duration);
								
							} else {
								
								//gets our next image
								var curImage = gridCont.children('.images').children('img.current');
								var nextImage = curImage.next();
								
								if(nextImage.length > 0) {
									
									curImage.css({ display: 'block', 'z-index': 1 }).stop().animate({ opacity: 0 }, attr.duration);
									nextImage.css({ display: 'block', opacity: 0, 'z-index': 2 }).stop().animate({ opacity: attr.hoverOpacity }, attr.duration, function() {
										
										curImage.removeClass('current').hide();
										nextImage.addClass('current');
										
									});
									
								} else {
									
									gridCont.children('.image').children('img').stop().animate({ opacity: attr.hoverOpacity }, attr.duration);
									curImage.stop().animate({ opacity: 0 }, attr.duration, function() {
										
										curImage.removeClass('current');
										gridCont.children('.images').children('img').hide();
										
									});
									
								}
								
							}
							
						}, 1500);
						
					}
					
				}
				
			}, function() {
				
				var mainLiContShadowRemove = jQuery(this);
				
				jQuery(this).removeClass('clicked');
				jQuery(this).children('.image').children('img').stop().animate({ opacity: 1 }, 1000);
				if(attr.hoverAlwaysOn != true) { jQuery(this).children('.item-info').stop().animate({ opacity: 0 }, 300); }
				clearInterval(thisBGSlide);
				jQuery(this).children('.images').children('img').stop().animate({ opacity: 0 }, attr.duration, function() {
					
					mainLiContShadowRemove.removeClass('shadowed');
					jQuery(this).css({ opacity: 0 });
					
				});
				jQuery(this).children('.images').children('img').each(function() { jQuery(this).removeClass('current'); });
				
				//checks if our description is open
				if((jQuery(this).children('.description').css('display') == 'block') || (ul.children('.shadowed').length > 0)) {
					
					//checks if its one of the last items
					if(jQuery(this).children('.image').css('top') >= 0 || jQuery(this).children('.image').css('top') == 'auto') {
					
						jQuery(this).children('.description').fadeOut((attr.duration/1.5), function() {
							
							jQuery(this).parent().css({ 'z-index': 90, overflow: 'hidden' }).removeClass('shadowed');
							jQuery(this).removeClass('shadowed');
							
						});
						if(jQuery.browser.msie && parseInt(thisBrowser.version) <= 8) {  } else { ul.children('li').stop().animate({ opacity: 1}, attr.duration); }
					
					} else {
						
						jQuery(this).children('.description').slideUp(attr.duration/2, function() {
							
							jQuery(this).parent().css({ 'z-index': 90 }).children('.image, .images, .item-info').removeClass('shadowed').animate({ top: 0 }, attr.duration/2, function() { jQuery(this).parent().css({ overflow: 'hidden' }); });
							
						});
						if(jQuery.browser.msie && parseInt(thisBrowser.version) <= 8) {  } else { ul.children('li').stop().animate({ opacity: 1}, attr.duration); }
						
					}
					
				}
				
			});	
			
		},
		
		clickItems: function() {
			
			//when user clicks it
			ul.children('li').click(function() {
				
				//if it has a description
				if(jQuery(this).children('.description').length > 0) {
				
					var numOfRows = Math.ceil(windowHeight/liHeight);
					var itemsPerRow = Math.floor(windowWidth/liWidth);
					
					var clickedNum = jQuery(this).attr('id').split('_');
					
					//if its one of the last items
					if(clickedNum[1] > ((numOfRows-2)*itemsPerRow)) {
						
						//make it z-index 100 and overflow visible
						jQuery(this).css({ overflow: 'visible', 'z-index': 100 }).children('.image').addClass('shadowed');
						
						//fix up the height of the description box
						jQuery(this).children('.description').css({ height: (liHeight-46), top: 0 }).addClass('shadowed');
						
						jQuery(this).children('.image, .images, .item-info').animate({ top: -liHeight }, attr.duration/2, function() {
							
							jQuery(this).parent().children('.description').slideDown(attr.duration/2);
							jQuery(this).parent().addClass('clicked');
							
						});
						
						//if its not IE 8 or less
						var thisBrowser = jQuery.browser;
						if(thisBrowser.msie && parseInt(thisBrowser.version) <= 8) {  } else {
						
							//fades other items
							ul.children('li').stop().animate({ opacity: attr.hoverOpacity }, (attr.duration/1.5));
							jQuery(this).stop().animate({ opacity: 1 }, 0);
						
						}
						
					} else {
					
						//make it z-index 100 and overflow visible
						jQuery(this).css({ overflow: 'visible', 'z-index': 100 }).addClass('shadowed');
						
						//fix up the height of the description box
						jQuery(this).children('.description').css({ height: (liHeight-46), top: liHeight }).addClass('shadowed').slideDown((attr.duration/1.5), function() { jQuery(this).parent().addClass('clicked'); });
						
						//fades other items
						//if its not IE 8 or less
						var thisBrowser = jQuery.browser;
						if(thisBrowser.msie && parseInt(thisBrowser.version) <= 8) {  } else {
						
							ul.children('li').stop().animate({ opacity: attr.hoverOpacity }, (attr.duration/1.5));
							jQuery(this).stop().animate({ opacity: 1 }, 0);
						
						}
					
					}
					
				} else {
					
					jQuery(this).loadItem();
					
				}
				
			});
			
		},
		
		menuHandler: function() {
			
			//vars
			var menuCont = jQuery('#fixed .menu');
			
			//when users clicks a menu item
			menuCont.children('li').click(function() {
				
				var itemClicked = jQuery(this);
				var itemClickedClass = jQuery(this).children('a').attr('class').split(' ');
				
				//checks if its not currently current
				if(!itemClickedClass[1]) {
					
					//checks the type of clicked item
					var thisClicked = jQuery(this).children('a').attr('class');
					
					ul.children('.currentlyClicked').closeContent();
					
					//if it's an album
					if(thisClicked == 'album') {
					
						//removes the current from the current items
						menuCont.children('li').children('a.current').removeClass('current');
						itemClicked.children('a').addClass('current');
						
						//let's fadeOut our currentItems
						wrapperCont.addClass('loading');
						ul.children('li').fadeOut(300, function() {
							
							//emptys the html
							ul.children('li').each(function() { jQuery(this).html(''); });
							
						});
							
						//loads our new items
						ulItems.animate({ opacity: 0 }, 300, function() {
							
							ulItems.html('').load(itemClicked.children('a').attr('href'), function(response, status, xhr) {
								
								//if success
								if(status == 'success') {
									
									totalLis = ulItems.children('li').length;
									wrapperCont.DDResize(attr);
									
									var id = 1; ulItems.children('li').each(function() { if(!jQuery(this).attr('id')) { jQuery(this).attr('id', 'i_'+id); id++; } });
									wrapperCont.DDInitItems(attr);
									
									ul.children('li').fadeIn(300, function() { wrapperCont.removeClass('loading'); });
								
								} else {
									
									alert('An error has occurred. Page could not be loaded.');
									
								}
								
							});
							
						});
						
					} else if(thisClicked == 'home') {
					
						//removes the current from the current items
						menuCont.children('li').children('a.current').removeClass('current');
						itemClicked.children('a').addClass('current');
						
						//let's fadeOut our currentItems
						wrapperCont.addClass('loading');
						ul.children('li').fadeOut(300, function() {
							
							//emptys the html
							ul.children('li').each(function() { jQuery(this).html(''); });
							
						});
							
						//loads our new items
						ulItems.animate({ opacity: 0 }, 300, function() {
							
							ulItems.html(itemsHome.html());
							var id = 1; ulItems.children('li').each(function() { if(!jQuery(this).attr('id')) { jQuery(this).attr('id', 'i_'+id); id++; } });
							wrapperCont.DDInitItems(attr);
							
							totalLis = ulItems.children('li').length;
							wrapperCont.DDResize(attr);
							
							ul.children('li').fadeIn(300, function() { wrapperCont.removeClass('loading'); });
							
						});
						
					} else if(thisClicked == 'page') {
					
						//removes the current from the current items
						menuCont.children('li').children('a.current').removeClass('current').addClass('currentTemp');
						itemClicked.children('a').addClass('current');
						
						//let's load our page
						var pageUrl = itemClicked.children('a').attr('href');
						var contentPage = jQuery('#content-page');
						
						contentPage.append('<div></div>').children('div').load(pageUrl, function(response, status, xhr) {
							
							//if success
							if(status == 'success') {
								
								//opens our page
								itemClicked.loadItem('page');
								
							} else {
								
								alert('An error has occurred. Page could not be loaded.');
								
							}
							
						});
						
						
					} else if(thisClicked == 'link') {
					
						var pageUrl = itemClicked.children('a').attr('href');
						window.open(pageUrl, '_blank');
						
					}
				
				}
				
				//returns false
				return false;
				
			});
			
		}
		
	});
	
	$.fn.shuffle = function() {
		return this.each(function(){
			var items = $(this).children();
			return (items.length) ? $(this).html($.shuffle(items)) : this;
		});
	};
	
	$.shuffle = function(arr) {
		for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i, 10), x = arr[--i], arr[i] = arr[j], arr[j] = x) {  }
		return arr;
	};
	
	$.itemsShuffle = function(num) {
		var arr = new Array();
		for(i=1; i<=num; i++) {
			arr.push(i);
		}
		var arr = $.shuffle(arr);
		return arr;
	};
	
})(jQuery);
