// usage: log('inside coolFunc', this, arguments);
window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  arguments.callee = arguments.callee.caller;  
  if(this.console) console.log( Array.prototype.slice.call(arguments) );
};
// make it safe to use console.log always
(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||{});

// background image cache bug for ie6. www.mister-pixel.com/#Content__state=
/*@cc_on   @if (@_win32) { document.execCommand("BackgroundImageCache",false,true) }   @end @*/


(function($){
  // place any jQuery/helper plugins in here, instead of separate, slower script files.
  
})(window.jQuery);;
/* Author: 

*/
(function ($) {
  Drupal.behaviors.elsweb_theme = {
    attach: function (context) {
    
    	// Don't display submenu when it only has 1 item
    	
    	var activeSubMenu = $('#content #block-menu-block-1 ul li.active-trail ul li');
    	var numberOfChildren = activeSubMenu.length;	
    	if (numberOfChildren < 2) {
    		$(activeSubMenu).parent().remove();
    	}
    	
    	// Show client name on hover
    	
    	var clientTitle = $('.views-field-title');
    	
    	$('.views-field-title').hide();
    	    	
    	$(".view-does .views-row").hover(
    	  function () {
    	    $(this).children('.views-field-title').stop(true, true).fadeIn();
    	  }, 
    	  function () {
    	    $(this).children('.views-field-title').stop(true, true).fadeOut();
    	  }
    	);
   	
    }
  };
})(jQuery);;

