﻿/* jquery.popUp.min.js
 * Global popUp function
 * Author: Jason Moon
 * Uncompressed: jquery.popUp.js
 */
(function($){var B=null;var C=50;var D=50;var E=location.protocol+'//'+location.hostname;window.popUp=function(b,c,d,f){var g=b;if(b.constructor!=String){var h=$(b).attr('title');if(h===''){h=$(b).text()}b=b.href;g=(h)?h:b}if(((arguments.length>4)&&!arguments[4])||((location.protocol=='https:')&&/^http:/i.test(b))||($('.popup_window_wrapper').length==0)){if(B&&!B.closed){B.close()}B=self.open(b,c,'width='+d+',height='+f+',resizable=yes,status=yes,screenX='+D+',screenY='+C+',top='+C+',left='+D+',scrollbars=yes')}else{var i=($.browser.msie&&($.browser.version<=6));var j=(arguments.length>4)&&arguments[4];var k=(j&&$.fn.overlay)?10003:1003;window.popUp.zIndex=(window.popUp.zIndex)?window.popUp.zIndex+1:k;var l=d;var m=d+52;var n=f+71;var o=f+6;var p=d-10;var q=d;var r=f;if(i){m+=6;l+=4;o+=4;p+=4;q+=4;r+=4}var s='popUp_'+c;var t=function(){window.popUp[c]=false;$('#'+s).slideUp('fast',function(){if(j&&$.fn.overlay){$(this).hideOverlay(function(a){$(a).remove()})}$(this).remove()})};if(window.popUp[c]){var u=$('#'+s)[0];var v=$('.popup_content_iframe',u);var w=$('div.popup_window_wrapper:not([id]) .popup_content_iframe').clone();w.attr({width:v.attr('width'),height:v.attr('height')});v.replaceWith(w[0])}else{var u=$('div.popup_window_wrapper:not([id])').clone().attr('id',s).css({width:m+'px',height:n+'px',top:C+'px',left:D+'px'})[0];$('.popup_title_bar',u).width(l).find('.popup_title_header').width(d).mousedown(function(){$('#'+s).css('z-index',++window.popUp.zIndex);return true});$('a.popup_close_button_link',u).one('click',function(){t();return false});$('.popup_content_wrapper',u).css({width:q+'px',height:r+'px'});var x=$('iframe.popup_content_iframe',u).attr({width:d,height:f}).text();var y={handle:'.popup_title_header',opacity:($.browser.msie)?1:0.85};if($.fn.draggable){$('.popup_title_header',u).css('cursor','move')}$(u).prependTo('body').find('.popup_shadow2,.popup_shadow8').height(o).end().find('.popup_shadow5').width(p);if($.fn.overlay&&(i||j)){if(j&&j.constructor==Boolean){j={css:{backgroundColor:'#FFFFFF',opacity:0.6}}}var z=$.extend(true,{drag:y},{modal:j});$(u).overlay(z).showOverlay()}else{if(j&&!$.fn.overlay&&window.console){console.warn('popUp in modal mode requires the jQuery overlay plugin.')}if($.fn.draggable){$(u).draggable(y)}$(u).show()}window.popUp[c]=true}self.scrollTo(0,0);var A=$('.popup_content_iframe',u)[0].contentWindow;A.document.open();A.document.write(x);A.document.close();if((b.substr(0,E.length)==E)||!/^https?:/i.test(b)){$('.popup_content_iframe',u).one('load',function(){try{var a=this.contentWindow.document.title;if(a!==''){$('.popup_title_header',u).text(a)}this.contentWindow.close=function(){t()}}catch(e){}})}A.location.replace(b);$(u).css('z-index',window.popUp.zIndex).find('.popup_title_header').text(g).attr('title',b)}}})(jQuery);
