/***************************************************************************
 * @Author: NetChillies - PepUp The Web!
 * @Website: http://www.netchillies.com/
 * @Contact: http://www.netchillies.com/contact
 * @Privacy Policy & Terms of Use: http://www.netchillies.com/terms
 * @License Info: http://www.netchillies.com/license
 ***************************************************************************/
$(document).ready(function(){
    $(function () {

  var msie6 = $.browser == 'msie' && $.browser.version < 7;

  if (!msie6) {
    var top = $('.custom-scrollable').offset().top - parseFloat($('.custom-scrollable').css('margin-top').replace(/auto/, 0));

	$(window).scroll(function (event) {
      // what the y position of the scroll is
      var y = $(this).scrollTop();

      if (y >= top) {
        // if so, ad the fixed class
        $('.custom-scrollable').addClass('fixed');
      } else {
        // otherwise remove it
        $('.custom-scrollable').removeClass('fixed');
      }
    });
  }
});


    $('#tab2-content').hide();
    $('#tab3-content').hide();
    $('#tab4-content').hide();
    $('#tab5-content').hide();
    $('#tab6-content').hide();
    $('#tab7-content').hide();

$('#tab1').click(function(){
    $('#tab1').addClass('active');
    $('#tab2').removeClass('active');
    $('#tab3').removeClass('active');
    $('#tab4').removeClass('active');
    $('#tab5').removeClass('active');
    $('#tab6').removeClass('active');
    $('#tab7').removeClass('active');
    $('#tab1-content').show('slow').removeClass('hidden');    
    $('#tab2-content').hide('slow').hide();
    $('#tab3-content').hide('slow').hide();
    $('#tab4-content').hide('slow').hide();
    $('#tab5-content').hide('slow').hide();
    $('#tab6-content').hide('slow').hide();
    $('#tab7-content').hide('slow').hide();
    return false;
});

$('#tab2').click(function(){
    $('#tab2').addClass('active');
    $('#tab1').removeClass('active');
    $('#tab3').removeClass('active');
    $('#tab4').removeClass('active');
    $('#tab5').removeClass('active');
    $('#tab6').removeClass('active');
    $('#tab7').removeClass('active');
    $('#tab2-content').show('slow').removeClass('hidden');
    $('#tab1-content').hide();
    $('#tab3-content').hide();
    $('#tab4-content').hide();
    $('#tab5-content').hide();
    $('#tab6-content').hide();
    $('#tab7-content').hide();
    return false;
});

$('#tab3').click(function(){
    $('#tab3').addClass('active');
    $('#tab1').removeClass('active');
    $('#tab2').removeClass('active');
    $('#tab4').removeClass('active');
    $('#tab5').removeClass('active');
    $('#tab6').removeClass('active');
    $('#tab7').removeClass('active');
    $('#tab3-content').show('slow').removeClass('hidden');
    $('#tab1-content').hide();
    $('#tab2-content').hide();
    $('#tab4-content').hide();
    $('#tab5-content').hide();
    $('#tab6-content').hide();
    $('#tab7-content').hide();
    return false;
});

$('#tab4').click(function(){
    $('#tab4').addClass('active');
    $('#tab1').removeClass('active');
    $('#tab2').removeClass('active');
    $('#tab3').removeClass('active');
    $('#tab5').removeClass('active');
    $('#tab6').removeClass('active');
    $('#tab7').removeClass('active');
    $('#tab4-content').show('slow').removeClass('hidden');
    $('#tab1-content').hide();
    $('#tab2-content').hide();
    $('#tab3-content').hide();
    $('#tab5-content').hide();
    $('#tab6-content').hide();
    $('#tab7-content').hide();
    return false;
});

$('#tab5').click(function(){
    $('#tab5').addClass('active');
    $('#tab1').removeClass('active');
    $('#tab2').removeClass('active');
    $('#tab3').removeClass('active');
    $('#tab4').removeClass('active');
    $('#tab6').removeClass('active');
    $('#tab7').removeClass('active');
    $('#tab5-content').show('slow').removeClass('hidden');
    $('#tab1-content').hide();
    $('#tab2-content').hide();
    $('#tab3-content').hide();
    $('#tab4-content').hide();
    $('#tab6-content').hide();
    $('#tab7-content').hide();
    return false;
});

$('#tab6').click(function(){
    $('#tab6').addClass('active');
    $('#tab1').removeClass('active');
    $('#tab2').removeClass('active');
    $('#tab3').removeClass('active');
    $('#tab4').removeClass('active');
    $('#tab5').removeClass('active');
    $('#tab7').removeClass('active');
    $('#tab6-content').show('slow').removeClass('hidden');
    $('#tab1-content').hide();
    $('#tab2-content').hide();
    $('#tab3-content').hide();
    $('#tab4-content').hide();
    $('#tab5-content').hide();
    $('#tab7-content').hide();
    return false;
});

$('#tab7').click(function(){
    $('#tab7').addClass('active');
    $('#tab1').removeClass('active');
    $('#tab2').removeClass('active');
    $('#tab3').removeClass('active');
    $('#tab4').removeClass('active');
    $('#tab5').removeClass('active');
    $('#tab6').removeClass('active');
    $('#tab7-content').show('slow').removeClass('hidden');
    $('#tab1-content').hide();
    $('#tab2-content').hide();
    $('#tab3-content').hide();
    $('#tab4-content').hide();
    $('#tab5-content').hide();
    $('#tab6-content').hide();
    return false;
});

})
