jQuery(document).ready(function($){
	$.fn.konami = function(callback, code) {
		if(code == undefined) code = "38,38,40,40,37,39,37,39,66,65";
		
		return this.each(function() {
			var kkeys = [];
			$(this).keydown(function(e){
				kkeys.push( e.keyCode );
				if ( kkeys.toString().indexOf( code ) >= 0 ){
					$(this).unbind('keydown', arguments.callee);
					callback(e);
				}
			}, true);
		});
	}
	
	$.fn.quanranteDeux = function(callback, code) {
		if(code == undefined) code = "222,100,98,222";
		if(code == undefined) code = "222,52,50,222";
		
		return this.each(function() {
			var kkeys = [];
			$(this).keydown(function(e){
				kkeys.push( e.keyCode );
				if ( kkeys.toString().indexOf( code ) >= 0 ){
					$(this).unbind('keydown', arguments.callee);
					callback(e);
				}
			}, true);
		});
	}

$('div#flickr ul li').css('opacity', '0.9');
$('div#flickr ul li').hover(
function () {
$(this).fadeTo(250,1);
},
function () {
$(this).fadeTo(250, 0.8);
}
);
$('#menu ul li .current').css('opacity', '1');
$('#menu ul li a.passive').hover(
function () {
$(this).fadeTo(250,1);
},
function () {
$(this).fadeTo(250, 0.45);
}
);
$('#menu ul li a.passive').css('opacity', '0.45');	

	$(document).ready(function(){
		$(window).konami(function(){ alert('Vous venez d\'activer le code Konami');
		
		window.location="http://blog.frenchlabs.net/geek-detecte-konami-code-active/";
	});
		$(window).quanranteDeux(function(){
			 alert('Vous venez de trouver LA réponse à la vie, à l\'univers et tout le reste !')
			window.location="http://blog.frenchlabs.net/42-la-reponse-a-la-vie-a-lunivers-et-tout-le-reste/";
			});
	});	

});