var TalentumBlogg = function() {
	return {	
		init: function() {
			TalentumBlogg.archive.init();
			TalentumBlogg.newWindow.init();
		}
	};
}();

TalentumBlogg.archive = function() {
	return {
		init: function() {
			Talentum.eventHandler.register("click", ".archive a", function(e) {
				var sibling = this.nextSibling.nodeType != 3 ? $(this.nextSibling) : $(this.nextSibling.nextSibling);
				if (sibling) {
					if ($(sibling.parentNode).hasClass("active")) {
						$(sibling.parentNode).removeClass("active");
					} else {
						$(sibling.parentNode).addClass("active");
					}
				}
			});
		}
	};
}();

TalentumBlogg.newWindow = function() {
	return {
		init: function(){
			Talentum.eventHandler.register("click", "a.open-in-new", function(){
				window.open(this.href, "_blank");
			});
		}
	};
}();

// Override functions we don't want to run.
Talentum.comment = function() {
	return {
		init: function() {}
	};
}();

Talentum.addAnchors = function() {
	return {
		init: function() {}
	}
}();


TalentumBlogg.init();
