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

	$('#header .info').css({
		'margin-top': (scrollPos)+"px",
		'opacity': 1-(scrollPos/250)
	});
}

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

	if(scrollPos >= header.height()) {
		offCanvas.addClass("active");
	} else {
		offCanvas.removeClass("active");
	}
}

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();

	// $('#member-nav .arrow').css({
	// 	"left" : ((thisPos.left + itemWidth - 5)/containerWidth) * 100 + "%"
	// });	 
}

$(document).ready(function($) {
	// fetch one tweet
	var tweetConfig = {
		"id": '558200865941909504',
		"domId": 'twitter-feed',
		"maxTweets": 3,
		"enableLinks": true
	};
	twitterFetcher.fetch(tweetConfig);


	// digest subscription
	$('#subscription form').submit(function(e) {
		var email = $('#subscription input[name=email]').val();
  		var subscribers = new Firebase("https://radiant-fire-3288.firebaseio.com/subscribers");
		subscribers.push(email, function(error) {
		  if (error) {
			noty({
			    text: "Sorry man, but email you provided seems to be invalid",
			    type: 'error',
			    timeout: 1000,
			    modal: true
			});			
		  } else {
			noty({
			    text: "Well done! We'll keep you in the loop",
			    type: 'success',
			    timeout: 1000,
			    modal: true
			});			
		  }
		});
		e.preventDefault();
	});


	// get flickr
	var flickrURL = "http://api.flickr.com/services/feeds/photos_public.gne?ids=128548450@N05&format=json&jsoncallback=?";
	$.getJSON(flickrURL, function(data){
		var imageCollection = "";

		imageCollection += '<ul>';
		for (var item in data.items) {
			if(item == 16) break;
			if(data.items[item].media.m == "http://farm8.staticflickr.com/7381/16470574391_b1bb266ed7_m.jpg") continue;
			imageCollection += '<li><img src="' + data.items[item].media.m + '" alt=""></li>';
		}
		imageCollection += '</ul>';

		$("#flickr-feed").append(imageCollection);
	});


	// display a slider for speakers when using phone
	$('#events .slide').each(function(){
		var curSlide = $(this).jcarousel({
			list: ".speakers"
		});

		$(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>';
		    }
		});
	});


	// create sliders, navigation and pagination
	$('.carousel').on('jcarousel:createend', function() {
		var $this = $(this),
			slideCount = $('#events .slide').length;

        $(this).jcarousel('scroll', slideCount - 1, false);
    }).jcarousel({
    	'item': '.slide'
    }).on('jcarousel:targetin', '.slide', function(event, carousel) {
	    var itemHeight = $(this).outerHeight();
	    $(this).parents('.carousel').css({
	    	"height" : itemHeight
	    });
	});
     
	$('.prev').click(function() {
	    $(this).siblings('.carousel').jcarousel('scroll', '-=1');
	    return false;
	});

	$('.next').click(function() {
	    $(this).siblings('.carousel').jcarousel('scroll', '+=1');
	    return false;
	});


	// initialize map
	var myLatlng = new google.maps.LatLng(56.959081,24.114304);
	var mapOptions = {
    	center: myLatlng,
    	scrollwheel: false,
    	zoom: 14
    };

    var map = new google.maps.Map(document.getElementById('map'), mapOptions);

	var marker = new google.maps.Marker({
	    position: myLatlng,
	    map: map,
  		clickable: false,
  		icon: "../img/tooltip.png",
	    title: "Our tmp base!"
	});

	var modal = $('#modal');
	$('#reserve-seat').click(function(e) {
		e.preventDefault();
		modal.addClass("open");
	});
	modal.click(function() {
		modal.removeClass("open");
	});

	$('#join-event').click(function() {
	    var href = $(this).attr("href");
	    $(href).animatescroll();
	});

	$('#goto-map').click(function() {
	    var href = $(this).attr("href");
	    $(href).animatescroll();
	    return false;
	});

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


	// open members
	centerArrow($('#member-nav li:nth-child(2) a')); 
	$('#member-nav a').click(function(e) {<commit_msg>fixed intro button white flicker<commit_after>var easyPeasyParallax = function () {
	scrollPos = $(this).scrollTop();

	$('#header .info').css({
		'margin-top': (scrollPos)+"px",
		'opacity': 1-(scrollPos/250)
	});
}

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

	if(scrollPos >= header.height()) {
		offCanvas.addClass("active");
	} else {
		offCanvas.removeClass("active");
	}
}

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();

	// $('#member-nav .arrow').css({
	// 	"left" : ((thisPos.left + itemWidth - 5)/containerWidth) * 100 + "%"
	// });	 
}

$(document).ready(function($) {
	// fetch one tweet
	var tweetConfig = {
		"id": '558200865941909504',
		"domId": 'twitter-feed',
		"maxTweets": 3,
		"enableLinks": true
	};
	twitterFetcher.fetch(tweetConfig);


	// digest subscription
	$('#subscription form').submit(function(e) {
		var email = $('#subscription input[name=email]').val();
  		var subscribers = new Firebase("https://radiant-fire-3288.firebaseio.com/subscribers");
		subscribers.push(email, function(error) {
		  if (error) {
			noty({
			    text: "Sorry man, but email you provided seems to be invalid",
			    type: 'error',
			    timeout: 1000,
			    modal: true
			});			
		  } else {
			noty({
			    text: "Well done! We'll keep you in the loop",
			    type: 'success',
			    timeout: 1000,
			    modal: true
			});			
		  }
		});
		e.preventDefault();
	});


	// get flickr
	var flickrURL = "http://api.flickr.com/services/feeds/photos_public.gne?ids=128548450@N05&format=json&jsoncallback=?";
	$.getJSON(flickrURL, function(data){
		var imageCollection = "";

		imageCollection += '<ul>';
		for (var item in data.items) {
			if(item == 16) break;
			if(data.items[item].media.m == "http://farm8.staticflickr.com/7381/16470574391_b1bb266ed7_m.jpg") continue;
			imageCollection += '<li><img src="' + data.items[item].media.m + '" alt=""></li>';
		}
		imageCollection += '</ul>';

		$("#flickr-feed").append(imageCollection);
	});


	// display a slider for speakers when using phone
	$('#events .slide').each(function(){
		var curSlide = $(this).jcarousel({
			list: ".speakers"
		});

		$(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>';
		    }
		});
	});


	// create sliders, navigation and pagination
	$('.carousel').on('jcarousel:createend', function() {
		var $this = $(this),
			slideCount = $('#events .slide').length;

        $(this).jcarousel('scroll', slideCount - 1, false);
    }).jcarousel({
    	'item': '.slide'
    }).on('jcarousel:targetin', '.slide', function(event, carousel) {
	    var itemHeight = $(this).outerHeight();
	    $(this).parents('.carousel').css({
	    	"height" : itemHeight
	    });
	});
     
	$('.prev').click(function() {
	    $(this).siblings('.carousel').jcarousel('scroll', '-=1');
	    return false;
	});

	$('.next').click(function() {
	    $(this).siblings('.carousel').jcarousel('scroll', '+=1');
	    return false;
	});


	// initialize map
	var myLatlng = new google.maps.LatLng(56.959081,24.114304);
	var mapOptions = {
    	center: myLatlng,
    	scrollwheel: false,
    	zoom: 14
    };

    var map = new google.maps.Map(document.getElementById('map'), mapOptions);

	var marker = new google.maps.Marker({
	    position: myLatlng,
	    map: map,
  		clickable: false,
  		icon: "../img/tooltip.png",
	    title: "Our tmp base!"
	});

	var modal = $('#modal');
	$('#reserve-seat').click(function(e) {
		e.preventDefault();
		modal.addClass("open");
	});
	modal.click(function() {
		modal.removeClass("open");
	});

	$('#join-event').click(function(e) {
		e.preventDefault();

	    var href = $(this).attr("href");
	    $(href).animatescroll();
	});

	$('#goto-map').click(function(e) {
		e.preventDefault();
		
	    var href = $(this).attr("href");
	    $(href).animatescroll();
	    return false;
	});

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


	// open members
	centerArrow($('#member-nav li:nth-child(2) a')); 
	$('#member-nav a').click(function(e) {
{'fraction_non_alphanumeric': 0.21237825950361294, 'fraction_numerical': 0.02115404754424547, 'mean_word_length': 3.407014305491463, 'pattern_counts': {'":': 8, '<': 21, '<?xml version=': 0, '>': 25, 'https://': 2, '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': '3244933', 'n_tokens_mistral': 3626, 'n_tokens_neox': 3243, 'n_words': 610}