$(document).ready(function(){var $grid=$('#grid');$grid.shuffle({itemSelector:'.item'});$('#filter a').click(function(e){e.preventDefault();$('#filter a').removeClass('active');$(this).addClass('active');var groupName=$(this).attr('data-group');$grid.shuffle('shuffle',groupName);});});