if(typeof com == 'undefined') com = new Object();
if(typeof com.tiso == 'undefined') com.tiso = new Object();
if(typeof com.tiso.classes == 'undefined') com.tiso.classes = new Object();
if(typeof document.loadHooks == 'undefined') document.loadHooks = [];

com.tiso.classes.Vacancies = function()
{
	this.linksHolder = null;
}
com.tiso.classes.Vacancies.prototype.ondocumentloaded = function()
{
	var main, links, b, i, h3, ul, li, c;

	if(!(document.getElementById('vacancies'))) return;
	if(!(main = document.getElementById('main'))) return;
	h3 = main.getElementsByTagName('h3');
	for(c = 0; c < h3.length; c++)
	{
		p = Shine.createHTMLElement('p');
		Shine.setAttribute(p, 'class', 'back-to-top');
		p.appendChild(document.createTextNode('[ '));
		a = Shine.createHTMLElement('a');
		Shine.setAttribute(a, 'href', '/about/recruitment/apply/');
		a.appendChild(document.createTextNode('Apply now'));
		p.appendChild(a);
					  
		p.appendChild(document.createTextNode(' | '));
		a = Shine.createHTMLElement('a');
		Shine.setAttribute(a, 'href', '#top');
		a.appendChild(document.createTextNode('Back to top'));
		p.appendChild(a);
		p.appendChild(document.createTextNode(' ]'));
		if(c + 1 < h3.length)
		{
			h3[c+1].parentNode.insertBefore(p, h3[c+1]);
		}
		else
		{
			h3[c].parentNode.appendChild(p);
		}
	}
}
com.tiso.vacancies = new com.tiso.classes.Vacancies();
document.loadHooks.push(function() { com.tiso.vacancies.ondocumentloaded(); });
