var init = {};
init.init = function ()
{
	if (typeof(calendar) != 'undefined')
	{
		calendar.init();
	}

	if (typeof(findImages) != 'undefined')
	{
		findImages();
	}

	if (typeof(room_group) != 'undefined')
	{
		room_group.init();
	}

	if (typeof(form_handler) != 'undefined')
	{
		form_handler.init();
	}

	if (typeof(openHotelCards) != 'undefined')
	{
		openHotelCards();
	}

	if (typeof(short_date) != 'undefined')
	{
		short_date.init();
	}

	if (typeof(free_hotels) != 'undefined')
	{
		free_hotels.init();
	}

	if (typeof(stars) != 'undefined')
	{
		stars.init();
	}

	if (typeof(reservation_form) != 'undefined')
	{
		reservation_form.init();
	}

	if (typeof(recount_offers) != 'undefined')
	{
		recount_offers.init();
	}

	var temp_abclink = document.getElementById('abclink');
	if (temp_abclink)
	{
		if (class_handler.has(temp_abclink, 'nonabc'))
		{
			var anchor = document.createElement('a');
			anchor.href = '?abc=nonabc';
			anchor.title = MENU_SORT_BY_HTLOFDAY;

			var txt = document.createTextNode('123');
			anchor.appendChild(txt);
			temp_abclink.appendChild(anchor);
		}
		else
		{
			var anchor = document.createElement('a');
			anchor.href = '?abc=abc';
			anchor.title = MENU_SORT_BY_ALPHABET;

			var txt = document.createTextNode('abc');
			anchor.appendChild(txt);
			temp_abclink.appendChild(anchor);
		}
	}

	var all_elements = document.getElementsByTagName("*");
	for (var i = 0; i < all_elements.length; i++)
	{
		if (typeof(confirm_wrapper) != 'undefined')
		{
			if (class_handler.has(all_elements[i], 'confirm'))
			{
				confirm_wrapper.hook(all_elements[i]);
			}
		}
	}
};

event_handler.add(window, 'load', init.init);
