function announce_slide_in () {
    jQuery("#ajax_announce").animate({ 
        bottom: "0"
      }, 1500 );

}

function announce_slide_out () {
    jQuery("#ajax_announce").animate({ 
        bottom: "-140"
      }, 1500 );

}

function show_announce(product_name, price_string) {
   jQuery("#ajax_announce_items").html('1 x ' + product_name + ' - ' + price_string);
   announce_slide_in();
}


function add_cart(products_id, product_url) {
  jQuery.get("ajax_process.php", { action:"ajax_add_cart", products_id : products_id}, 
    function (responseText, textStatus, XMLHttpRequest) {
      //The following can be used to show the response from the Ajax request (useful for debugging
     //alert(responseText.cart_count);

     jQuery("#cart_count").html(responseText.cart_count);

     if(responseText.redirect_to_product == 'true') {
       window.location = product_url;
     } else {
       jQuery("#ajax_announce_items").html(responseText.product_added_to_cart);
       jQuery("#header_checkout_link").addClass("header_checkout_active");
       announce_slide_in();
     }

	  
    }
   , "json")
  
}