





$(document).ready(function(){
	$('ul.accordion').accordion({
		active: ".selected",
		autoHeight: false,
		header: ".opener",
		collapsible: true,
		event: "click"
	});
	
	/*
	$('h1.logo').movingBlock({
		holder:'#main',
		topDif:42,
		bottomDif:5,
		toEl:false,
		cssTop:'marginTop',
		duration:0
	});
	//*/
	
	
});

$(window).load(function(){
	initFade();
});

function initFade(){

	initCastomForms();
	speed = $.browser.msie ? 0 : 700;
	var _link = $('#sarea0');
	var _drop = $('#optionsDiv0');
	_link.click(function(){
		if (_drop.is(':visible')){
			_link.removeClass('selectAreaActive');
			if($.browser.msie){
				_drop.hide();
			}else{
				_drop.animate({
					opacity: 0
				}, {duration: speed, queue: false, complete: function(){
					_drop.css('display','none');
				}});
			}
		}else{
			_link.addClass('selectAreaActive');
			if($.browser.msie){
				_drop.show();
			}else{
				_drop.css('display','block');
				_drop.css('opacity',0);
				_drop.animate({
					opacity: 1
				}, {duration: speed, queue: false, complete: function(){
				}});
			}
		}
	});
	var optTimer;
	_link.hover(function(){
			if(optTimer) clearTimeout(optTimer);
	}, function() {
		optTimer = setTimeout(function() {
			if($.browser.msie){
				_drop.hide();
			}else{
				_drop.animate({
					opacity: 0
				}, {duration: speed, queue: false, complete: function(){
					_drop.css('display','none');
				}});
			}
			_link.removeClass('selectAreaActive');
		}, 200);
	});
	_drop.hover(function(){
		if(optTimer) clearTimeout(optTimer);
	}, function() {
		optTimer = setTimeout(function() {
			if($.browser.msie){
				_drop.hide();
			}else{
				_drop.animate({
					opacity: 0
				}, {duration: speed, queue: false, complete: function(){
					_drop.css('display','none');
				}});
			}
			_link.removeClass('selectAreaActive');
		}, 200);
	});
}

