/*

Copyright 2010 Oomta Pty Ltd

You are not permitted to reuse, redistribute, reverse engineer or replicate this code.

*/

$(document).ready
(
	function()
	{
	       // Hide all the containers on load
	       $(".showhide").hide();

       
		$.each
		(
			$(".collapsible"),
			function(objData)
			{
				$(this).find('.togglelink').toggle
				(
					function()
					{
						$(this).text("Click here to hide...");
						$.each
						(
							$(this).parents(),
							function(objData)
							{
								if ($(this).hasClass('collapsible'))
								{
									$(this).find('.showhide').css('display', 'block');
								}
							}
						)
			              },
					function()
					{
						$(this).text("Click here to read more...");
						$.each
						(
							$(this).parents(),
							function(objData)
							{
								if ($(this).hasClass('collapsible'))
								{
									$(this).find('.showhide').css('display', 'none');
								}
							}
						)
					}
				);
			}
		);
	}
);
