window.addEvent('domready', function() {

var faqAccordion = new Accordion($('faq-list'), 'h3', 'dd', {});

$('parts-list').getElement('li:last-child').setStyle('float', 'right');

$('access-form').fade('hide');
$('access-toggle').addEvent('click', function(){
	$('access-form').fade('toggle');
});
$('access-link').setStyle('display', 'none');
$('access-toggle').setStyle('display', 'block');

$('close-button').addEvent('click', function(){
        $('access-form').fade('out');
        });

$$('#plans-table .button').addEvent('click', function(){
$$('#plans-table .payment-systems').setStyle('visibility', 'hidden');
this.getPrevious().setStyle('visibility', 'visible');
});
$$('#plans-table .close-button').addEvent('click', function(){
this.getParent().getParent().setStyle('visibility', 'hidden');
});
$$('#plans-table .payment-systems').addEvent('mouseleave', function(){
this.setStyle('visibility', 'hidden');
});
                                

if(Browser.Engine.trident4)
{
	var partsListBackground = new Element ('div', {'id':'parts-list-background'});
	var illustrationBackground = new Element ('div', {'id':'illustration-background'});
	var accessFormBackground = new Element ('div', {'id':'access-form-background'});
	
	$('parts-list').setStyle('background', 'none');
	partsListBackground.injectBefore($('parts-list'));
	
	$$('#parts-list a').set('class', 'parts-list-item');

	$$('#parts-list a').addEvent('mouseover', function(){
		this.set('class', 'parts-list-item-hovered');
	});
	$$('#parts-list a').addEvent('mouseout', function(){
		this.set('class', 'parts-list-item');
	});
	
	if ($('access-form') != null)
	{
		$('access-form').setStyle('background', 'none');
		accessFormBackground.injectBefore($('access-form'));
		$('access-form-background').fade('hide');
		$('access-toggle').addEvent('click', function(){
			$('access-form-background').fade('toggle');
		});
	}
	
	if ($('illustration') != null)
	{
		$('illustration').setStyle('background', 'none');
		illustrationBackground.injectBefore($('illustration'));
	}
	if ($('payment-systems-list') != null)
	{
		$('payment-systems-list').getElement('li:first-child').setStyle('padding-left', '255px');
	}
}

});