// JavaScript Document
 jQuery(document).ready(function($){
	 //Show the last 5 news items
	 	jQuery(".right-area li:nth-child(1)").addClass("first latest");
		jQuery(".right-area li:nth-child(2)").addClass("second latest");
		jQuery(".right-area li:nth-child(3)").addClass("third latest");
		jQuery(".right-area li:nth-child(4)").addClass("fourth latest");	
		jQuery(".right-area li:nth-child(5)").addClass("fifth latest");	
		//jQuery(".right-area li:lt(5)").show();
		
	//hide default photo
		jQuery(".photo-upload img:eq(1)").hide();
		
	 //When fields telephone-fax are active, show it
	 	jQuery(".company-info li span:not(:empty)").parent().show();
		jQuery(".company-info span.hide span:not(:empty)").parent().show();
	 
	 //hide br in breadcrumb div
		//jQuery(".breadcrumb a br").replaceWith('&nbsp;');
	 
	 // Menu elements
	jQuery("li.submenu:has(li)").addClass("level2").parents();
	jQuery("ul.submenu li:last-child").addClass("last");
	jQuery('#mainnav li:first').addClass('first-item');
	
	//add class to li element===============================
    jQuery("ul#mainnav li").hover(function(){
        jQuery(this).addClass("hovering");
    }, function(){
        jQuery(this).removeClass("hovering");
    });
	
	/*
	jQuery("ul#mainnav li.level2").hover(function(){
        jQuery(this).addClass("highlight");
    }, function(){
        jQuery(this).removeClass("highlight");
	});
	*/
 })

