
// remap jQuery to $
(function($){
	$(document).ready(function()	{	
		
		//$('#pagecontainer #content table img').wrap("<a href='#' rel='prettyPhoto'></a>");
		
		$('#slider').nivoSlider({
			animSpeed: 1000,
			pauseTime: 15000,
			directionNav: false,
			directionNavHide: false,
			controlNavThumbs: true,
			controlNavThumbsFromRel: true,
			captionOpacity: 1.0
		});		

		$('#header ul#headermenu li:nth-child(1)').after('<li>|</li>');
		$('#header ul#headermenu li:nth-child(3)').after('<li>|</li>');
		$('#header ul#headermenu li:nth-child(3)').addClass("margin");
		$("#header ul#headermenu>:last-child").addClass("margin");
		$("#navigation ul#mainmenu>:last-child").addClass("nomargin");
		
		$("a[rel^='prettyPhoto']").prettyPhoto();

	});
})(this.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(doc){
  var write = doc.write;
  doc.write = function(q){ 
    log('document.write(): ',arguments); 
    if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments);  
  };
})(document);



