


window.addEvent('domready', function(){
	
	
    
	
	if ($(document.body).getElement('.newsticker'))
		var myTicker = new mooTicker($(document.body).getElement('.newsticker'),{groupBy:1, interval:5000});
	
	
	//store titles and text
	 $$('a.tipz').each(function(element,index) {
	 var content = element.get('title').split('::');
	 element.store('tip:title', content[0]);
	 element.store('tip:text', content[1]);
	 });

	 //create the tooltips
	 var tipz = new Tips('.tipz',{
	 className: 'tipz',
	 fixed: true,
	 maxTitleChars: 50,
	 hideDelay: 50,
	 showDelay: 50
	 }); 

	tipz.addEvents({
	'show': function(tip) {
		tip.fade('in');
	},
	'hide': function(tip) {
		tip.fade('out');
	}
});
});

var min=12;
var max=20;
function increaseFontSize() {
 
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
 
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
 
         var s = 12;
      }
      if(s<=max) {
 
         s += 1;
      }
      p[i].style.fontSize = s+"px"
 
   }
   
   var div = document.getElementsByTagName('div');
   for(i=0;i<div.length;i++) {
 
      if([i].style.fontSize) {
         var s = parseInt([i].style.fontSize.replace("px",""));
      } else {
 
         var s = 12;
      }
      if(s<=max) {
 
         s += 1;
      }
      [i].style.fontSize = s+"px"
 
   }
}

function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
 
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
 
         var s = 12;
      }
      if(s>=min) {
 
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
 
   }
   
   var div = document.getElementsByTagName('div');
   for(i=0;i<div.length;i++) {
 
      if(div[i].style.fontSize) {
         var s = parseInt(div[i].style.fontSize.replace("px",""));
      } else {
 
         var s = 12;
      }
      if(s>=min) {
 
         s -= 1;
      }
      div[i].style.fontSize = s+"px"
 
   }
}

