/* jQuery Shopping Cart 
 *
 * Published under GNU License 
 * 
 * 2010/07/01 - by delete ( olivier@smartmarseille.com )
 * 2010/07/14 - by delete ( olivier@smartmarseille.com ) - Added Attributes support     
 */
$(document).ready(function() {

// Add to cart for product_info page
//
$('#pi-add-to-cart').click(function(){
// Partial Source code from :  http://webresourcesdepot.com/wp-content/uploads/file/jbasket/fly-to-basket/
  $.ajax({
      type: 'POST',
      url: encodeURI($('form[name=cart_quantity]').attr('action')) + '&show_total=1&ajax=1',
      data: $('form[name=cart_quantity]').serialize(),
      success: function(data) {
          $('#boxcart-total').html(data);
          //Hide_Load();
      }
  });

  $('#message_text').html('This item has been added to your cart.');
  $('html, body').animate({scrollTop:0}, "slow");
  $('#message_box').animate({top:'0px'}, 500);
  $('#message_box').animate({'background-color':'#ffc'}, 750);
  $('#message_box').animate({'background-color':'#cfc'}, 750);
  $('#message_box').animate({'background-color':'#ffc'}, 750);
  $('#message_box').animate({'background-color':'#cfc'}, 750);
  $('#message_box').animate({'background-color':'#ffc'}, 750);
  $('#message_box').animate({'background-color':'#cfc'}, 750);
  $('#message_box').animate({'background-color':'#ffc'}, 750);
  $('#message_box').animate({'background-color':'#cfc'}, 750);
  $('#message_box').animate({top:'-30px'}, 1000);

return(false) ;
});

//when the close button at right corner of the message box is clicked
$('#close_message').click(function()
{
  //the messagebox gets scrool down with top property and gets hidden with zero opacity
  $('#message_box').animate({opacity:0}, "slow");
});

$('.specials_container').click(function(){
    window.location = 'product_info.php?products_id=' + $(this).attr('id');
});
});
/* EO jQuery Shopping Cart */

