<commit_before>var easyPeasyParallax = function () {
	var scrollPos = $(this).scrollTop();

	$('#header .info').css({		
		'-webkit-transform': 'translate3d(0px, ' + (scrollPos) + 'px, 0px)',
		'-ms-transform': 'translate3d(0px, ' + (scrollPos) + 'px, 0px)',
		'transform': 'translate3d(0px, ' + (scrollPos) + 'px, 0px)',
		'opacity': 1-(scrollPos/250)
	});
}

var removeTransform = function ($this) {
	$this.css({		
		'-webkit-transform': 'translate3d(0px, 0px, 0px)',
		'-ms-transform': 'translate3d(0px, 0px, 0px)',
		'transform': 'translate3d(0px, 0px, 0px)'
	});
}

var resizeHeight = function (slide) {
	var slider = $(".carousel .holder");
		height = slider.find(".slide").eq(slide).height();

	slider.css("height", height + "px")
}

var easyPeasyNav = function () {
	var scrollPos = $(this).scrollTop();
	var header = $('#header');
	var offCanvas = $('#off-canvas');

	if(scrollPos >= header.height() + 1) {
		offCanvas.addClass('visible');
	} else {
		offCanvas.removeClass('visible');
	}
}

var centerModal = function () {
	var modal = $('#modal .holder');

	modal.css({
		'margin-top': -(modal.height()/2) +'px'
	});
}

var centerArrow = function (elem) {
	var containerWidth = $('#about .container').width();

	$('#member-nav a').removeClass('active');
	elem.addClass('active');

	$('#member-list ul').removeClass('active');
	$('#member-list ul').eq(parseInt(elem.parent().index()) - 1).addClass('active');

	var itemWidth = elem.width() / 2;
	var thisPos = elem.position();
}

$(document).ready(function() {
	// center modal window 
	$(window).resize(function() {
		centerModal();
	});


	// do parallax for top title
	$(window).scroll(function() {
		if($(window).width() >= 690) easyPeasyParallax();
		easyPeasyNav();
	});


	// outter slider
	var curSlide = 0;
	resizeHeight(curSlide);
	removeTransform($(".carousel .holder")); //removes transform3d from holder, because it somehow breaks the slider
	var mainCarousel = $('.carousel').jcarousel({
    	'item': '.slide'
    }).on('jcarousel:create', function(event, carousel) {
        var length = $(this).find(".slide").length;

        curSlide = length - 1;
        $(this).jcarousel('scroll', length - 1);
        resizeHeight(curSlide);
    })


	// inner slider
	$('#events .slide .container').each(function(){
		var isAmazon = $(this).find(".speakers").hasClass("amazon");

		var curSlide = $(this).jcarousel({
			list: ".speakers",
			items: "li"
		});

		// if(isAmazon) {
		// 	curSlide.jcarouselAutoscroll({
	 	//            interval: 5000,
	 	//            target: '+=1',
	 	//            autostart: true
	 	//        })
		// }

		$(this).find(".pagination ul").on('jcarouselpagination:active', 'li', function() {
            $(this).addClass('active');
        }).on('jcarouselpagination:inactive', 'li', function() {
            $(this).removeClass('active');
        })
        .jcarouselPagination({
        	'carousel' : curSlide,
		    'item': function(page, carouselItems) {
		        return '<li><a href="#' + page + '">' + page + '</a></li>';
		    }
		});
	});     
	$('.prev, .next').click(function(e) {
		e.preventDefault();

		if($(this).hasClass("inactive")) return;

		if($(this).hasClass("prev")) curSlide--;
		else curSlide++;

		resizeHeight(curSlide);
	});

	$('.prev').on('jcarouselcontrol:active', function() {
            $(this).removeClass('inactive');
        })
        .on('jcarouselcontrol:inactive', function() {
            $(this).addClass('inactive');
        })
        .jcarouselControl({
            target: '-=1',
            carousel: mainCarousel
        });

	$('.next').on('jcarouselcontrol:active', function() {
            $(this).removeClass('inactive');<commit_msg>added 2 dots<commit_after>var easyPeasyParallax = function () {
	var scrollPos = $(this).scrollTop();

	$('#header .info').css({		
		'-webkit-transform': 'translate3d(0px, ' + (scrollPos) + 'px, 0px)',
		'-ms-transform': 'translate3d(0px, ' + (scrollPos) + 'px, 0px)',
		'transform': 'translate3d(0px, ' + (scrollPos) + 'px, 0px)',
		'opacity': 1-(scrollPos/250)
	});
}

var removeTransform = function ($this) {
	$this.css({		
		'-webkit-transform': 'translate3d(0px, 0px, 0px)',
		'-ms-transform': 'translate3d(0px, 0px, 0px)',
		'transform': 'translate3d(0px, 0px, 0px)'
	});
}

var resizeHeight = function (slide) {
	var slider = $(".carousel .holder");
		height = slider.find(".slide").eq(slide).outerHeight();

	console.log("slide", slide);
	console.log("height", height);

	slider.css("height", height + "px")
}

var easyPeasyNav = function () {
	var scrollPos = $(this).scrollTop();
	var header = $('#header');
	var offCanvas = $('#off-canvas');

	if(scrollPos >= header.height() + 1) {
		offCanvas.addClass('visible');
	} else {
		offCanvas.removeClass('visible');
	}
}

var centerModal = function () {
	var modal = $('#modal .holder');

	modal.css({
		'margin-top': -(modal.height()/2) +'px'
	});
}

var centerArrow = function (elem) {
	var containerWidth = $('#about .container').width();

	$('#member-nav a').removeClass('active');
	elem.addClass('active');

	$('#member-list ul').removeClass('active');
	$('#member-list ul').eq(parseInt(elem.parent().index()) - 1).addClass('active');

	var itemWidth = elem.width() / 2;
	var thisPos = elem.position();
}

$(document).ready(function() {
	// center modal window 
	$(window).resize(function() {
		centerModal();
	});


	// do parallax for top title
	$(window).scroll(function() {
		if($(window).width() >= 690) easyPeasyParallax();
		easyPeasyNav();
	});


	// outter slider
	var inSlide = 0;
	resizeHeight(inSlide);
	removeTransform($(".carousel .holder")); //removes transform3d from holder, because it somehow breaks the slider
	var mainCarousel = $('.carousel').jcarousel({
    	'item': '.slide'
    }).on('jcarousel:createend', function(event, carousel) {
        var slideCount = $(this).find(".slide").length;
        slideCount--;

        inSlide = slideCount;
        $(this).jcarousel('scroll', slideCount);
        // resizeHeight(inSlide);
    })


	// inner slider
	$('#events .slide .container').each(function(){
		var isAmazon = $(this).find(".speakers").hasClass("amazon");

		var curSlide = $(this).jcarousel({
			list: ".speakers",
			items: "li"
		});

		// if(isAmazon) {
		// 	curSlide.jcarouselAutoscroll({
	 	//            interval: 5000,
	 	//            target: '+=1',
	 	//            autostart: true
	 	//        })
		// }

		$(this).find(".pagination ul").on('jcarouselpagination:createend', function() {
			console.log("inside", inSlide);
	        resizeHeight(inSlide);
	    }).on('jcarouselpagination:active', 'li', function() {
            $(this).addClass('active');
        }).on('jcarouselpagination:inactive', 'li', function() {
            $(this).removeClass('active');
        }).jcarouselPagination({
        	'carousel' : curSlide,
		    'item': function(page, carouselItems) {
		        return '<li><a href="#' + page + '">' + page + '</a></li>';
		    }
		});
	});     
	$('.prev, .next').click(function(e) {
		e.preventDefault();

		if($(this).hasClass("inactive")) return;

		if($(this).hasClass("prev")) inSlide--;
		else inSlide++;

		resizeHeight(inSlide);
	});

	$('.prev').on('jcarouselcontrol:active', function() {
            $(this).removeClass('inactive');
        })
        .on('jcarouselcontrol:inactive', function() {
            $(this).addClass('inactive');
        })
        .jcarouselControl({
            target: '-=1',
            carousel: mainCarousel
        });

	$('.next').on('jcarouselcontrol:active', function() {
            $(this).removeClass('inactive');
{'fraction_non_alphanumeric': 0.21380493599049755, 'fraction_numerical': 0.010954203510624257, 'mean_word_length': 3.266891891891892, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1109542', 'n_tokens_mistral': 2698, 'n_tokens_neox': 2500, 'n_words': 463}