var input = 0;
var konami = true;
$(document).ready(function(){

	// "Colorbox"
	$("a[rel='colorbox']").colorbox({transition:"elastic"});
	
	// Konami
	document.onkeydown = function (e) {
		
		if(window.event)
			keynum = event.keyCode
		else
			keynum = e.which

		if(!konami)
			return false;

		var arr = new Array (38, 38, 40, 40, 37, 39, 37, 39, 66, 65)

		if (keynum == arr[input])
			input++
		else
			input = 0;

		if(input < 10)
			return

		input = 0
		konami = false;

		var embed = document.createElement('embed');
		embed.setAttribute("src", "/Scripts/konami.mp3");
		embed.setAttribute("loop", "true");
		embed.setAttribute("hidden","true");
		embed.setAttribute("autostart", "true");
		document.body.appendChild(embed);
	}
	
	$("#blog>div:last-child, #events>div:last-child, #front_guestbook>div:last-child, #guestbook>div:last-child, #blog_comment>div:last-child").each(function(){ 
		$(this).css("padding-bottom", "0px"); 
		$(this).css("margin-bottom", "0px"); 
		$(this).css("border-bottom", "none"); 
	});
	
	// Rundade hörn
	$(".box").each(function(){
		$(this).wrap('<div class="box_border"></div>');
		$(this).css("border", "none");
		$(this).corner("round 5px");
		$(this).parent().corner("round 5px");
	});
	
	$("#contact .right").each(function(){ $(this).parent().css("margin-left", "16px"); });
	
});
