  $(document).ready(function() {
    $(".draggable").draggable({stack:".product_teaser"});
    $("#jpId").droppable({
    accept:".product_teaser",
	activeClass: "ui-state-hover",
      drop: function(ev, ui) { 
       
      //get the titleof dropped draggable div
                    var sampleURL = ui.draggable.attr('data-sample');
                //alert(divTitle) //alert the divIndex to see the result
      $("#jpId").jPlayer("setMedia", {
        wav: sampleURL, // Defines the wave file url
      }).jPlayer("play"); // plays the media
       },
   out: function(){
    $("#jpId").jPlayer("stop");
    },
    activate: function(){
    $("#player_callout").animate({ opacity: "1" }, "slow");
    },
    deactivate: function(){
    $("#player_callout").animate({ opacity: "0" }, "slow");
    }
    });
   
 
    $("#shopping_bag").droppable({
    accept:".product_teaser",
	activeClass: "ui-state-hover",
      drop: function(ev, ui) { 
      //get the titleof dropped draggable div
                    var storeLink = ui.draggable.attr('data-store_link');
                //alert(divTitle) //alert the divIndex to see the result
 //alert(storeLink);
 window.location = storeLink;
 }
    });
    $(".menu-item").draggable({stack:".menu-item"});

  });
/* http://docs.jquery.com/UI/API/1.8/Droppable */
