jquery.noconflict(); jquery(document).ready(function($){ function lightboxphoto() { jquery("a[rel^='prettyphoto']").prettyphoto({ animationspeed:'fast', slideshow:5000, theme:'light_rounded', show_title:false, overlay_gallery: false }); } if(jquery().prettyphoto) { lightboxphoto(); } if (jquery().quicksand) { // clone applications to get a second collection var $data = $(".portfolio-area").clone(); //note: only filter on the main portfolio page, not on the subcategory pages $('.portfolio-categ li').click(function(e) { $(".filter li").removeclass("active"); // use the last category class as the category to filter by. this means that multiple categories are not supported (yet) var filterclass=$(this).attr('class').split(' ').slice(-1)[0]; if (filterclass == 'all') { var $filtereddata = $data.find('.portfolio-item2'); } else { var $filtereddata = $data.find('.portfolio-item2[data-type=' + filterclass + ']'); } $(".portfolio-area").quicksand($filtereddata, { duration: 600, adjustheight: 'auto' }, function () { lightboxphoto(); }); $(this).addclass("active"); return false; }); }//if quicksand });