/*$(document).ready(function() {	
	//STYLE LINKS SITEWIDE
	$('a[href^=mailto:]').addClass('mailto');
	$('a[href$=.pdf]').addClass('pdflink');
	$('a[href^=http][href*=www]').addClass('extlink');
});*/


$(document).ready(function(){
      $('.lightbox').lightbox();
});

$(function(){
	// initialise Menu plugin
	$('ul.sf-menu').superfish({ 
            delay:       800,                            // one second delay on mouseout 
            animation:   {opacity:'show',height:'show',animation:'fade-in'},  // fade-in and slide-down animation 
            speed:       'medium',                          // faster animation speed 
            autoArrows:  false,                           // disable generation of arrow mark-up 
            dropShadows: true                            // disable drop shadows 
        });
	//
	//Annual report tabs, Archive
	$( "#tabs" ).tabs({
			event: "mouseover"
		
		
	});
});


//Supersized background image
$(function(){
	$.fn.supersized.options = {  
	startwidth: 640,  
	startheight: 480,
	vertical_center: 1,
	slideshow: 0,
	navigation: 0,
	thumbnail_navigation: 0,
	transition: 1, //0-None, 1-Fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left
	pause_hover: 0,
	slide_counter: 0,
	slide_captions: 0,
	slide_interval: 3000,
	slides : [
		{image : 'images/bg_main.jpg', title : '', url : ''},
		{image : '', title : '', url : ''}  
			]
		};
		$('#supersized').supersized(); 
});

// #CENTER IMAGES  Homepage image loader  
$(function () {
  var img = new Image();
  var img02 = new Image();
  var img03 = new Image();
  var img04 = new Image();
  var img05 = new Image();
  var img06 = new Image();
  
  $(img)
    .load(function () {  
      $(this).hide();
      $('#loader')
        .removeClass('loading')
        .append(this);
      $(this).fadeIn();
    })
    .error(function () {
    })
    .attr('src', 'images/img-home-01.jpg');
	
	//ABOUT US IMG
	$(img02)
    .load(function () {  
      $(this).hide();
      $('#aboutImg')
        .removeClass('loading')
        .append(this);
      $(this).fadeIn();
    })
    .error(function () {
    })
    .attr('src', 'images/img-about.jpg');
	
	//GROUP OVERVIEW IMG
	$(img03)
    .load(function () {  
      $(this).hide();
      $('#groupOvImg')
        .removeClass('loading')
        .append(this);
      $(this).fadeIn();
    })
    .error(function () {
    })
    .attr('src', 'images/img-group-overview.jpg');
	
	//INVESTOR IMG
	$(img04)
    .load(function () {  
      $(this).hide();
      $('#iInfoImg')
        .removeClass('loading')
        .append(this);
      $(this).fadeIn();
    })
    .error(function () {
    })
    .attr('src', 'images/img-ir.jpg');
	
	//INVESTOR IMG
	$(img05)
    .load(function () {  
      $(this).hide();
      $('#financialsImg')
        .removeClass('loading')
        .append(this);
      $(this).fadeIn();
    })
    .error(function () {
    })
    .attr('src', 'images/img-financials.jpg');
	
	
	//NEWS & MEDIA IMG
	$(img06)
    .load(function () {  
      $(this).hide();
      $('#newsImg')
        .removeClass('loading')
        .append(this);
      $(this).fadeIn();
    })
    .error(function () {
    })
    .attr('src', 'images/img-news-media.jpg');
	
	//CONTACT IMG
	$(img06)
    .load(function () {  
      $(this).hide();
      $('#contactImg')
        .removeClass('loading')
        .append(this);
      $(this).fadeIn();
    })
    .error(function () {
    })
    .attr('src', 'images/img-news-media.jpg');
	
	
});
