' +'
'+content+'
' +'');};if(!(this instanceof $)&&typeof(options)!='string'){if(options.ajax){$.ajax({url:options.ajax,type:'get',dataType:'html',success:function(data){var $html=$(data);var title=$html.filter('.'+BREW.Window.UI.titleClass).text();var html=$html.find('#content').html();options.title=title;options.content=html;var $el=createWindow(options);return $el.Window(options);}});}else if(options.iframe){options.iframe=(options.iframe.indexOf('?')!=-1?options.iframe+'&':options.iframe+'?')+'popup';options=$.extend(options,{width:800,open:false,content:''}),$el=createWindow(options);$el.find('iframe').on('load',function(){var doc=this.contentWindow.document,docTitle=doc.title,$body=$('body',doc);$el.Window('open');window.setTimeout(function(){$el.Window('setTitle',docTitle);$el.Window('position');$body.find('a').each(function(){var $this=$(this),href=$this.attr('href'),target=$this.attr('target');if(target!='_blank'&&target!='_parent'&&href&&href.length>0&&href.indexOf('javascript:')!==0&&href.indexOf('#')!==0){$this.attr('href',(href.indexOf('?')!=-1?href+'&':href+'?')+'popup');}});$body.find('form').each(function(){var $this=$(this),action=$this.attr('action');if(action&&action.length>0){$this.attr('action',(action.indexOf('?')!=-1?action+'&':action+'?')+'popup');} $this.on('submit',function(){return true;});});},100);}).on('adjustHeight',function(){var doc=this.contentWindow.document,$body=$('body',doc),height=$body.height(),headerh=$el.find('header').outerHeight(),wh=$(window).height(),bodyh=0,popuph=0;wh=(wh<50)?wh:(wh-50);if((height+headerh)',};}).apply({},[BREW,jQuery,window,document]); BREW.Window.UI={windowClass:'window',headerClass:'window__head',titleClass:'window__title',paneClass:'window__pane',buttonSetClass:'buttons',closeButtonHtml:''+''+''+''+''};