function AnimateMenu()
{
    var animate = !($.browser.msie && $.browser.version.substr(0,1) < 7);

    //Add hover functions to all menu items that have children
    var subNavItems = $('#menu li.hasChildren, #menu li.hasChildrenCurrent');
    subNavItems.hover(
        function(){
            var item = $(this);
            item.addClass('hover');
            if (animate)
            {
                subNavItems.find('ul').slideDown(180);
            }
        },
        function(){
            var item = $(this);
            item.removeClass('hover');
            if (animate)
            {
                subNavItems.find('ul').hide();
            }
        }
    );
    
    //Hide child navs by default
    if (animate)
    {
        subNavItems.find('ul').hide();
    }
}

$(document).ready(function(){
    AnimateMenu();
});

var Lst;

function CngClass(obj){
if (Lst) Lst.className='';
obj.className='selected';
Lst=obj;
}

$(document).ready(function() {
  
  var read1 = $('#read1');
  var more1 = $('#more1').hide().css('opacity','0');
  
  $(read1).click(function(){
    
    if($(more1).is(':visible')) {
      $(this).fadeOut().fadeIn().html('read more');
      $(more1).animate({ opacity: "0" }, 500);
      $(more1).slideUp();
    } else {
      $(this).fadeOut().fadeIn().html('read less');
      $(more1).slideDown(function(){
        $(more1).animate({ opacity: "1" }, 1000);
      });
    }
    return false;
  });
  
   var read2 = $('#read2');
  var more2 = $('#more2').hide().css('opacity','0');
  
  $(read2).click(function(){
    
    if($(more2).is(':visible')) {
      $(this).fadeOut().fadeIn().html('read more');
      $(more2).animate({ opacity: "0" }, 500);
      $(more2).slideUp();
    } else {
      $(this).fadeOut().fadeIn().html('read less');
      $(more2).slideDown(function(){
        $(more2).animate({ opacity: "1" }, 1000);
      });
    }
    return false;
  });
  
   var read3 = $('#read3');
  var more3 = $('#more3').hide().css('opacity','0');
  
  $(read3).click(function(){
    
    if($(more3).is(':visible')) {
      $(this).fadeOut().fadeIn().html('read more');
      $(more3).animate({ opacity: "0" }, 500);
      $(more3).slideUp();
    } else {
      $(this).fadeOut().fadeIn().html('read less');
      $(more3).slideDown(function(){
        $(more3).animate({ opacity: "1" }, 1000);
      });
    }
    return false;
  });
  
   var read4 = $('#read4');
  var more4 = $('#more4').hide().css('opacity','0');
  
  $(read4).click(function(){
    
    if($(more4).is(':visible')) {
      $(this).fadeOut().fadeIn().html('read more');
      $(more4).animate({ opacity: "0" }, 500);
      $(more4).slideUp();
    } else {
      $(this).fadeOut().fadeIn().html('read less');
      $(more4).slideDown(function(){
        $(more4).animate({ opacity: "1" }, 1000);
      });
    }
    return false;
  });
  
   var read5 = $('#read5');
  var more5 = $('#more5').hide().css('opacity','0');
  
  $(read5).click(function(){
    
    if($(more5).is(':visible')) {
      $(this).fadeOut().fadeIn().html('read more');
      $(more5).animate({ opacity: "0" }, 500);
      $(more5).slideUp();
    } else {
      $(this).fadeOut().fadeIn().html('read less');
      $(more5).slideDown(function(){
        $(more5).animate({ opacity: "1" }, 1000);
      });
    }
    return false;
  });
  
	//smooth page scrolling
  $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
      var $target = $(this.hash);
      $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
      if ($target.length) {
        var targetOffset = $target.offset().top;
        $('html,body').animate({scrollTop: targetOffset}, 1000);
        return false;
      }
    }
  });
	//open links in new window  
  $("a[href^='http']").attr('target','_blank');
});        
//[End]UK10704 index.aspx 620 only

