/**
 * Main javascript file for ERF CMS 5.3
 * @author n.vugteveen@multimove.nl
 * @version 1.0 (14-01-2011)
 * @copyright ERF 2011
 */
$(document).ready(
				   function(){
					    /* Superfish menu, replacement for Transmenu */
						$("nav[role=navigation] ul").supersubs({ 
							minWidth:    7,   // minimum width of sub-menus in em units 
							maxWidth:    30,   // maximum width of sub-menus in em units 
							extraWidth:  2
							// extra width can ensure lines don't sometimes turn over 
						})
						.superfish({delay: 0});
			
						//make the logo clickable
						$('h1#logo').click(
										   function()
										   {
												document.location = BASE_URL;
										   }
										   );
						
						
						/*Enable rel="external" as a replacement for target="_blank" attributes*/
 					 	$("a[rel*='external']").attr('target','_blank');  
						
						//determine column rule heights
						var max_height = Math.max($('#tertiary').height(),$('#secondary').height(),($('#contact').height() + $('#news').height()));
						$('.column_rule').css('height',max_height-(56+37));
						
						//is there a need to expand the contactblock?
						if($('article#no-news').size() > 0){
							$('#contact').attr('id','contact_expanded');
							$('#maps_image').hide();
							
							$('#contact_expanded').append('<img src="'+BASE_URL+'nl/images/5" id="maps_image"/>');
						}
						
						//enable search
						$('form[role=search]').submit(
								   function()
								   {
									   document.location = BASE_URL+'nl/search/search/search_string,'+$('input[name=searchquery]').val();
									   return false;
								   }
								   );
				   }
				   );






















