// JavaScript Document
$(document).ready(function() {
	if(typeof(current_page)!="undefined"){
		if (current_page=="Publications"){
			$('#menu a').each(function(){
				if ($(this).html()=="About us"){
					$(this).parent().addClass('current_page_item');
				}
			});
			$('#sub-menu a').each(function(){
				if ($(this).html()=="Publications"){
					$(this).parent().addClass('current_page_item');
				}
			});
		}
		
		if (current_page=="Articles"){
			$('#menu a').each(function(){
				if ($(this).html()=="About us"){
					$(this).parent().addClass('current_page_item');
				}
			});
			$('#sub-menu a').each(function(){
				if ($(this).html()=="Articles"){
					$(this).parent().addClass('current_page_item');
				}
			});
		}
	}
	
	//console.log($('#content .post:first-child .title').find('a').length);
	if($('#content .post:first-child .title').length>0){
		if($('#content .post:first-child .title').find('a').length>0){
			if($('#content .post:first-child .title a').html().length>45){
				$('#content .post:first-child .entry').css('paddingTop', '25px');
			}
		}else{
			if($('#content .post:first-child .title').html().length>45){
				$('#content .post:first-child .entry').css('paddingTop', '25px');
			}
		}
	}
});
