 /* Jquery */
/*Banner */
  $(document).ready(function(){ 
$(".PostThumbnail").fadeIn(2000); 
$(".Quote").slideDown(1000); 

});

/* Nav */
 $(document).ready(function(){ 
 $(".MainNav a.BtNav" ).mouseenter(function(){ 
$(".SNav").slideDown("normal");
});
 $(".SNav").mouseleave(function(){ 
$(this).slideUp("normal"); 
});
  $("a.BtWebouriffant").mouseenter(function(){ 
$(".SNav").slideUp("normal"); 
});
 
 /* BT NAV */
   $(".MainNav a.BtNav, .MainNav a.BtWebouriffant" ).mouseenter(function(){
$(this).addClass("on");
$(this).siblings().removeClass("on");
$(".CatNav").hide();

}); /* etat on */
 
/* portfolio */   
  $(".MainNav a.BtPortfolio" ).mouseenter(function(){
$(".NavPortfolio").fadeIn("slow");
});
/* web */   
  $(".MainNav a.BtWeb" ).mouseenter(function(){
$(".NavWeb").fadeIn("slow");
});
/* design */   
  $(".MainNav a.BtDesign" ).mouseenter(function(){
$(".NavDesign").fadeIn("slow");
});
  /* wow */   
  $(".MainNav a.BtWow" ).mouseenter(function(){
$(".NavWow").fadeIn("slow");
});
    /* hobbies */   
  $(".MainNav a.BtHobbies" ).mouseenter(function(){
$(".NavHobbies").fadeIn("slow");
});
    /* fun */   
  $(".MainNav a.BtFun" ).mouseenter(function(){
$(".NavFun").fadeIn("slow");
});
      /* Webouriffant */   
  $(".MainNav a.BtWebouriffant" ).mouseenter(function(){
$(".NavWebouriffant").fadeIn("slow");
});
  
});
 
/* Thumbs */
  $(document).ready(function(){ 
$(".ThumbTitle").css('display', 'none');
 $(".related-posts a", this ).mouseenter(function(){ 
$(this).find('.ThumbTitle').slideDown("normal");
});
 $(".related-posts a", this ).mouseleave(function(){ 
$(this).find('.ThumbTitle').slideUp("normal"); 
});

});
 
	
  /* Images Contenus */
  $(document).ready(function(){ 
$(".storycontent img").addClass("png");
});


/* Nav Categories */  
  $(document).ready(function(){
  $(".CatNav ul li a").mouseenter(function(){
$(this).animate({fontSize: '13px'}, "fast"); 
 });
   $(".CatNav ul li a").mouseleave(function(){
$(this).animate({fontSize: '11px'}, "fast"); 
 });
  });
  
//stick the footer at the bottom of the page if we're on an iPad/iPhone due to viewport/page bugs in mobile webkit
if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod')
 {
$(".footer-fix").css("display", "none");      };

  
// ColorBox

$(document).ready(function(){
				$("a[rel='colorbox']").colorbox(); // contenus lien colorbox normaux
				$(".Headline a[rel='normal']").addClass("colorboxheadline");	
				$(".colorboxheadline").colorbox(); // head normal
				 $(".Headline a[rel='iframe']").addClass("colorboxheadlineiframe");
				$(".colorboxheadlineiframe").colorbox({width:"90%", height:"90%", iframe:true}); // head iframe
				$(".Headline a[rel='video']").addClass("colorboxheadlinevideo");
				$(".colorboxheadlinevideo").colorbox({iframe:true, innerWidth:600, innerHeight:486}); // head video

				
				$(".post p a").colorbox({title:false, scrolling:true, previous:"précédent", next:"next", close:"fermer"}); // colorbox

				$("a[rel='diapo']").colorbox({slideshow:true}); //slideshow
				$(".post p a[target='_blank']").addClass("coloboxiframe");	
				$("a.coloboxiframe").colorbox({width:"90%", height:"90%", iframe:true}); // iframe lien html externe
				});

// Easter Egg
var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65";
$(document).keydown(function(e) {
  kkeys.push( e.keyCode );
  if ( kkeys.toString().indexOf( konami ) >= 0 ){
    $(document).unbind('keydown',arguments.callee);
    $.getScript('http://www.cornify.com/js/cornify.js',function(){
      cornify_add();
      $(document).keydown(cornify_add);
    });          
  }
});
