1 |
b9383c72
|
Julien Enselme
|
|
2 |
|
|
jQuery(document).ready(function(){
|
3 |
|
|
|
4 |
|
|
if ( jQuery( '.portfolio-item-hover-content' ).length && jQuery() ) {
|
5 |
|
|
function hover_effect() {
|
6 |
|
|
jQuery('.portfolio-item-hover-content').hover(function() {
|
7 |
|
|
jQuery(this).find('div,a').stop(0,0).removeAttr('style');
|
8 |
|
|
jQuery(this).find('.hover-options').animate({opacity: 0.9}, 'fast');
|
9 |
|
|
jQuery(this).find('a').animate({"top": "60%" });
|
10 |
|
|
}, function() {
|
11 |
|
|
jQuery(this).find('.hover-options').stop(0,0).animate({opacity: 0}, "fast");
|
12 |
|
|
jQuery(this).find('a').stop(0,0).animate({"top": "150%"}, "slow");
|
13 |
|
|
jQuery(this).find('a.zoom').stop(0,0).animate({"top": "150%"}, "slow");
|
14 |
|
|
});
|
15 |
|
|
}
|
16 |
|
|
hover_effect();
|
17 |
|
|
}
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
var jQueryfilterType = jQuery('#filterable li.active a').attr('class');
|
21 |
|
|
var jQueryholder = jQuery('ul.portfolio-items');
|
22 |
|
|
var jQuerydata = jQueryholder.clone();
|
23 |
|
|
jQuery('#filterable li a').click(function(e) {
|
24 |
|
|
jQuery('#filterable li').removeClass('active');
|
25 |
|
|
var jQueryfilterType = jQuery(this).attr('data-type');
|
26 |
|
|
jQuery(this).parent().addClass('active');
|
27 |
|
|
|
28 |
|
|
if (jQueryfilterType == 'all') {
|
29 |
|
|
var jQueryfilteredData = jQuerydata.find('li');
|
30 |
|
|
}
|
31 |
|
|
else {
|
32 |
|
|
var jQueryfilteredData = jQuerydata.find('li[data-type~="' + jQueryfilterType + '"]');
|
33 |
|
|
}
|
34 |
|
|
|
35 |
|
|
jQueryholder.quicksand(jQueryfilteredData, {
|
36 |
|
|
duration: 500,
|
37 |
|
|
useScaling: false,
|
38 |
|
|
adjustHeight:false,
|
39 |
|
|
easing: 'swing',
|
40 |
|
|
enhancement:function(){
|
41 |
|
|
hover_effect();
|
42 |
|
|
}},
|
43 |
|
|
function() {
|
44 |
|
|
jQuery("a[data-rel^='prettyPhoto'], a.prettyPhoto, a[rel^='prettyPhoto']").prettyPhoto({
|
45 |
|
|
overlay_gallery: false
|
46 |
|
|
});
|
47 |
|
|
}
|
48 |
|
|
);
|
49 |
|
|
return false;
|
50 |
|
|
});
|
51 |
|
|
}); |