// remap jQuery to $
(function($){


	// Plugin showIt
	$.fn.showIt = function(params) {
			params = $.extend( {duration: ''}, params);
			// Traverser tous les nœuds.
			this.each(function() {
				var $node = $(this);
						
				if(!$.browser.msie) {
					if (params.duration == 'fast') { $node.stop().animate({"opacity": "1"}, "fast"); }
					else { $node.css('opacity','1'); }
				}
				else {
					$node.show();
				}
			});
	// Permettre le chaînage par jQuery
	return this;
	}; 

	// Plugin hideIt
	$.fn.hideIt = function(params) {
			params = $.extend( {duration: ''}, params);
			// Traverser tous les nœuds.
			this.each(function() {
				var $node = $(this);
						
				if(!$.browser.msie) {
					if (params.duration == 'fast') { $node.stop().animate({"opacity": "0"}, "fast"); }
					else { $node.css('opacity','0'); }
				}
				else {
					$node.hide();
				}
			});
	// Permettre le chaînage par jQuery
	return this;
	}; 



 



})(window.jQuery);



// usage: log('inside coolFunc',this,arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
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) );
  }
};



// catch all document.write() calls
(function(){
  var docwrite = document.write;
  document.write = function(q){ 
    log('document.write(): ',q); 
    if (/docwriteregexwhitelist/.test(q)) docwrite(q);  
  }
})();


// background image cache bug for ie6. www.mister-pixel.com/#Content__state=
/*@cc_on   @if (@_win32) { document.execCommand("BackgroundImageCache",false,true) }   @end @*/


