$(document).ready(function() {
	$("div.answer").hide();
	$('[class^=info]').hide();

	$('h4.question').click(function() {
		$("div.answer").hide();
		if ($(this).display=='block') {
			$(this).next().hide();
		} else {
			$(this).next().show();
		}
	});

		/*$('[class^=info]').hide();
		var $this = $(this);
		var x = $this.attr("className").replace("toggle", "");
		var pad = (x-1) * 25;
		$('.info' + x).css("top", pad + "px");
		$('.info' + x).toggle("fast");
		return false;
	});*/

	$('[class^=toggle]').each(function() {

		$(this).qtip({
			content: {
				url: '/shared-hosting/data.php',
				data: { id: $(this).attr("className").replace("toggle", "") },
				method: 'get'
			},
			position: {
				corner: {
					target: 'rightMiddle',
					tooltip: 'leftMiddle'
				}
			},
			show: 'mouseover',
			hide: 'mouseout',
			style: {
				width: 250,
				padding: 5,
				background: '#ffb124',
				color: 'black',
				border: {
					width: 1,
					radius: 3,
					color: '#666666'
				},
				tip: 'leftMiddle',
				name: 'light'
			}	
		});
	});
});

