function mainmenu(){
jQuery(" #nav li").hover(function(){
jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).fadeIn(300);
},function(){
jQuery(this).find('ul:first').fadeOut(300);
});
}
 
jQuery(document).ready(function(){					
mainmenu();
});
jQuery(document).ready(function(){
jQuery(".lightbox").lightbox();
});
jQuery(document).ready(function() {
jQuery('.eco-dev').append('<span class="hover"></span>').each(function () {
  var $span = jQuery('> span.hover', this).css('opacity', 0);
  jQuery(this).hover(function () {
    $span.stop().fadeTo(500, 1);
  }, function () {
    $span.stop().fadeTo(500, 0);
  });
});
});
jQuery(document).ready(function() {
jQuery('.eco-data').append('<span class="hover"></span>').each(function () {
  var $span = jQuery('> span.hover', this).css('opacity', 0);
  jQuery(this).hover(function () {
    $span.stop().fadeTo(500, 1);
  }, function () {
    $span.stop().fadeTo(500, 0);
  });
});
});
jQuery(document).ready(function() {
jQuery('.eco-research').append('<span class="hover"></span>').each(function () {
  var $span = jQuery('> span.hover', this).css('opacity', 0);
  jQuery(this).hover(function () {
    $span.stop().fadeTo(500, 1);
  }, function () {
    $span.stop().fadeTo(500, 0);
  });
});
});
jQuery(document).ready(function() {
jQuery('.publications').append('<span class="hover"></span>').each(function () {
  var $span = jQuery('> span.hover', this).css('opacity', 0);
  jQuery(this).hover(function () {
    $span.stop().fadeTo(500, 1);
  }, function () {
    $span.stop().fadeTo(500, 0);
  });
});
});
jQuery(document).ready(
/*
This function gets loaded when all the HTML, not including the portlets, is
loaded.
*/
function() {
}
);
Liferay.Portlet.ready(
/*
This function gets loaded after each and every portlet on the page.
portletId: the current portlet's id
jQueryObj: the jQuery wrapped object of the current portlet
*/
function(portletId, jQueryObj) {
}
);
jQuery(document).last(
/*
This function gets loaded when everything, including the portlets, is on
the page.
*/
function() {
}
);
var min=8;
var max=14;
var font = document.getElementsByTagName('font');
var span = document.getElementsByTagName('span');	   
var link = document.getElementsByTagName('a');	   
var table = document.getElementsByTagName('table');	   
var div = document.getElementsByTagName('div');
var defaultFont = Array(0);
var defaultSpan = Array(0);	   
var defaultTable = Array(0);	
function initFontColor() {
if(defaultFont.length == 0 && defaultSpan.length == 0 && defaultTable.length == 0){
   for(i=0;i<font.length;i++) {		  
      defaultFont[i] = font[i].style.color;
   }
   
   for(i=0;i<span.length;i++) {			
      defaultSpan[i] = span[i].style.color;
   }	  	
   for(i=0;i<table.length;i++) {
      defaultTable[i] = table[i].style.color;
   }
}
}
function redFont() {
   initFontColor();
   for(i=0;i<font.length;i++) {		  
      font[i].style.color = "#FF0000"
   }
   
   for(i=0;i<span.length;i++) {	
      span[i].style.color = "#FF0000"
   }	  	
   for(i=0;i<table.length;i++) {
      table[i].style.color = "#FF0000"
   }
}
function blueFont() {
   initFontColor();	   
   for(i=0;i<font.length;i++) {		  
      font[i].style.color = "#0000FF"
   }
   
   for(i=0;i<span.length;i++) {	
      span[i].style.color = "#0000FF"
   }	  	
   for(i=0;i<table.length;i++) {
      table[i].style.color = "#0000FF"
   }
}
function greenFont() {
   initFontColor();	   
   for(i=0;i<font.length;i++) {		  
      font[i].style.color = "#00FF00"
   }
   
   for(i=0;i<span.length;i++) {	
      span[i].style.color = "#00FF00"
   }	  	
   for(i=0;i<table.length;i++) {
      table[i].style.color = "#00FF00"
   }
}
function resetFontSize() {
   
   for(i=0;i<font.length;i++) {		  
      font[i].style.fontSize = "";
      font[i].style.color = defaultFont[i];
   }
   
   for(i=0;i<span.length;i++) {	
      span[i].style.fontSize = "";
      span[i].style.color = defaultSpan[i];
   }	   
   	
   for(i=0;i<link.length;i++) {	
      link[i].style.fontSize = "";
   }	
   for(i=0;i<table.length;i++) {
      table[i].style.fontSize = "";
      table[i].style.color = defaultTable[i];
   }
}
function increaseFontSize() {
   
   for(i=0;i<font.length;i++) {		  
      if(font[i].style.fontSize) {
 var s = parseInt(font[i].style.fontSize.replace("px",""));
      } else {
 var s = 12;
      }
      if(s!=max) {
 s += 1;
      }
      font[i].style.fontSize = s+"px"
   }
   
   for(i=0;i<span.length;i++) {		  
      if(span[i].style.fontSize) {
 var s = parseInt(span[i].style.fontSize.replace("px",""));
      } else {
 var s = 12;
      }
      if(s!=max) {
 s += 1;
      }
      span[i].style.fontSize = s+"px"
   }	   
   	
   for(i=0;i<link.length;i++) {		  
      if(link[i].style.fontSize) {
 var s = parseInt(link[i].style.fontSize.replace("px",""));
      } else {
 var s = 12;
      }
      if(s!=max) {
 s += 1;
      }
      link[i].style.fontSize = s+"px"
   }	
   for(i=0;i<table.length;i++) {		  
      if(table[i].style.fontSize) {
 var s = parseInt(table[i].style.fontSize.replace("px",""));
      } else {
 var s = 12;
      }
      if(s!=max) {
 s += 1;
      }
      table[i].style.fontSize = s+"px"
   }
}
function decreaseFontSize() {
   
   for(i=0;i<font.length;i++) {
      if(font[i].style.fontSize) {
 var s = parseInt(font[i].style.fontSize.replace("px",""));
      } else {
 var s = 12;
      }
      if(s!=min) {
 s -= 1;
      }
      font[i].style.fontSize = s+"px"
   }  
   
   for(i=0;i<span.length;i++) {
      if(span[i].style.fontSize) {
 var s = parseInt(span[i].style.fontSize.replace("px",""));
      } else {
 var s = 12;
      }
      if(s!=min) {
 s -= 1;
      }
      span[i].style.fontSize = s+"px"
   }   	   
   
   for(i=0;i<link.length;i++) {
      if(link[i].style.fontSize) {
 var s = parseInt(link[i].style.fontSize.replace("px",""));
      } else {
 var s = 12;
      }
      if(s!=min) {
 s -= 1;
      }
      link[i].style.fontSize = s+"px"
   }	   
   
   for(i=0;i<table.length;i++) {
      if(table[i].style.fontSize) {
 var s = parseInt(table[i].style.fontSize.replace("px",""));
      } else {
 var s = 12;
      }
      if(s!=min) {
 s -= 1;
      }
      table[i].style.fontSize = s+"px"
   }  	   	  
}
/*-------accordion---------*/
ddaccordion.init({
headerclass: "silverheader", //Shared CSS class name of headers group
contentclass: "submenu", //Shared CSS class name of contents group
revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc] [] denotes no content
onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
animatedefault: false, //Should contents open by default be animated into view?
persiststate: true, //persist state of opened contents within browser session?
toggleclass: ["", "selected"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
//do nothing
},
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
//do nothing
}
});
/*------------end------------*/
//tab_usercentric
jQuery(document).ready(function() {
//When page loads...
jQuery(".tabs_content").hide(); //Hide all content
jQuery("ul.tabss li:first").addClass("active").show(); //Activate first tab
jQuery(".tabs_content:first").show(); //Show first tab content
//On Click Event
jQuery("ul.tabss li").click(function() {
jQuery("ul.tabss li").removeClass("active"); //Remove any "active" class
jQuery(this).addClass("active"); //Add "active" class to selected tab
jQuery(".tabs_content").hide(); //Hide all tab content
var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
jQuery(activeTab).fadeIn(); //Fade in the active ID content
return false;
});
});
jQuery(document).ready(function() {
//When page loads...
jQuery(".tabscentric_content").hide(); //Hide all content
jQuery("ul.tabsscentric li:first").addClass("active").show(); //Activate first tab
jQuery(".tabscentric_content:first").show(); //Show first tab content
//On Click Event
jQuery("ul.tabsscentric li").click(function() {
jQuery("ul.tabsscentric li").removeClass("active"); //Remove any "active" class
jQuery(this).addClass("active"); //Add "active" class to selected tab
jQuery(".tabscentric_content").hide(); //Hide all tab content
var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
jQuery(activeTab).fadeIn(); //Fade in the active ID content
return false;
});
});
jQuery(document).ready(function() {
//When page loads...
jQuery(".tabsed_content").hide(); //Hide all content
jQuery("ul.tabssed li:first").addClass("active").show(); //Activate first tab
jQuery(".tabsed_content:first").show(); //Show first tab content
//On Click Event
jQuery("ul.tabssed li").click(function() {
jQuery("ul.tabssed li").removeClass("active"); //Remove any "active" class
jQuery(this).addClass("active"); //Add "active" class to selected tab
jQuery(".tabsed_content").hide(); //Hide all tab content
var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
jQuery(activeTab).fadeIn(); //Fade in the active ID content
return false;
});
});
/*-----vozme script-----*/
function create_form(d,txt,lang,gn,tgt){
fx_2g=d.createElement('form');
d.body.appendChild(fx_2g);
fx_2g.target=tgt;
fx_2g.method='POST';
fx_2g.action='http://vozme.com/text2voice.php';
//text
t=d.createElement('input');
t.name='text';
t.type='hidden';
t.value=txt;
fx_2g.appendChild(t);
//lang
l=d.createElement('input');
l.name='lang';
l.type='hidden';
l.value=lang;
fx_2g.appendChild(l);
//gn
g=d.createElement('input');
g.name='gn';
g.type='hidden';
g.value=gn;
fx_2g.appendChild(g);
//interface
i=d.createElement('input');
i.name='interface';
i.type='hidden';
i.value='full';
fx_2g.appendChild(i);
//submit
window.open('', tgt, 'width=300,height=220,scrollbars=yes,location=yes,menubar=yes,resizable=yes,status=yes,toolbar=yes'); 
fx_2g.submit();
delete fx_2g;
return false;
}
function get_selection(){
var lang = arguments[0] || '';
var gn = arguments[1] || '';
var tgt='voice_'+parseInt(Math.random()*100000);
var d=window.document;
if(window.getSelection){
 txt=window.getSelection();
} else if(d.getSelection){
 txt=d.getSelection();
} else if(d.selection){
 txt=d.selection.createRange().text;
} else{
 txt='';
}
create_form(d,txt,lang,gn,tgt);
return false;
}
function get_id(id){
var lang = arguments[1] || '';
var gn = arguments[2] || '';
var tgt= arguments[3] || 'voice_'+parseInt(Math.random()*100000);
var d=window.document;
var txt='';
txt=d.getElementById(id).innerHTML;
create_form(d,txt,lang,gn,tgt);
return false;
}
function get_blogger(id){
var lang = arguments[1] || '';
var gn = arguments[2] || '';
var tgt='voice_'+parseInt(Math.random()*100000);
var d=window.document;
var txt='';
pN=d.getElementsByName(id)[0].parentNode;
for(n=0;n<pN.childNodes.length;n++){
    if(pN.childNodes[n].className == 'post-title entry-title' || pN.childNodes[n].className == 'post-title' || pN.childNodes[n].className == 'post-body entry-content' || pN.childNodes[n].className == 'post-body'){
        txt=txt + ' ' + pN.childNodes[n].innerHTML;
    }
}
create_form(d,txt,lang,gn,tgt);
return false;
}
/*---------end script----------*/