jQuery(document).ready(function(){

// Read more include on all pages
// initialise the visibility check
var is_visible = false;
// append show/hide links to the element directly preceding the element with a class of "toggle"
jQuery('.toggle').prev().append(' <a href="#" class="toggleLink">'+showText+'</a>');
// hide all of the elements with a class of 'toggle'
jQuery('.toggle').hide();
// capture clicks on the toggle links
jQuery('a.toggleLink').click(function() {
	// switch visibility
	is_visible = !is_visible;
	// change the link depending on whether the element is shown or hidden
	$(this).html( (!is_visible) ? showText : hideText);
	// toggle the display - uncomment the next line for a basic "accordion" style
	//$('.toggle').hide();$('a.toggleLink').html(showText);
	$(this).parent().next('.toggle').toggle(2000, 'easeOutBounce');
	// return false so any link destination is not followed
	return false;
});

/* Recently Viewed Countries Drop down */
if(jQuery("#recentlyViewed").length)
{
	jQuery("#recentlyViewed").hide()

	jQuery("#recentview").hover(function() {
		jQuery("#recentlyViewed").stop(true, true).slideToggle();
		jQuery(this).toggleClass("recentbg");
		return true;
	});
};
/* Latest News scroller */
 	if(jQuery("#latest-news ul li:first").length)
	{
		jQuery('#latest-news ul').cycle({ 
			fx: 'scrollVert',
			speed: 800,
			rev: true,
			timeout: 8000,
			next:   '#latest-news ol li.next', 
			prev:   '#latest-news ol li.previous'
		 }); 
	}
/* Events scroller*/ 
	if(jQuery('#calendar-events ul li:first').length){
 		jQuery('#calendar-events ul').cycle({ 
		    fx: 'scrollVert',
			speed: 800,
			rev: true,
			timeout: 10000,
			next:   '#calendar-events ol li.next', 
		    prev:   '#calendar-events ol li.previous'
		 }); 
	};

/* Table link */	 
   jQuery("table.rowLink tr.highlight").click(function(){
      window.location=$(this).find("a").attr("href"); return false;
    });


/* countries menu list */
jQuery('#leftnav li ul').before('<a id="plusminus_button" class="clickMe" href="#"></a>');
	if (jQuery('#menu-item-150').hasClass('current_page_item'))
	{
		jQuery("#leftnav li ul.sub-menu").stop(true, true).slideToggle("slow");
		jQuery("#plusminus_button").addClass("open");
	}
 	if (jQuery('#menu-item-150').hasClass('current-page-parent'))
	{
			jQuery("#leftnav li ul.sub-menu").stop(true, true).slideToggle("slow");
			jQuery("#plusminus_button").addClass("open");
	}
jQuery("#plusminus_button").click(function() {
		jQuery("#leftnav li ul.sub-menu").stop(true, true).slideToggle("slow");
		jQuery(this).toggleClass("open");
		return false;
	});

	
});

