Deprecated: Function get_magic_quotes_gpc() is deprecated in /home4/laurels/Billing.laurelsandgarland.com/bb-load.php on line 140 Warning: Cannot modify header information - headers already sent by (output started at /home4/laurels/Billing.laurelsandgarland.com/bb-load.php:140) in /home4/laurels/Billing.laurelsandgarland.com/bb-modules/Orderbutton/Controller/Client.php on line 49 Deprecated: Function create_function() is deprecated in /home4/laurels/Billing.laurelsandgarland.com/bb-library/Box/BeanHelper.php on line 60 Warning: session_set_save_handler(): Cannot change save handler when headers already sent in /home4/laurels/Billing.laurelsandgarland.com/bb-library/Box/Session.php on line 24 Warning: session_set_cookie_params(): Cannot change session cookie parameters when headers already sent in /home4/laurels/Billing.laurelsandgarland.com/bb-library/Box/Session.php on line 35 Warning: session_start(): Cannot start session when headers already sent in /home4/laurels/Billing.laurelsandgarland.com/bb-library/Box/Session.php on line 37 var orderbutton = function (){ this.data_product_id = null; this.backgroundElem = null; this.iframeElem = null; this.loaderImageElem = null; }; orderbutton.prototype.setDataProductId = function (product_id){ this.data_product_id = product_id; }; orderbutton.prototype.getDataProductId = function (){ return this.data_product_id; }; orderbutton.prototype.hideElements = function(){ this.backgroundElem.hide(); this.iframeElem.hide(); }; orderbutton.prototype.attachEvents = function() { var _this = this; $(document).keyup(function(e) { // esc if (e.keyCode == 27) { _this.hideElements(); } }); var bodyElem = $('body'); bodyElem.undelegate('.order-button', 'click'); bodyElem.delegate('.order-button', 'click', function (event) { event.preventDefault(); _this.setDataProductId($(this).data('product')) _this.popup(); }); // Create the event. var event = document.createEvent('Event'); event.initEvent('OrderButtonEventsReady', true, true); // target can be any Element or other EventTarget. document.dispatchEvent(event); }; orderbutton.prototype.srclink = function(){ var params = [ { name: "theme_color", value: "green" }, { name: "loader", value: "1" } ]; var product_id = this.getDataProductId(); if (product_id) params.push({'name' : 'order', 'value' : product_id}); return "http://billing.laurelsandgarland.com/orderbutton&"+jQuery.param(params); }; orderbutton.prototype.createIframe = function (){ this.iframeElem = $('