(function($){ 
    $('.home-filter-portfolios .portfolio-filter').prepend($('.home-filter-portfolios').siblings('.portfolio-filter-title')).wrap('<div class="portfolio-filter-wrap"></div>').attr('data-plugin-sticky', '').attr('data-plugin-options', '{"autoInit": true, "minWidth": 991, "containerSelector": ".home-filter-portfolios .portfolio-row","autoFit":true, "paddingOffsetTop": 0, "paddingOffsetBottom": 0}');
})(jQuery);

jQuery(document).ready(function($) {
    $('.home-filter-portfolios .portfolio-filter li a').on('click', function(e) {
        var scrolloffset = $(this).closest('.home-filter-portfolios').find('.portfolio-row').offset().top - $('#header .sticky').outerHeight();
	$('html, body').animate({
		'scrollTop': scrolloffset
	}, 600);
	e.preventDefault();
    });
});