$(function(){

$('#navMain li ul').hide();
$('#navMain li').hover(function(){
    $(this).children('ul').slideDown('fast');
}, function(){
     $(this).children('ul').slideUp(100);
})

$('.iconInfo p').css('left', '-340px');

$('#trainingIcons img').stop(true,true).hover(function(){
    var id = $(this).parent().attr('id');
    var src = $(this).attr('src');
    var newstr = src.replace(".png", "_hover.png")
    $(this).attr('src', newstr);
    $('#'+id+' .iconInfo p').animate({
    left: '0'
  }, 300, function() {
    // Animation complete.
  });
}, function(){
    var id = $(this).parent().attr('id');
    var src = $(this).attr('src');
    var newstr = src.replace("_hover.png", ".png")
    $(this).attr('src', newstr);

    $('#'+id+' .iconInfo p').animate({
    left: '-340px'
  }, 200, function() {
    // Animation complete.
  });
});

$('#trainingIcons img').hover(function(){
    var src = $(this).attr('src');
    var newstr = src.subtring(-4);
alert('hello');

alert(newstr);
})


$('#navCompany li#handle').toggle(function(){
    $(this).css('background-image', 'url(../imgs/company/arrow.png)');
    $('div.bio .bioCont').animate({
        width: '0px'
    }, 500);
    $('div.bio').animate({
        width: '290px'
    }, 500);
    

}, function(){
    $(this).css('background-image', 'url(../imgs/company/close.png)');
     $('div.bio .bioCont').animate({
        width: '700px'
    }, 500);
    $('div.bio').animate({
        width: '1000px'
    }, 500);
});


// Home page bg fade

$(function(){

    $('#slide').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
});


});
