|
115
|
1 |
$(function(){ |
|
133
|
2 |
//filters |
|
|
3 |
$('.filters a').each(function(){ |
|
|
4 |
var text = $.trim($(this).text()); |
|
|
5 |
if(text.length > 30){ |
|
|
6 |
$(this).text(text.substr(0, 30) + '...') |
|
|
7 |
} |
|
|
8 |
}); |
|
119
|
9 |
//masonry |
|
132
|
10 |
var masonry465 = $('.masonry-465'); |
|
|
11 |
masonry465.masonry({ |
|
118
|
12 |
columnWidth: 465, |
|
132
|
13 |
itemSelector: '.item-masonry', |
|
118
|
14 |
gutter : 20 |
|
|
15 |
}); |
|
132
|
16 |
|
|
|
17 |
var masonry225 = $('.masonry-225'); |
|
|
18 |
masonry225.masonry({ |
|
|
19 |
columnWidth: 225, |
|
|
20 |
itemSelector: '.item-masonry', |
|
|
21 |
gutter : 16 |
|
|
22 |
}); |
|
119
|
23 |
//popin |
|
131
|
24 |
$('.open-popin').bind('click', function(e){ |
|
118
|
25 |
e.preventDefault(); |
|
119
|
26 |
var target = $(this).attr('href'); |
|
|
27 |
$('.popin-wrap').fadeIn(function(){ |
|
|
28 |
$(target).show(); |
|
|
29 |
}); |
|
|
30 |
}); |
|
|
31 |
|
|
|
32 |
$('.close-popin, .popin-wrap').bind('click', function(e){ |
|
|
33 |
e.preventDefault(); |
|
|
34 |
e.stopPropagation(); |
|
|
35 |
$('.popin-wrap').fadeOut(function(){ |
|
|
36 |
$('.popin').hide(); |
|
|
37 |
}); |
|
|
38 |
}); |
|
|
39 |
|
|
|
40 |
$('.popin').bind('click', function(e){ |
|
|
41 |
e.stopPropagation(); |
|
118
|
42 |
}); |
|
128
|
43 |
//tag it |
|
132
|
44 |
if($('.tag-it').length){ |
|
|
45 |
var keywordsTagIt = $('.tag-it').tagit({ |
|
|
46 |
allowSpaces : true |
|
|
47 |
}); |
|
|
48 |
$('.list-key-add a').bind('click', function(e){ |
|
|
49 |
e.preventDefault(); |
|
|
50 |
var tag = $(this).attr('data-tag'); |
|
|
51 |
keywordsTagIt.tagit("createTag", tag); |
|
|
52 |
}); |
|
|
53 |
} |
|
133
|
54 |
|
|
128
|
55 |
|
|
115
|
56 |
});//ready |