//FLBC Jquery Functions
jQuery(function ($)  {    

//Program Menu
$("#menu-program-menu li:even").addClass("alt");
    $('p.menu_head').click(function () {
	$('#menu-program-menu').slideToggle('medium');
    });
	$('#menu-program-menu li a').mouseover(function () {
	$(this).animate({ fontSize: "12px", paddingLeft: "20px" }, 50 );
    });
	$('#menu-program-menu li a').mouseout(function () {
	$(this).animate({ fontSize: "12px", paddingLeft: "10px" }, 50 );
    });
    
//Fade In & Out
$("#prev").fadeTo(0, 0.7);
			$("#prev").hover(function(){
			$(this).fadeTo(100, 1);
			},function(){
   			$(this).fadeTo(150, 0.7);
			});

$("#next").fadeTo(0, 0.7);
			$("#next").hover(function(){
			$(this).fadeTo(100, 1);
			},function(){
   			$(this).fadeTo(150, 0.7);
			});
			
// $(".logo, #yb-logos img").fadeTo(100, 1);
			// $(".logo, #yb-logos img").hover(function(){
			// $(this).fadeTo(0, 0.7);
			// },function(){
   			// $(this).fadeTo(100, 1);
			// });
			
//Cycle Homepage
    $('.slider img:first').fadeIn(1000, function() {
    $('.slider').cycle({
	fx: 'fade',
	speed:4000,
	speedIn: 1000,
    speedOut: 1000,
    prev: '#prev', 
    next: '#next',
    cleartypeNoBg: true
	});
	});
	
	//$('.slider img:first').fadeIn(1000, function() {
    $('#scroll').cycle({
	fx: 'scrollRight',
	speed:4000,
	speedIn: 1000,
    speedOut: 1000,
    cleartypeNoBg: true,
    pager:  '#scrolltabs',
    pagerAnchorBuilder: function(idx, slide) { 
        return '<li><a href="#">' + jQuery(slide).children("h3").eq(0).text() + '</a></li>';
    } 
	});
	//});
	
	//Staff Images
	  $('#staff-slider').cycle({
	fx: 'fade',
	speed:5000,
	speedIn: 1000,
    speedOut: 1000,
    cleartypeNoBg: true
	});
	
	//Staff Images
	 $('.gallery').cycle({
	fx: 'fade',
	speed:3000,
	speedIn: 1000,
    speedOut: 1000,
    cleartypeNoBg: true,
    prev: '#prev1', 
    next: '#next1'
	});

	

	//Blank Target 
	$("a").filter(function() {
	return this.hostname && this.hostname !== location.hostname;
	}).attr('target', '_blank');
	
		$("#firstpane .project_head").click(function()
		{
		    $(this).css({backgroundImage:"url(arrow.png)"})
		    .next("p.project_body")
		    .slideToggle(200)
		    .siblings("p.project_body")
		    .slideUp("slow");
		    $(this).siblings().css({backgroundImage:"url(arrow.png) no-repeat top left"});
			});

    		$("#reply-panel").hide();
    		$("#respond").click(function () {
    		$("#reply-panel").slideToggle(200);
   			});
 
 
//$("#bio:nth-child(-n+6)").wrap("<div class='bio'></div>");
 
$('.bio').hide(); 
$('a.show-bio').click(function() { 
     $(this).next().slideToggle()
        // alert(id); 
     return false; 
     }); 

// starting the script on page load

	$('a.normalTip').aToolTip({   fixed: false,                   // Set true to activate fixed position  
        clickIt: false,                 // set to true for click activated tooltip  
        inSpeed: 200,                   // Speed tooltip fades in  
        outSpeed: 100,                  // Speed tooltip fades out  
        tipContent: '',                 // Pass in content or it will use objects 'title' attribute  
        toolTipClass: 'defaultTheme',   // Set class name for custom theme/styles  
        xOffset: 5,                     // x position  
        yOffset: 5,                     // y position  
        onShow: null,                   // callback function that fires after atooltip has shown  
        onHide: null                    // callback function that fires after atooltip has faded out      
    });    
	
 
});




	
