$(document).ready(function(){
						   
$('#nav ul li:last-child').css({'border':'0'});
	/*
	// Navigation Slidedown effect
	$('#nav ul li').each(function(){
		var _active = null;
		$(this).hover(function(){
			$(this).find('ul').stop(true,true).slideDown('fast');
			//Set this as active
			_active = $(this);
		}, function(){
			$(_active).find('ul').stop(true,true).delay(300).slideUp();
		});
		
	});*/
	
	// Navigation Slidedown effect
	$('#nav ul li a').each(function(){
		var _active = null;
		var _parent = $(this).parent();
		var liparent = _parent.hasClass('hasChildren');
		
		$(this).click(function(){
			if(_parent.hasClass('rmFirst')){
				return true;
			}
			else if(liparent){
				_parent.find('ul').slideToggle();
				//Set this as active
				_active = $(this);
			
			return false;
			}
		});
	});
	
	// Navigation parent highlight
	$('#nav ul li ul').each(function(){
		
		$(this).hover(function(){
		$(this).parent().parent().find('a:first').addClass('parentSelected');
		},function(){
		$(this).parent().parent().find('a:first').removeClass('parentSelected');
		});
	
	});
	
	// Blog
	$('body#detail #content .blog h2:first').addClass('blog-detail-title');
	
	// Slideshow
	var imgAlt = $('body .imgAltCaption').prev().width();
	$('body .imgAltCaption').css({'width': imgAlt - 23 + "px"});
	
	if($('#SiteMap').length){
		$('<h1 class="page-title">Sitemap</h1>').insertBefore('#SiteMap');	
	}
	if($('#fluencyAdminHeader').length != 0){
	$('body').attr('style','background-position: 0 80px;');	
	}
	
	// Login
	
	$('div#login tbody tr tbody tr:first').hide();
});
