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();
});
function toggle (id) {
var post = document.getElementById(id);
if (post.className=="portletshown") { 
post.className="portlethidden"; 
} else { 
post.className="portletshown"; 
}
}
function changeLocation (targetURL) {
window.location = targetURL;
}
function setFontPlus(id){
var size = document.getElementById(id).style.fontSize;
if(size == "" || size == null) {
size = 12;
} else {
size = size.substr(0,2);
}
if(size < 15) {
if(size == 13) {
size = eval(size) + 2;
} else {
size = eval(size) + 1;
}
var fontSize = size + "px";
document.getElementById(id).style.fontSize=fontSize
changecss('#nav li a','font-size',fontSize);
    changecss('#nav li.selected a','font-size',fontSize);
changecss('.footer','font-size',fontSize);
changecss('.footer a','font-size',fontSize);
changecss('.language','font-size',fontSize);
changecss('.language a','font-size',fontSize);
changecss('.date','font-size',fontSize);
changecss('.topmenu','font-size',fontSize);
}
}// end setFontPlus
function setFontMinus(id){
var size = document.getElementById(id).style.fontSize;
if(size == "" || size == null) {
size = 10; 
} else {
size = size.substr(0,2);
} 
if(size > 10) {
if(size == 16) {
size = eval(size) - 2;
} else {
size = eval(size) - 1;
}
var fontSize = size + "px";
document.getElementById(id).style.fontSize=fontSize
changecss('#nav li a','font-size',fontSize);
changecss('#nav li.selected a','font-size',fontSize);
changecss('.footer','font-size',fontSize);
changecss('.footer a','font-size',fontSize);
changecss('.language','font-size',fontSize);
changecss('.language a','font-size',fontSize);
changecss('.date','font-size',fontSize);
changecss('.topmenu','font-size',fontSize);
}
}
function revertStyles(id){
var size = document.getElementById(id).style.fontSize;
if(size == "" || size == null) {
size = 11; 
} else {
size = size.substr(0,2);
} 
if(size > 10) {
if(size == 16) {
size = 11;
} else {
size = 11;
}
var fontSize = size + "px";
document.getElementById(id).style.fontSize=fontSize
}
changecss('.language','font-size','11px');
changecss('.language span a','font-size','11px');
changecss('.date','font-size','11px');
changecss('.date','color','white');
changecss('.topmenu','font-size','11px');
changecss('.topmenu','color','white');
changecss('.footer a','font-size','11px');
changecss('.footer','font-size','11px');
changecss('.language','color','white');
changecss('.topmenu a','color','white');
changecss('.date','color','white');
changecss('.language span a','color','white');
changecss('.language span a','font-size','11px');
changecss('.language span a','color','white');
changecss('.language','font-size','11px');
changecss('.footer a','font-size','11px');
changecss('.footer a','font-weight','bold');
changecss('.footer a','color','black');
changecss('.footer','color','black');
changecss('.footer','font-size','11px');
changecss('#nav li a','font-size','11px');
changecss('#nav li a','color','blue');
changecss('#nav li.selected a','color','blue');
changecss('body','color','black');
changecss('a','color','blue');
changecss('a:hover','color','#7EACD6');
changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color','black');
}
function revertFontStyles(id){
var size = document.getElementById(id).style.fontSize;
if(size == "" || size == null) {
size = 12; 
} else {
size = size.substr(0,2);
} 
if(size > 10) {
if(size == 16) {
size = 12;
} else {
size = 12;
}
var fontSize = size + "px";
document.getElementById(id).style.fontSize=fontSize
}
changecss('.language','font-size','11px');
changecss('.language span a','font-size','11px');
changecss('.date','font-size','11px');
changecss('.date','color','white');
changecss('.topmenu','font-size','11px');
changecss('.topmenu','color','white');
changecss('.footer a','font-size','11px');
changecss('.footer','font-size','11px');
changecss('#nav li a','font-size','11px');
changecss('#nav li a','color','blue');
changecss('#nav li.selected a','font-size','11px');
changecss('#nav li.selected a','color','blue');
}
function changecss(theClass,element,value) {
//Last Updated on May 21, 2008
//documentation for this script at
//http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html
 var cssRules;
 if (document.all) {
 cssRules = 'rules';
 }
 else if (document.getElementById) {
 cssRules = 'cssRules';
 }
 var added = false;
 for (var S = 0; S < document.styleSheets.length; S++){
 for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
 if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
 if(document.styleSheets[S][cssRules][R].style[element]){
 document.styleSheets[S][cssRules][R].style[element] = value;
 added=true;
 break;
 }
 }
 }
 if(!added){
 if(document.styleSheets[S].insertRule){
 document.styleSheets[S].insertRule(theClass+' { '+element+': '+value+'; }',document.styleSheets[S][cssRules].length);
 }
 else if (document.styleSheets[S].addRule) {
 document.styleSheets[S].addRule(theClass,element+': '+value+';');
 }
 }
 }
}
// end function changecss
function fontRed(){
changecss('#nav li.selected a','color','red');
changecss('#nav li a','color','red');
changecss('.date','color','red');
changecss('.topmenu','color','red');
changecss('.topmenu a','color','red');
changecss('.language span a','color','red');
changecss('.language','color','red');
changecss('.footer_bottom','color','red');
changecss('.footer','color','red');
changecss('.footer a','color','red');
changecss('body','color','red');
changecss('a','color','red');
changecss('a:hover','color','blue');
changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color','red');
}
function fontBlue(){
changecss('#nav li.selected a','color','blue');
changecss('#nav li a','color','blue');
changecss('.date','color','blue');
changecss('.topmenu','color','blue');
changecss('.topmenu a','color','blue');
changecss('.language span a','color','blue');
changecss('.language','color','blue');
changecss('.footer','color','blue');
changecss('.footer a','color','blue');
changecss('body','color','blue');
changecss('a','color','blue');
changecss('a:hover','color','red');
changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color','blue');
}
function fontGreen(){
changecss('#nav li.selected a','color','green');
changecss('#nav li a','color','green');
changecss('.date','color','green');
changecss('.topmenu','color','green');
changecss('.topmenu a','color','green');
changecss('.language','color','green');
changecss('.language span a','color','green');
changecss('.footer','color','green');
changecss('.footer a','color','green');
changecss('body','color','green');
changecss('a','color','green');
changecss('a:hover','color','blue');
changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color','green');
}
function fontOrange(){
changecss('#nav li.selected a','color','orange');
changecss('#nav li a','color','orange');
changecss('.date','color','orange');
changecss('.topmenu','color','orange');
changecss('.topmenu a','color','orange');
changecss('.language','color','orange');
changecss('.language span a','color','orange');
changecss('.footer','color','orange');
changecss('.footer a','color','orange');
changecss('body','color','orange');
changecss('a','color','orange');
changecss('a:hover','color','blue');
changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color','orange');
}
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
}
})
//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;
});
});