/*
 * JS Base script file
 * By Stef Funaro
 * www.stefetmarie.com
 */


//LOG
window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  if(this.console){
    console.log( Array.prototype.slice.call(arguments) );
  }
};

(function($) {

	$.ajaxSetup({ cache: false });
	
	  var cache = [];
	  $.preLoadImages = function() {
	    var args_len = arguments.length;
	    for (var i = args_len; i--;) {
	      var cacheImage = document.createElement('img');
	      cacheImage.src = arguments[i];
	      cache.push(cacheImage);
	    }
	  };
	  
})(jQuery);

jQuery(document).ready(function($){
	
	//MENU
//    $("#menu li a").hover(function() {
//        $(this).animate({color:"#aa703a" }, 1000);
//    },function() {
//        $(this).animate({ color:"#e9e3d1" }, 1000);
//    });
	jQuery.preLoadImages("/images/ico_face_on.png","/images/ico_twit_on.png","/images/home/btCV_down.png","/images/home/btCV_on.png","/images/home/navigPoint_on.png","/images/lightBox/btClose_on.png","/images/realisation/flechePrec_down.png","/images/realisation/flechePrec_on.png","/images/realisation/flecheSuiv_down.png","/images/realisation/flecheSuiv_on.png");
    
	
	Shadowbox.init({
		onOpen:function() {
			stopInterval();
		},
		onFinish:function() {
		},
		onClose:function(){ 
			startInterval();
		}
	});
	
});
