text: /*!
   * SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2013 SAP AG. All rights reserved
   */
  jQuery.sap.declare("sap.suite.ui.commons.PictureZoomIn");jQuery.sap.require("sap.suite.ui.commons.library");jQuery.sap.require("sap.ui.core.Control");sap.ui.core.Control.extend("sap.suite.ui.commons.PictureZoomIn",{metadata:{library:"sap.suite.ui.commons",properties:{"description":{type:"string",group:"Misc",defaultValue:null},"imageSrc":{type:"sap.ui.core.URI",group:"Misc",defaultValue:null}},aggregations:{"busyIndicator":{type:"sap.ui.core.Control",multiple:false}}}});jQuery.sap.require("sap.m.Image");
  sap.suite.ui.commons.PictureZoomIn.prototype.init=function(){var t=this;jQuery(window).resize(function(e){t._calculateImg();});jQuery(document).keyup(function(e){if(e.keyCode==27){t.exit();jQuery.sap.byId(t.getId()).remove();}});if(typeof jQuery(document).tap==="function"){jQuery(document).tap(function(){t.exit();jQuery.sap.byId(t.getId()).remove();});}this._oImage=new sap.m.Image(this.getId()+"-image",{}).addStyleClass("sapSuiteUiCommonsPictureZoomInImg");this._oDescription=new sap.m.Text(this.getId()+"-description",{textAlign:sap.ui.core.TextAlign.Center});this._oDescription.addStyleClass("sapSuiteUiCommonsPictureZoomInDesc");};
  sap.suite.ui.commons.PictureZoomIn.prototype.onBeforeRendering=function(){this._oImage.setSrc(this.getImageSrc());this._oDescription.setText(this.getDescription());};
  sap.suite.ui.commons.PictureZoomIn.prototype._calculateImg=function(){var i=jQuery.sap.domById(this.getId()+"-image");var d=jQuery.sap.byId(this.getId()+"-description");if(!i){return;}var w=jQuery.sap.byId(this.getId());if(i.naturalWidth<w.width()&&i.naturalHeight<w.height()-d.outerHeight(true)){i.style.width=i.naturalWidth+"px";i.style.height=i.naturalHeight+"px";}else if(i.naturalHeight/(w.height()-d.outerHeight(true))>i.naturalWidth/w.width()){i.style.height=""+(98-d.outerHeight(true)*100/w.height())+"%";i.style.width="auto";}else{i.style.width='96%';i.style.height='auto';}var I=jQuery.sap.byId(this.getId()+"-image");var W=w.width();var a=I.width();var b=I.height();if(W>=a){I.css("left",(W-a)/2);}var c=(w.height()-b-d.outerHeight(true))/2;I.css("top",c);d.css("top",c+b);};
  sap.suite.ui.commons.PictureZoomIn.prototype.onAfterRendering=function(){var t=this;var i=jQuery.sap.byId(this.getId()+"-image");var b=jQuery.sap.byId(this.getId()+"-busy");i.hide();if(b.length){b.show();}else{this.setBusy(true);}i.load(function(){if(b.length){b.hide();}else{t.setBusy(false);}i.show();t._calculateImg();});};
  sap.suite.ui.commons.PictureZoomIn.prototype.exit=function(){if(this._oImage){this._oImage.destroy();}if(this._oDescription){this._oDescription.destroy();}};
  