
if((browser.msie && browser.version >= 8) || browser.msie==false)
{
	
jQuery(document).ready(function(){
 
 
	jQuery("#menu ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav
	jQuery("#menu ul.subnav").parent().addClass("clickable");
	//jQuery("#menu ul.subnav").parent().addClass("spain");
	
	
	
	jQuery("ul.topnav li span").click(function() { //When trigger is clicked...
		
		
		//Check if we want to close this item
		var thisClose=false;
		if(jQuery(this).parent().hasClass("blocked"))
		{
			thisClose=true;
		}
		
		//Collapse all blocked item
		jQuery("ul.topnav li.blocked").each( function() {
			jQuery(this).find("ul.subnav").slideUp('slow');
			jQuery(this).removeClass("blocked");
		})
	
		//Then expand the selected item
		if(thisClose==false)
		{
			jQuery(this).parent().find("ul.subnav").slideDown('slow').show(); //Drop down the subnav on click
			jQuery(this).parent().addClass("blocked");
		}
	});
	
	
	jQuery("ul.topnav li.clickable a").hover(function() { //When trigger is clicked...
	
		if(jQuery("ul.topnav li.blocked").size()==0)
		{						
				//Following events are applied to the subnav itself (moving subnav up and down)
				//jQuery("#menu").addClass("blocked");
				jQuery(this).parent().find("ul.subnav").slideDown('slow').show(); //Drop down the subnav on click
		 
				//Now check we we hover out the whole "ul.topnav li" item
				jQuery(this).parent().hover(function() {
				}, function(){	
				
					if(jQuery("ul.topnav li.blocked").size()==0)
					{
					//alert("test"+jQuery("ul.topnav li.blocked").size());
					//jQuery(this).find("ul.subnav").slideUp('fast',function(){ jQuery("#menu").removeClass("blocked"); }); //When the mouse hovers out of the subnav, move it back up
						jQuery(this).find("ul.subnav").slideUp('fast'); //When the mouse hovers out of the subnav, move it back up
					}
				});
			
		}
		//Following events are applied to the trigger (Hover events for the trigger)
		});
		
	jQuery("ul.topnav li.clickable").hover(
		function() { 
			jQuery(this).addClass("subhover"); //On hover over, add class "subhover"
		}, function(){	//On Hover Out
			jQuery(this).removeClass("subhover"); //On hover out, remove class "subhover"
		}
	);
	
	
	
	
		


 
});

}
else
{
	//alert('You should update your browser (Version='+browser.version.toString()+ ' Safari='+(browser.safari? 'Yes': 'No')+' Opera='+(browser.opera? 'Yes': 'No')+' IE='+(browser.msie? 'Yes': 'No')+' FF='+(browser.mozilla? 'Yes': 'No')+")");
}

/**
 jQuery(document).ready(function(){
	jQuery("#lineas object").addClass("testRed");
	jQuery("#lineas object").height("200px");
 });

**/


