window.log = function(){
        log.history = log.history || [];  
        log.history.push(arguments);
        arguments.callee = arguments.callee.caller;  
        if(this.console) console.log( Array.prototype.slice.call(arguments) );
};
(function(b){
        function c(){}
        for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c
})(window.console=window.console||{});
$('li', '#topnav').each(function(){
              var menuVal = $('a', this).text();
              if(menuVal == $('body').attr("page"))
                     $(this).addClass("active");
       });
//elastic navigation plugin
(function($) {

        $.fn.simplexoNav = function(options) {
	
                options = $.extend({
                        overlap : 20,
                        speed : 500,
                        reset : 1500,
                        /*color : '#0b2b61',*/
                        easing : 'easeOutExpo'
                }, options);
	
                return this.each(function() {
		
                        var nav = $(this),
                        currentPageItem = $('.active', nav),
                        blob,
                        reset;
		 		
                        $('<li id="blob"></li>').css({
                                width : currentPageItem.outerWidth(),
                                height : currentPageItem.outerHeight() + options.overlap,
                                left : currentPageItem.position().left,
                                top : currentPageItem.position().top - options.overlap / 2
                                //backgroundColor : options.color
                        }).appendTo(this);
		 	
                        blob = $('#blob', nav);
		 	
                        $('li:not(#blob)', nav).hover(function() {
                                // mouse over
                                clearTimeout(reset);
                                blob.animate(
                                {
                                        left : $(this).position().left,
                                        width : $(this).width()
                                },
                                {
                                        duration : options.speed,
                                        easing : options.easing,
                                        queue : false
                                }
                                );
                        }, function() {
                                // mouse out	
                                reset = setTimeout(function() {
                                        blob.animate({
                                                width : currentPageItem.outerWidth(),
                                                left : currentPageItem.position().left
                                        }, options.speed)
                                }, options.reset);
	
                        });
		
                }); // end each
	
        };

})(jQuery);
