/**
 *  offers.js
 *  $Revision: 1.2 $
 *
 *  Javascript file for mashup offers - Web Marketing project 
 *  called via: cdc.mashup.offers(host,service,pznrule)
 *
 *   (c) 1992-2008 Cisco Systems, Inc. All rights reserved.
 *   Terms and Conditions: http://cisco.com/en/US/swassets/sw293/sitewide_important_notices.html' 
 *  
 */

cdc.util.ensureNamespace('cdc.mashup');
cdc.mashup.offers = function (service,pznrule){

  var serviceUri = service; // uri of service on same domain
  var expectedPattern ="<!-- portlet:MashupOffersPortlet -->"; //this pattern set by back-end portlet

  jQuery.ajax({  
    type:"GET",
    url : serviceUri,
    data : pznrule,
    success : function(offer){
      if (offer.match (expectedPattern)) {
        jQuery("#mashup-offers-content").html(offer);
      }
    } 
  });
}
