$(document).ready(function() {
     
    //Main menu 
    $('.main-menu > ul > li').dropdown({
        delay:100,
        speedIn:100,
        speedOut:300,
        child:'.menu-dropdown'
     });
   
   //active section nav
   $(".section-nav a").each(function() {
        if(this.href == window.location) $(this).addClass("active");
        if(this.href == window.location) $(this).removeAttr("href");
   });
   
   //lets convert marked elements to the desired colobox markup.
   $(".color-box-image").ColorboxSetup();
   
   // if there are any galleries on this page lets fire them up   
   $(".gallery a[rel='gallery1'], .colorbox").colorbox({transition:"fade"});
 
    //Firsts
    $('ul.tabs li:first-child, .promos ul li:first-child, .news.block ul li:first-child').addClass("first");
    
    //Tabs
    $('.simple-tabs').SimpleTabs();
    
    //PDF class
    $("a[href$='.pdf']").attr({"target":"_blank"}).each(function(){
       if ($(this).parent().is('li')) {
           $(this).parent().addClass("pdf");
       }   
    });
	
    //Alts
    $(".content table tr:even, .briefcase-container .documents div:even").not(".calendar table tr:even,.share-information table tr:even").addClass('alt');
    
   //Briefcase
    $(".briefcase-container .submit input").addClass('dis');
    $(".briefcase-container label").click(function () {
      $(this).toggleClass("check");
      $(".investor-briefcase .submit input").removeAttr('disabled').removeClass('dis');
    });
    
    //TEMP ALERT FOR NOT-YET-COMPLETED FUNCTIONS
    $('#download, a.outlook').click(function() {
        alert('Function currently in development.');
    });

    //Tooltips - Glossary Terms
	$(".content abbr.term").tooltip({});
	
	//Content Arrow  Links
	$(".arrow-link").arrowLink({});	
	
	//Inline labesl
	$('.inline-label').fieldLabel();
	
	//Timeago
    $("abbr.timeago").timeago();

});
