/*
 * Author: Teon Ooi (teon.ooi@pixl8.co.uk/gmail.com)
 * Date: 04/06/2009
 */
jQuery.noConflict();

jQuery(function() {
	jQuery('a[rel*=link-external]').click( function() {
		 window.open(this.href);
		 return false;
	});
	jQuery('a[rel*=link-external]').attr("title", "Opens link in a new window");
			
});


(function($) { 
  $(function() {
			
    //Hover Menu 
	$('#layer-menu ol li').hover(function() {
					
		$(this).find("ol:first").stop(true,true).fadeIn('fast').show(); 
		$(this).addClass('hover');
		
		$leftOffset = $(this).find("ol:first").offset().left;
		$bodyOffsetRight = parseInt($('#layer-body').offset().left) + 888;
		
		if($leftOffset >=  $bodyOffsetRight){
			$(this).find("ol:first").css("right","208px");
		}
	}, function(){ 	
		$(this).find("ol:first").stop(true,true).hide();
		$(this).removeClass("hover");
    });	
	
  });
})(jQuery);

