// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

// $(".pagination a").live("click", function() {
//  $("#all_products").html("Page is loading");
//  $.get(this.href, null, null, "script");
//  return false;
// });


$("#user_scheduled_feed_frequency").live('change',function(){
    var select = $(this);
    var newVal = select.val();
    if(newVal == 'daily'){
      $("#scheduled_feed_day_area").hide();
    }else{
      $("#scheduled_feed_day_area").show();
    }
});

$(document).ready(function(){
  var plan = $('#plan');

  if(plan != null){
    if(plan.val() != 3){
      $('#additional-products').hide();
    }

    plan.change(function(){
      if(plan.val() == 3){
        $('#additional-products').show();
      }else{
        $('#additional-products').hide();
      }
    });
  }
});

