!function(r){if(/^1\.(0|1)\./.test(r.fn.jquery)||/^1\.2\.(0|1|2|3|4|5)/.test(r.fn.jquery))throw"Modal requieres jQuery v1.2.6 or later. You are using v"+r.fn.jquery;r.modal=function(t,e){return this.params=r.extend(this.params,e),this.build(t)},r.modal.version="1.0",r.modal.prototype={params:{width:null,height:null,speed:300,opacity:.9,loader_img:"loader.gif",loader_txt:"loading...",close_img:"close.png",close_txt:"close",on_close:function(){}},ctrl:{box:r(),loader:r(),overlay:r('
'),hidden:r()},build:function(t){this.ctrl.loader=r('
'+this.params.loader_txt+'
'),this.addOverlay();var e=this.getBoxSize(this.ctrl.loading);return this.ctrl.box=this.getBox(this.ctrl.loading,{top:Math.round(r(window).height()/2+r(window).scrollTop()-e.h/2),left:Math.round(r(window).width()/2+r(window).scrollLeft()-e.w/2),visibility:"hidden"}),this.ctrl.overlay.after(this.ctrl.box),null!=t&&(this.updateBox(t),this.data=t),this},updateBox:function(t,e){var i=this;this.hideCloser(),e=r.isFunction(e)?e:function(){};var o=r("div.jq-modal-content",this.ctrl.box);o.empty().append(this.ctrl.loader);var a=this.getBoxSize(t,this.params.width,this.params.height),n=Math.round(r(window).height()/2+r(window).scrollTop()-a.h/2),s=Math.round(r(window).width()/2+r(window).scrollLeft()-a.w/2);this.ctrl.box.css("visibility","visible").animate({top:n<0?0:n,left:s<0?0:s,width:a.w,height:a.h},this.params.speed,function(){i.setContentSize(o,i.params.width,i.params.height),o.empty().append(t).css("opacity",0).fadeTo(i.params.speed,1,function(){e.call(i,o)}),i.showCloser()})},getBox:function(t,e,i,o){var a=r('
').css(r.extend({position:"absolute",top:0,left:0,zIndex:100},e));return null!=t&&r("div.jq-modal-content",a).append(t),this.setContentSize(r("div.jq-modal-content",a),i,o),a},getBoxSize:function(t,e,i){var o=this.getBox(t,{visibility:"hidden"},e,i);this.ctrl.overlay.after(o);var a={w:o.width(),h:o.height()};return o.remove(),o=null,a},setContentSize:function(t,e,i){t.css({width:0'+this.params.close_txt+"");var t=this,e=r("div.jq-modal-closer a",this.ctrl.box);e.css({background:"transparent url("+this.params.close_img+") no-repeat"}).click(function(){return t.removeOverlay(),!1}),document.all&&(e[0].runtimeStyle.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+this.params.close_img+'", sizingMethod="crop")',e[0].runtimeStyle.backgroundImage="none")}},hideCloser:function(){r("div.jq-modal-closer",this.ctrl.box).hide()},addOverlay:function(){var t=this;document.all&&(this.ctrl.hidden=r("select:visible, object:visible, embed:visible").css("visibility","hidden")),this.ctrl.overlay.css({backgroundColor:"#000",position:"absolute",top:0,left:0,zIndex:90,opacity:this.params.opacity}).appendTo("body").dblclick(function(){t.removeOverlay()}),this.resizeOverlay({data:this.ctrl}),r(window).bind("resize.modal",this.ctrl,this.resizeOverlay),r(document).bind("keypress.modal",this,this.keyRemove)},resizeOverlay:function(t){if(t.data.overlay.css({width:r(window).width(),height:r(document).height()}),0");a.append('');var n=d("img:first",t);0'+n.attr("title")+""):t.attr("title")&&a.append(''+t.attr("title")+""),0!=i&&d('prev').appendTo(a),i+1next').appendTo(a);var s=new Image;"visible"==this.modal.ctrl.box.css("visibility")?d("div.jq-modal-content",this.modal.ctrl.box).empty().append(this.modal.ctrl.loader):this.modal.updateBox(this.modal.ctrl.loader),s.onload=function(){e.updateBox(a,function(){var t=d("div.jq-modal-content img",this.ctrl.box);o.navBtnStyle(d("a.jq-modal-next",this.ctrl.box),!0).css("height",t.height()).bind("click",i+1,r),o.navBtnStyle(d("a.jq-modal-prev",this.ctrl.box),!1).css("height",t.height()).bind("click",i-1,r),t.click(function(){o.modal.removeOverlay()}),d(document).bind("keypress.modalImage",l)}),this.onload=function(){}},s.src=t.attr("href");var r=function(t){return o.showImage(t.data),!1},l=function(t){var e=String.fromCharCode(t.which).toLowerCase();("n"==e||39==t.keyCode)&&i+1').css({border:"none",width:e,height:i}),new a.modal(iframe,o)},a.fn.modalWeb=function(t,e,i){this.click(function(){return null!=this.href&&a.modalWeb(this.href,t,e,i),!1})}}(jQuery),function(h){h.fn.jqm=function(t){var e={overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:p,ajaxText:"",target:p,modal:p,toTop:p,onShow:p,onHide:p,onLoad:p,data:p};return this.each(function(){if(this._jqm)return c[this._jqm].c=h.extend({},c[this._jqm].c,t);i++,this._jqm=i,c[i]={c:h.extend(e,h.jqm.params,t),a:p,w:h(this).addClass("jqmID"+i),s:i},e.trigger&&h(this).jqmAddTrigger(e.trigger)})},h.fn.jqmAddClose=function(t){return n(this,t,"jqmHide")},h.fn.jqmAddTrigger=function(t){return n(this,t,"jqmShow")},h.fn.jqmShow=function(t){return this.each(function(){h.jqm.open(this._jqm,t)})},h.fn.jqmHide=function(t){return this.each(function(){h.jqm.close(this._jqm,t)})},h.jqm={hash:{},open:function(t,e){var i=c[t],o=i.c,a="."+o.closeClass,n=0<(n=parseInt(i.w.css("z-index")))?n:5e3,s=h("
").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":n-1,opacity:o.overlay/100});if(i.a)return p;if(i.t=e,i.a=!0,i.w.css("z-index",n),o.modal?(m[0]||v("bind"),m.push(t)):0').insertAfter(i.o),o.onShow?o.onShow(i):i.w.show(),f(i),p},close:function(t){var e=c[t];return e.a&&(e.a=p,m[0]&&(m.pop(),m[0]||v("unbind")),e.c.toTop&&e.o&&h("#jqmP"+e.w[0]._jqm).after(e.w).remove(),e.c.onHide?e.c.onHide(e):(e.w.hide(),e.o&&e.o.remove())),p},params:{}};var i=0,c=h.jqm.hash,m=[],u=h.browser.msie&&"6.0"==h.browser.version&&!window.XMLHttpRequest,p=!1,e=h('').css({opacity:0}),f=function(t){u&&(t.o?t.o.html('

').prepend(e):h("iframe.jqm",t.w)[0]||t.w.prepend(e)),o(t)},o=function(t){try{h(":input:visible",t.w)[0].focus()}catch(t){}},v=function(t){h()[t]("keypress",a)[t]("keydown",a)[t]("mousedown",a)},a=function(t){var e=c[m[m.length-1]],i=!h(t.target).parents(".jqmID"+e.s)[0];return i&&o(e),!i},n=function(t,e,i){return t.each(function(){var t=this._jqm;h(e).each(function(){this[i]||(this[i]=[],h(this).click(function(){for(var t in{jqmShow:1,jqmHide:1})for(var e in this[t])c[this[t][e]]&&c[this[t][e]].w[t](this);return p})),this[i].push(t)})})}}(jQuery);