/*global window, rJS, RSVP */
/*jslint indent: 2, nomen: true, maxlen: 80*/
(function (window, rJS, RSVP) {
"use strict";

/////////////////////////////////////////////////////////////////
// some methods
/////////////////////////////////////////////////////////////////

rJS(window)

/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
.ready(function (gadget) {
gadget.property_dict = {};
})

/////////////////////////////////////////////////////////////////
// acquired methods
/////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////

.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.declareGadget("pdf_js/pdfjs.gadget.html", {
scope: "viewer",
sandbox: "iframe",
element: gadget.element.querySelector(".pdf-container")
});
})
.push(function (viewer) {
return viewer.render({
"value": window.location.href + "/P-FDL.Bylaws.Fdl.Website.Version/getData"
});
});
});

}(window, rJS, RSVP));