jQuery.fn.fadeToggle = function(speed, easing, callback) { 
    return this.animate({opacity: 'toggle'}, speed, easing, callback); 
};

$(function(){
  $("#estimate_form").hide()
  $("#estimate_button a").bind('click', function(){
    $("#estimate_form").slideToggle(500)
    return false
  })
  
  $("#residential").hide()
  $("#type_select .toggle").bind('click', function(){
    $("#type_box .inside div").hide()
    $("#type_select .selected").removeClass("selected")
    $(this).addClass("selected")
    $($(this).attr("href")).fadeIn(700)
    return false
  })
  
  $("#products li > ul").hide()
  $("#products li h3 a").bind('click', function(){
    $(this).parent().next().fadeToggle()
    return false
  })
  
  $("#toggle").show()
  
  $("#testimonials #list .text").hide()
  $("#images").hide()
  $("#text").bind('click', function(){
    $(this).hide()
    $("#images").show()
    $("#list img").hide()
    $("#list .text").show()
    return false
  })  
  $("#images").bind('click', function(){
    $(this).hide()
    $("#text").show()
    $("#list img").show()
    $("#list .text").hide()
    return false
  })
})
