jQuery.noConflict();

jQuery(document).ready(function(){
    //scroller FX
	jQuery('#slider-images').cycle({
					fx	: 'fade',
					speed	: 'slow',
					timeout : 7000,
					after	: function(){},
					next    : '#btnNext',
					prev    : '#btnPrev',
					pager:  '#controls'
	 });


        jQuery(document).ready(function() {
            jQuery("#faq-section").accordion();
        });


        $(document).ready(function() {
          $('table.striped tbody tr:not([th]):odd').addClass('odd');
          $('table.striped tbody tr:not([th]):even').addClass('even');

          //this is the code for opening tooltips
          $('.tooltip').hide();          
          $('.click-info').each(function(){             
                $(this).click(function(){
                    $('.tooltip:visible').fadeOut('normal');
                    $(this).parent().children('.tooltip:hidden').slideDown('normal');
                    event.stopPropagation();
		});
	  });

          $('body').click(function(){
              //$('.tooltip:visible').fadeOut('normal');
          });

        });


        //this makes flight schedule collapse/expand
          $(document).ready(function() {
            var toggleMinus = '../web/icons/minus.png';
            var togglePlus = '../web/icons/plus.png';
            var $subHead = $('#flight-schedule tbody th:first-child');
            $subHead.prepend('<img src="' + togglePlus + '" alt="+" />');

            $('img', $subHead).addClass('clickable').click(function() {

                var toggleSrc = $(this).attr('src');

                if ( toggleSrc == toggleMinus ) {
                    $(this).attr('src', togglePlus)
                    .parents('tr').siblings().fadeOut('fast');

                } else{
                    $(this).attr('src', toggleMinus)
                    .parents('tr').siblings().fadeIn('fast');

                };
            });

            $('img.clickable').parents('tr').siblings().hide();

           })



});
