﻿window.addEvent('domready', function() {

if ($('main-content'))
{
    var elements = $('main-content').getElements('ul#tools');

    if (elements.length > 0)
    {
        if ($('main-content').getElements('ul#tools').getElements('a'))
        {

            $('main-content').getElements('ul#tools').getElements('a').each(function(el)
            {
                if (!el.getProperty('class').contains("addthis_button") && !el.getProperty('href').contains("#bottom"))
                {
                    el.addEvent('click', function() { return false; });
                }
            });
        }
    }
}

});



function normalFont()
{
	if (window.location.href.indexOf("-folder/") > 0) //category
	{
		$('main-content').getElements("div.lst-notizie").each(function(el)
		{
			el.setStyle('font-size', '1.181em')

		});
	}
	else
	{
		$('ctl00_mainContent_article').setStyle('font-size', '1.181em')
}
return false;
}

function increaseFont()
{
    
    if (window.location.href.indexOf("-folder/") > 0) //category
	{

		$('main-content').getElements("div.lst-notizie").each(function(el)
		{
			if (el.getStyle('font-size').replace('px', '').toInt() < 20)
			{
				el.setStyle('font-size', el.getStyle('font-size').replace('px', '') * 1.2)
			}

		});
		
	}
	else
	{
		if ($('ctl00_mainContent_article').getStyle('font-size').replace('px', '').toInt() < 20)
		{
			$('ctl00_mainContent_article').setStyle('font-size', $('ctl00_mainContent_article').getStyle('font-size').replace('px',
		'') * 1.2)
		}
}

return false;


}
