1jQuery(document).ready(function($) 2{ 3 var _window = $(window), 4 menuItem = $('#topnav > li'), 5 filterItem = $('.filter-wrapper .nav-pills li'), 6 paginationItem = $('.pagination ul li'); 7 8 9 menuItem.addCustomClass(5, 'custom-color'); 10 filterItem.addCustomClass(4, 'custom-color'); 11 paginationItem.addCustomClass(4, 'custom-color'); 12 13 menuItem.each(function(){ 14 _this = $(this); 15 _this.append('<div class="menu-item-hover-plane-1"></div>'); 16 _this.append('<div class="menu-item-hover-plane-2"></div>'); 17 }) 18 19 var portfolio = $('.portfolio-shortcode .portfolio_wrapper'), 20 portfolio_item_selector = '.portfolio-item', 21 portfolio_item = $(portfolio_item_selector, portfolio), 22 portfolio_columns_init = portfolio.data('columns'), 23 transitionDuration = '0.5', 24 filterButtons = $('.portfolio-shortcode .portfolio_filter_buttons > .filter_button'), 25 currentCategory = '*'; 26 27 if(portfolio.length > 0) { 28 portfolio.imagesLoaded( function() { 29 setTimeout(function(){ 30 setColumnsNumber(); 31 resizePortfolioItem(); 32 portfolio.isotope({ 33 itemSelector: portfolio_item_selector, 34 resizable : true, 35 layoutMode: 'masonry' 36 }).bind("resize.rainbows", function(){ 37 setColumnsNumber(); 38 resizePortfolioItem(); 39 portfolio.isotope('reLayout'); 40 }); 41 },10); 42 }); 43 44 filterButtons.on( 'click', function() { 45 var _this = $(this); 46 var category = _this.attr('data-filter'); 47 48 if(currentCategory != category){ 49 filterButtons.removeClass('current-category'); 50 _this.addClass('current-category'); 51 currentCategory = category; 52 if(category != '*') category = '.'+category; 53 portfolio.isotope({ filter: category}); 54 } 55 }); 56 57 $('.portfolio_wrapper .portfolio-item').magnificPopup({ 58 delegate: '.thumbnail > a', 59 type: 'image', 60 removalDelay: 500, 61 mainClass: 'mfp-zoom-in', 62 callbacks: { 63 beforeOpen: function() { 64 // just a hack that adds mfp-anim class to markup 65 this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim'); 66 }, 67 open: function() { 68 not_resizes = true; 69 }, 70 close: function() { 71 not_resizes = false; 72 } 73 }, 74 gallery: {enabled:true} 75 }); 76 } 77 78 function setColumnsNumber() { 79 if(_window.width() < 450){ 80 portfolio_columns = Math.ceil(portfolio_columns_init/3); 81 } else if (_window.width() < 767){ 82 portfolio_columns = Math.ceil(portfolio_columns_init/2); 83 } else { 84 portfolio_columns = portfolio_columns_init; 85 } 86 } 87 function resizePortfolioItem(){ 88 item_width = parseInt(portfolio.width() / portfolio_columns) - 30; 89 portfolio_item.each(function(){ 90 $(this).width(item_width).height(item_width); 91 }) 92 } 93 94}); 95 96 97$.fn.addCustomClass = function(number, customClass) 98{ 99 var items = $(this); 100 101 for( i=0; i<items.length; i++ ){ 102 _this = items.eq(i); 103 _this.addClass(customClass+((i % number)+1)); 104 } 105} 106 107jQuery(document).ready(function(){ 108 jQuery('.profiles figure a[rel*="prettyPhoto"]').attr('rel',''); 109 jQuery('.profiles figure a').click(function(e) { 110 e.preventDefault(); 111 }); 112});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.