(function($,window,document,undefined){'use strict';function changeParallaxTitle(){var wintop=$(window).scrollTop();if($('.parallax-showcase-wrapper').length){$('.parallax-showcase-item').each(function(){var $this=$(this);var offset=($(window).width()>768)?250:150;if(wintop>$(this).offset().top-offset){var currentTitle=$this.data('title');var element=$('.parallax-showcase-wrapper').find('.title');element.text(currentTitle)}})}} $(window).on('scroll',function(){changeParallaxTitle()});function timelineImageHeight(){var winH=$(window).outerHeight(),timelineWrapper=$('.portfolio-timeline'),timelineContentWrapperHeight=$('.portfolio-timeline__content').css('height','auto').height(),contentHeight;contentHeight=winH>timelineContentWrapperHeight?timelineContentWrapperHeight:winH;timelineWrapper.css('height',contentHeight)} $('.portfolio-timeline__item').on('click',function(e){e.preventDefault();var $this=$(this),index=$this.index('.portfolio-timeline__item'),this_position_top=$this.position().top,$gallery_row=$this.closest('.portfolio-timeline').find('.portfolio-timeline__gallery .portfolio-timeline__gallery-item').eq(index),item_height=$gallery_row.height(),$gallery_wrapper=$('.portfolio-timeline__gallery'),gallery_wrapper_height=$gallery_wrapper.height();console.log($gallery_row);var scroll_to=$gallery_wrapper.scrollTop()+$gallery_row.position().top;var this_offset_bottom=gallery_wrapper_height-this_position_top;if(this_offset_bottom