Drupal.behaviors.template = function(){ 

$('.login-toggle').click(function(event) {
	event.preventDefault();
	$('#block-block-56 .block-content').toggleClass('expand');
  $('#block-block-56 #user-login').toggle('slow');
});
	
	/**
	  * Set sitename 
	  */
	var sitename = {
		/**
		  * Initialise functions within the  sitename
		  */
		init : function() {
			sitename.searchReplace();
			sitename.clientLogoFade();
			sitename.function3.fInit();
			sitename.function4();
		},
		
		/**
		  *  Puts title text in the field on the search box
		  */	
		searchReplace : function() {

			var searchBox = $("#edit-search-block-form-1");
			var searchBoxDefault = "Enter keywords";
			searchBox.attr("value", searchBoxDefault);
				
			searchBox.focus(function(){  
			  if(jQuery.trim($(this).attr("value")) == searchBoxDefault) $(this).attr("value", "");  
			});  
			
			searchBox.blur(function(){  
			  if(jQuery.trim($(this).attr("value")) == "") $(this).attr("value", searchBoxDefault);  
			})
		},
		
		/**
		  *  function 2 
		  */
		clientLogoFade : function() {
			//controls the fade in of colour logo on hover for client logos
			
			$('.client-field-logo').hover(function(){
			  $(this).find('.fade-in').stop().fadeIn();
			}, function(){
			  $(this).find('.fade-in').hide();
			});
	 	},
		
		/**
		  *  function 3
		  */
		function3 : {
			fInit : function() {
				//initialise function 3
				sitename.function3.helperfunction1();
				sitename.function3.helperfunction2();
			},
			
			helperfunction1 : function() {
				//code here
			},
			
			helperfunction2 : function() {
				//code here
			}
	 	},
		
		/**
		  *  function 4 
		  */
		function4 : function() {
			//code here
	 	}
	} //end of sitename
	
	/**
	  *  Initialise sitename
	  */
	sitename.init();

}
