var LiferayJedi=function(){var a=jQuery;return{init:function(){var b=this;b.handleSearchForm();b.dropDownMenu();b.handleLastChild()},handleSearchForm:function(){var d=a("#banner .search");var b=d.find("input[@type=image]");var c=a('<a class="search-input-link" href="javascript:;"></a>');c.click(function(){a(this).parents("form")[0].submit()});b.hide();b.before(c)},handleLastChild:function(){var b=this;a("#footer ul li:last").addClass("last-child")},dropDownMenu:function(){a(".parent-nav-item").hoverIntent({interval:200,timeout:500,over:function(){var b=a(this);var c=a(".child-menu",this);b.addClass("init");c.slideDown(100)},out:function(){var b=a(this);var c=a(".child-menu",this);c.slideUp(50);b.removeClass("init")}});a(".child-menu li").hoverIntent({interval:200,timeout:500,over:function(){var b=a(".grandchild-menu",this);b.show("fast")},out:function(){var b=a(".grandchild-menu",this);b.hide("normal")}})}}}();jQuery(document).ready(function(){LiferayJedi.init()});jQuery(function(G){var H=navigator.userAgent.toLowerCase();var N=(H.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1];var W=(/msie/.test(H)&&!/opera/.test(H)&&parseInt(N)<7);var w=G("body");var ab;var O=false;var J=false;var X;var k;var r={started:false,ready:false,dataReady:false,anim:false,animContent:false,loadingShown:false,transition:false,closing:false,error:false,blocker:null,blockerVars:null,full:null,bg:null,loading:null,tmp:null,content:null,wrapper:null,contentWrapper:null,scripts:new Array(),scriptsShown:new Array()};var V={width:false,height:false};G.fn.nyroModal=function(ac){if(!this){return false}return this.each(function(){if(this.nodeName.toLowerCase()=="form"){G(this).submit(function(ad){if(G(this).data("processing")){return true}if(this.enctype=="multipart/form-data"){b(G.extend(ac,{from:this}));return true}ad.preventDefault();b(G.extend(ac,{from:this}));return false})}else{G(this).click(function(ad){ad.preventDefault();b(G.extend(ac,{from:this}));return false})}})};G.fn.nyroModalManual=function(ac){if(!this.length){b(ac)}return this.each(function(){b(G.extend(ac,{from:this}))})};G.nyroModalManual=function(ac){b(ac)};G.nyroModalSettings=function(ae,ad,ac){Q(ae,ad,ac);if(!ad&&r.started){if(r.bg&&ae.bgColor){ab.updateBgColor(r,ab,function(){})}if(r.contentWrapper&&ae.title){z()}if(((ae.width&&ae.width==ab.width)||(ae.height&&ae.height==ab.height))){if(r.contentWrapper){h(true)}if(r.contentWrapper&&r.contentWrapper.is(":visible")&&!r.animContent){if(J){r.content.css({position:""})}ab.resize(r,ab,function(){if(J){r.content.css({position:"fixed"})}if(G.isFunction(ab.endResize)){ab.endResize(r,ab)}})}}}};G.nyroModalRemove=function(){s()};G.nyroModalNext=function(){var ac=c(1);if(ac){return ac.nyroModalManual(d())}return false};G.nyroModalPrev=function(){var ac=c(-1);if(ac){return ac.nyroModalManual(d())}return false};G.fn.nyroModal.settings={debug:false,blocker:false,modal:false,type:"",from:"",hash:"",processHandler:null,selIndicator:"nyroModalSel",formIndicator:"nyroModal",content:null,bgColor:"#000000",ajax:{},swf:{wmode:"transparent"},width:null,height:null,minWidth:400,minHeight:300,resizable:true,autoSizable:true,padding:25,regexImg:"[^.].(jpg|jpeg|png|tiff|gif|bmp)s*$",defaultImgAlt:"Image",setWidthImgTitle:true,ltr:true,gallery:null,galleryLinks:'<a href="#" class="nyroModalPrev">Prev</a><a href="#"  class="nyroModalNext">Next</a>',css:{bg:{position:"absolute",overflow:"hidden",top:0,left:0,height:"100%",width:"100%"},wrapper:{position:"absolute",top:"50%",left:"50%"},wrapper2:{},content:{overflow:"auto"},loading:{position:"absolute",top:"50%",left:"50%",marginTop:"-50px",marginLeft:"-50px"}},wrap:{div:'<div class="wrapper"></div>',ajax:'<div class="wrapper"></div>',form:'<div class="wrapper"></div>',formData:'<div class="wrapper"></div>',image:'<div class="wrapperImg"></div>',swf:'<div class="wrapperSwf"></div>',iframe:'<div class="wrapperIframe"></div>',iframeForm:'<div class="wrapperIframe"></div>',manual:'<div class="wrapper"></div>'},closeButton:'<a href="#" class="nyroModalClose" id="closeBut" title="close">Close</a>',title:null,titleFromIframe:true,openSelector:".nyroModal",closeSelector:".nyroModalClose",contentLoading:'<a href="#" class="nyroModalClose">Cancel</a>',errorClass:"error",contentError:'The requested content cannot be loaded.<br />Please try again later.<br /><a href="#" class="nyroModalClose">Close</a>',handleError:null,showBackground:I,hideBackground:A,endFillContent:null,showContent:D,endShowContent:null,beforeHideContent:null,hideContent:T,showTransition:f,hideTransition:a,showLoading:m,hideLoading:E,resize:q,endResize:null,updateBgColor:g,endRemove:null};function b(ag){if(r.loadingShown||r.transition||r.anim){return}x("processModal");r.started=true;L(ag);if(!r.full){r.blockerVars=r.blocker=null}r.error=false;r.closing=false;r.dataReady=false;r.scripts=new Array();r.scriptsShown=new Array();ab.type=i();if(G.isFunction(ab.processHandler)){ab.processHandler(ab)}from=ab.from;url=ab.url;if(ab.type=="swf"){ab.resizable=false;Q({overflow:"hidden"},"css","content");ab.content='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ab.width+'" height="'+ab.height+'"><param name="movie" value="'+url+'"></param>';var ad="";G.each(ab.swf,function(ak,al){ab.content+='<param name="'+ak+'" value="'+al+'"></param>';ad+=" "+ak+'="'+al+'"'});ab.content+='<embed src="'+url+'" type="application/x-shockwave-flash" width="'+ab.width+'" height="'+ab.height+'"'+ad+"></embed></object>"}if(from){var af=G(from);if(ab.type=="form"){var ah=G(from).serializeArray();ah.push({name:ab.formIndicator,value:1});if(ab.selector){ah.push({name:ab.selIndicator,value:ab.selector.substring(1)})}G.ajax(G.extend({},ab.ajax,{url:url,data:ah,type:from.method,success:n,error:p}));x("Form Ajax Load: "+af.attr("action"));Y()}else{if(ab.type=="formData"){F();af.attr("target","nyroModalIframe");af.attr("action",url);af.prepend('<input type="hidden" name="'+ab.formIndicator+'" value="1" />');if(ab.selector){af.prepend('<input type="hidden" name="'+ab.selIndicator+'" value="'+ab.selector.substring(1)+'" />')}r.tmp.html('<iframe frameborder="0" hspace="0" name="nyroModalIframe"></iframe>');G("iframe",r.tmp).css({width:ab.width,height:ab.height}).error(p).load(e);x("Form Data Load: "+af.attr("action"));Y();t()}else{if(ab.type=="image"){var ai=af.attr("title")||ab.defaultImgAlt;F();r.tmp.html('<img id="nyroModalImg" />').find("img").attr("alt",ai);x("Image Load: "+url);r.tmp.css({lineHeight:0});G("img",r.tmp).error(p).load(function(){x("Image Loaded: "+this.src);G(this).unbind("load");var ak=r.tmp.width();var al=r.tmp.height();r.tmp.css({lineHeight:""});V.width=ak;V.height=al;Q({width:ak,height:al,imgWidth:ak,imgHeight:al});Q({overflow:"hidden"},"css","content");r.dataReady=true;if(r.loadingShown||r.transition){t()}}).attr("src",url);Y()}else{if(ab.type=="iframeForm"){F();r.tmp.html('<iframe frameborder="0" hspace="0" src="" name="nyroModalIframe" id="nyroModalIframe"></iframe>');x("Iframe Form Load: "+url);G("iframe",r.tmp).eq(0).css({width:"100%",height:G.support.boxModel?"99%":"100%"}).load(function(ak){if(ab.titleFromIframe&&url.indexOf(window.location.hostname)>-1){G.nyroModalSettings({title:G("iframe",r.full).contents().find("title").text()})}});r.dataReady=true;Y()}else{if(ab.type=="iframe"){F();r.tmp.html('<iframe frameborder="0" hspace="0" src="'+url+'" name="nyroModalIframe" id="nyroModalIframe"></iframe>');x("Iframe Load: "+url);G("iframe",r.tmp).eq(0).css({width:"100%",height:G.support.boxModel?"99%":"100%"}).load(function(ak){if(ab.titleFromIframe&&url.indexOf(window.location.hostname)>-1){G.nyroModalSettings({title:G("iframe",r.full).contents().find("title").text()})}});r.dataReady=true;Y()}else{if(ab.type){x("Content: "+ab.type);F();r.tmp.html(ab.content);var ac=r.tmp.width();var ae=r.tmp.height();var aj=G(ab.type);if(aj.length){Q({type:"div"});ac=aj.width();ae=aj.height();if(X){k=X}X=aj;r.tmp.append(aj.contents())}Q({width:ac,height:ae});if(r.tmp.html()){r.dataReady=true}else{p()}if(!r.ready){Y()}else{C()}}else{x("Ajax Load: "+url);Q({type:"ajax"});var ah=ab.ajax.data||{};if(ab.selector){if(typeof ah=="string"){ah+="&"+ab.selIndicator+"="+ab.selector.substring(1)}else{ah[ab.selIndicator]=ab.selector.substring(1)}}G.ajax(G.extend(true,ab.ajax,{url:url,success:n,error:p,data:ah}));Y()}}}}}}}else{if(ab.content){x("Content: "+ab.type);Q({type:"manual"});F();r.tmp.html(G("<div/>").html(ab.content).contents());if(r.tmp.html()){r.dataReady=true}else{p()}Y()}else{}}}function L(ac){x("setDefaultCurrentSettings");ab=G.extend(true,{},G.fn.nyroModal.settings,ac);ab.selector="";ab.borderW=0;ab.borderH=0;ab.resizable=true;P()}function Q(ae,ad,ac){if(r.started){if(ad&&ac){G.extend(true,ab[ad][ac],ae)}else{if(ad){G.extend(true,ab[ad],ae)}else{if(r.animContent){if(ae.width){ae.setWidth=ae.width;delete ae.width;O=true}if(ae.height){ae.setHeight=ae.height;delete ae.height;O=true}}G.extend(true,ab,ae)}}}else{if(ad&&ac){G.extend(true,G.fn.nyroModal.settings[ad][ac],ae)}else{if(ad){G.extend(true,G.fn.nyroModal.settings[ad],ae)}else{G.extend(true,G.fn.nyroModal.settings,ae)}}}}function B(){if(W&&!r.blocker){if(document.documentElement){ab.marginScrollLeft=document.documentElement.scrollLeft;ab.marginScrollTop=document.documentElement.scrollTop}else{ab.marginScrollLeft=document.body.scrollLeft;ab.marginScrollTop=document.body.scrollTop}}else{ab.marginScrollLeft=0;ab.marginScrollTop=0}}function P(){B();ab.marginLeft=-(ab.width+ab.borderW)/2;ab.marginTop=-(ab.height+ab.borderH)/2;if(!r.blocker){ab.marginLeft+=ab.marginScrollLeft;ab.marginTop+=ab.marginScrollTop}}function y(){B();var ac=Z(r.loading);ab.marginTopLoading=-(r.loading.height()+ac.h.border+ac.h.padding)/2;ab.marginLeftLoading=-(r.loading.width()+ac.w.border+ac.w.padding)/2;if(!r.blocker){ab.marginLefttLoading+=ab.marginScrollLeft;ab.marginTopLoading+=ab.marginScrollTop}}function z(){var ac=G("h1#nyroModalTitle",r.contentWrapper);if(ac.length){ac.text(ab.title)}else{r.contentWrapper.prepend('<h1 id="nyroModalTitle">'+ab.title+"</h1>")}}function F(){x("initModal");if(!r.full){if(ab.debug){Q({color:"white"},"css","bg")}var ad={zIndex:100,position:"fixed",top:0,left:0,width:"100%",height:"100%"};var ag=w;var af="";if(ab.blocker){r.blocker=ag=G(ab.blocker);var aj=r.blocker.offset();var ac=r.blocker.outerWidth();var ae=r.blocker.outerHeight();if(W){Q({height:"100%",width:"100%",top:0,left:0},"css","bg")}r.blockerVars={top:aj.top,left:aj.left,width:ac,height:ae};var ai=(/msie/.test(H)?0:K(w.get(0),"borderTopWidth"));var ah=(/msie/.test(H)?0:K(w.get(0),"borderLeftWidth"));ad={position:"absolute",top:aj.top+ai,left:aj.left+ah,width:ac,height:ae}}else{if(W){w.css({height:w.height()+"px",width:w.width()+"px",position:"static",overflow:"hidden"});G("html").css({overflow:"hidden"});Q({css:{bg:{position:"absolute",zIndex:101,height:"110%",width:"110%",top:ab.marginScrollTop+"px",left:ab.marginScrollLeft+"px"},wrapper:{zIndex:102},loading:{zIndex:103}}});af=G('<iframe id="nyroModalIframeHideIe"></iframe>').css(G.extend({},ab.css.bg,{opacity:0,zIndex:50,border:"none"}))}}ag.append(G('<div id="nyroModalFull"><div id="nyroModalBg"></div><div id="nyroModalWrapper"><div id="nyroModalContent"></div></div><div id="nyrModalTmp"></div><div id="nyroModalLoading"></div></div>').hide());r.full=G("#nyroModalFull").css(ad).show();r.bg=G("#nyroModalBg").css(G.extend({backgroundColor:ab.bgColor},ab.css.bg)).before(af);if(!ab.modal){r.bg.click(s)}r.loading=G("#nyroModalLoading").css(ab.css.loading).hide();r.contentWrapper=G("#nyroModalWrapper").css(ab.css.wrapper).hide();r.content=G("#nyroModalContent");r.tmp=G("#nyrModalTmp").hide();if(G.isFunction(G.fn.mousewheel)){r.content.mousewheel(function(al,am){var ak=r.content.get(0);if((am>0&&ak.scrollTop==0)||(am<0&&ak.scrollHeight-ak.scrollTop==ak.clientHeight)){al.preventDefault();al.stopPropagation()}})}G(document).keydown(j);r.content.css({width:"auto",height:"auto"});r.contentWrapper.css({width:"auto",height:"auto"})}}function Y(){x("showModal");if(!r.ready){F();r.anim=true;ab.showBackground(r,ab,M)}else{r.anim=true;r.transition=true;ab.showTransition(r,ab,function(){C();r.anim=false;t()})}}function j(ac){if(ac.keyCode==27){if(!ab.modal){s()}}else{if(ab.gallery&&r.ready&&r.dataReady&&!r.anim&&!r.transition){if(ac.keyCode==39||ac.keyCode==40){ac.preventDefault();G.nyroModalNext();return false}else{if(ac.keyCode==37||ac.keyCode==38){ac.preventDefault();G.nyroModalPrev();return false}}}}}function i(){if(ab.forceType){var ae=ab.forceType;if(!ab.content){ab.from=true}ab.forceType=null;return ae}var aj=ab.from;var ac;if(aj&&aj.nodeName){var ah=G(aj);ab.url=ac=aj.nodeName.toLowerCase()=="form"?ah.attr("action"):aj.href;if(ah.attr("rev")=="modal"){ab.modal=true}ab.title=ah.attr("title");if(aj&&aj.rel){ab.gallery=aj.rel}var ai=S(ac,aj);if(ai){return ai}var ag=false;if(aj.target&&aj.target.toLowerCase()=="_blank"||(aj.hostname&&aj.hostname.replace(/:\d*$/,"")!=window.location.hostname.replace(/:\d*$/,""))){ag=true}if(aj.nodeName.toLowerCase()=="form"){if(ag){return"iframeForm"}Q(u(ac));if(ah.attr("enctype")=="multipart/form-data"){return"formData"}return"form"}if(ag){return"iframe"}}else{ac=ab.url;if(!ab.content){ab.from=true}if(!ac){return null}var ad=new RegExp("^http://","g");if(ac.match(ad)){return"iframe"}}var ai=S(ac,aj);if(ai){return ai}var af=new RegExp("[^.].(swf)s*$","i");if(af.test(ac)){return"swf"}var ae=u(ac);Q(ae);if(!ae.url){return ae.selector}}function S(ac,ae){var ad=new RegExp(ab.regexImg,"i");if(ad.test(ac)){return"image"}}function u(ad){var ac={url:null,selector:null};if(ad){var ag=o(ad);var ah=o(window.location.href);var ae=window.location.href.substring(0,window.location.href.length-ah.length);var af=ad.substring(0,ad.length-ag.length);if(af==ae){ac.selector=ag}else{ac.url=af;ac.selector=ag}}return ac}function p(){x("loadingError");r.error=true;if(!r.ready){return}if(G.isFunction(ab.handleError)){ab.handleError(r,ab)}r.loading.addClass(ab.errorClass).html(ab.contentError);G(ab.closeSelector,r.loading).click(s);y();r.loading.css({marginTop:ab.marginTopLoading+"px",marginLeft:ab.marginLeftLoading+"px"})}function aa(){x("fillContent");if(!r.tmp.html()){return}r.content.html(r.tmp.contents());r.tmp.empty();U();if(ab.type=="iframeForm"){G(ab.from).attr("target","nyroModalIframe").data("processing",1).submit().attr("target","_blank").removeData("processing")}if(G.isFunction(ab.endFillContent)){ab.endFillContent(r,ab)}r.content.append(r.scripts);G(ab.closeSelector,r.contentWrapper).click(s);G(ab.openSelector,r.contentWrapper).nyroModal(d())}function d(){var ac=G.extend(true,{},ab);if(V.width){ac.width=null}if(V.height){ac.height=null}ac.css.content.overflow="auto";return ac}function U(){x("wrapContent");var ag=G(ab.wrap[ab.type]);r.content.append(ag.children().remove());r.contentWrapper.wrapInner(ag);if(ab.gallery){r.content.append(ab.galleryLinks);var af=d();var ad=c(-1);if(ad){var ah=G(".nyroModalPrev",r.contentWrapper).attr("href",ad.attr("href")).click(function(ai){ai.preventDefault();ad.nyroModalManual(af);return false});if(W&&ab.type=="swf"){ah.before(G('<iframe id="nyroModalIframeHideIeGalleryPrev"></iframe>').css({position:ah.css("position"),top:ah.css("top"),left:ah.css("left"),width:ah.width(),height:ah.height(),opacity:0,border:"none"}))}}else{G(".nyroModalPrev",r.contentWrapper).remove()}var ac=c(1);if(ac){var ae=G(".nyroModalNext",r.contentWrapper).attr("href",ac.attr("href")).click(function(ai){ai.preventDefault();ac.nyroModalManual(af);return false});if(W&&ab.type=="swf"){ae.before(G('<iframe id="nyroModalIframeHideIeGalleryNext"></iframe>').css(G.extend({},{position:ae.css("position"),top:ae.css("top"),left:ae.css("left"),width:ae.width(),height:ae.height(),opacity:0,border:"none"})))}}else{G(".nyroModalNext",r.contentWrapper).remove()}}h()}function c(af){if(ab.gallery){if(!ab.ltr){af*=-1}var ad=G('[rel="'+ab.gallery+'"]');var ac=ad.index(ab.from);var ae=ac+af;if(ae>=0&&ae<ad.length){return ad.eq(ae)}}return false}function h(ak){x("calculateSize");if(!r.wrapper){r.wrapper=r.contentWrapper.children(":first")}V.width=false;V.height=false;if(ab.autoSizable&&(!ab.width||!ab.height)){r.contentWrapper.css({opacity:0,width:"auto",height:"auto"}).show();var af={width:"auto",height:"auto"};if(ab.width){af.width=ab.width}else{if(ab.type=="iframe"){af.width=ab.minWidth}}if(ab.height){af.height=ab.height}else{if(ab.type=="iframe"){af.height=ab.minHeight}}r.content.css(af);if(!ab.width){ab.width=r.content.outerWidth(true);V.width=true}if(!ab.height){ab.height=r.content.outerHeight(true);V.height=true}r.contentWrapper.hide().css({opacity:1})}ab.width=Math.max(ab.width,ab.minWidth);ab.height=Math.max(ab.height,ab.minHeight);var ae=Z(r.contentWrapper);var ac=Z(r.wrapper);var aj=Z(r.content);var af={content:{width:ab.width,height:ab.height},wrapper2:{width:ab.width+aj.w.total,height:ab.height+aj.h.total},wrapper:{width:ab.width+aj.w.total+ac.w.total,height:ab.height+aj.h.total+ac.h.total}};if(ab.resizable){var ao=r.blockerVars?r.blockerVars.height:G(window).height()-ae.h.border-(af.wrapper.height-ab.height);var ap=r.blockerVars?r.blockerVars.width:G(window).width()-ae.w.border-(af.wrapper.width-ab.width);ao-=ab.padding*2;ap-=ab.padding*2;if(af.content.height>ao||af.content.width>ap){if(ab.type=="image"){var am=af.content.width-ab.imgWidth;var ag=af.content.height-ab.imgHeight;if(ag<0){ag=0}if(am<0){am=0}var aq=ao-ag;var ad=ap-am;var ai=Math.min(aq/ab.imgHeight,ad/ab.imgWidth);aq=Math.floor(ab.imgHeight*ai);ad=Math.floor(ab.imgWidth*ai);G("img#nyroModalImg",r.content).css({height:aq+"px",width:ad+"px"});af.content.height=aq+ag;af.content.width=ad+am}else{af.content.height=Math.min(af.content.height,ao);af.content.width=Math.min(af.content.width,ap)}af.wrapper2={width:af.content.width+aj.w.total,height:af.content.height+aj.h.total};af.wrapper={width:af.content.width+aj.w.total+ac.w.total,height:af.content.height+aj.h.total+ac.h.total}}}r.content.css(G.extend({},af.content,ab.css.content));r.wrapper.css(G.extend({},af.wrapper2,ab.css.wrapper2));if(!ak){r.contentWrapper.css(G.extend({},af.wrapper,ab.css.wrapper));if(ab.type=="image"){var al=G("img",r.content).attr("alt");G("img",r.content).removeAttr("alt");if(al!=ab.defaultImgAlt){var an=G("<div>"+al+"</div>");r.content.append(an);if(ab.setWidthImgTitle){var ah=Z(an);an.css({width:(af.content.width+aj.w.padding-ah.w.total)+"px"})}}}if(!ab.modal){r.contentWrapper.prepend(ab.closeButton)}}if(ab.title){z()}af.wrapper.borderW=ae.w.border;af.wrapper.borderH=ae.h.border;Q(af.wrapper);P()}function s(ac){x("removeModal");if(ac){ac.preventDefault()}if(r.full&&r.ready){r.ready=false;r.anim=true;r.closing=true;if(r.loadingShown||r.transition){ab.hideLoading(r,ab,function(){r.loading.hide();r.loadingShown=false;r.transition=false;ab.hideBackground(r,ab,R)})}else{if(J){r.content.css({position:""})}r.wrapper.css({overflow:"hidden"});r.content.css({overflow:"hidden"});if(G.isFunction(ab.beforeHideContent)){ab.beforeHideContent(r,ab,function(){ab.hideContent(r,ab,function(){C();ab.hideBackground(r,ab,R)})})}else{ab.hideContent(r,ab,function(){C();ab.hideBackground(r,ab,R)})}}}if(ac){return false}}function t(){x("showContentOrLoading");if(r.ready&&!r.anim){if(r.dataReady){if(r.tmp.html()){r.anim=true;if(r.transition){aa();r.animContent=true;ab.hideTransition(r,ab,function(){r.loading.hide();r.transition=false;r.loadingShown=false;l()})}else{ab.hideLoading(r,ab,function(){r.loading.hide();r.loadingShown=false;aa();y();P();r.animContent=true;ab.showContent(r,ab,l)})}}}else{if(!r.loadingShown&&!r.transition){r.anim=true;r.loadingShown=true;if(r.error){p()}else{r.loading.html(ab.contentLoading)}G(ab.closeSelector,r.loading).click(s);y();ab.showLoading(r,ab,function(){r.anim=false;t()})}}}}function n(ac){x("AjaxLoaded: "+this.url);r.tmp.html(ab.selector?v(G("<div>"+ac+"</div>").find(ab.selector).contents()):v(ac));if(r.tmp.html()){r.dataReady=true;t()}else{p()}}function e(){x("formDataLoaded");var ae=G(ab.from);ae.attr("action",ae.attr("action")+ab.selector);ae.attr("target","");G("input[name="+ab.formIndicator+"]",ab.from).remove();var ad=r.tmp.children("iframe");var ac=ad.unbind("load").contents().find(ab.selector||"body").not("script[src]");ad.attr("src","about:blank");r.tmp.html(ac.html());if(r.tmp.html()){r.dataReady=true;t()}else{p()}}function C(){x("endHideContent");r.anim=false;if(k){k.append(r.content.contents());k=null}else{if(X){X.append(r.content.contents());X=null}}r.content.empty();r.contentWrapper.hide().children().remove().empty().attr("style","").hide();if(r.closing||r.transition){r.contentWrapper.hide()}r.contentWrapper.css(ab.css.wrapper).append(r.content);t()}function R(){x("endRemove");G(document).unbind("keydown",j);r.anim=false;r.full.remove();r.full=null;if(W){w.css({height:"",width:"",position:"",overflow:""});G("html").css({overflow:""})}if(G.isFunction(ab.endRemove)){ab.endRemove(r,ab)}}function M(){x("endBackground");r.ready=true;r.anim=false;t()}function l(){x("endShowContent");r.anim=false;r.animContent=false;r.contentWrapper.css({opacity:""});J=/mozilla/.test(H)&&!/(compatible|webkit)/.test(H)&&parseFloat(N)<1.9&&ab.type!="image";if(J){r.content.css({position:"fixed"})}r.content.append(r.scriptsShown);if(ab.autoSizable&&ab.type=="iframe"){var af=r.content.find("iframe");if(af.length&&af.attr("src").indexOf(window.location.hostname)!==-1){var ac=af.contents().find("body");if(ac.height()>0){var ae=ac.outerHeight(true)+1;var ad=ac.outerWidth(true)+1;G.nyroModalSettings({height:ae,width:ad})}else{af.bind("load",function(){var ag=af.contents().find("body");if(ag.length&&ag.height()>0){var ai=ag.outerHeight(true)+1;var ah=ag.outerWidth(true)+1;G.nyroModalSettings({height:ai,width:ah})}})}}}if(G.isFunction(ab.endShowContent)){ab.endShowContent(r,ab)}if(O){O=false;G.nyroModalSettings({width:ab.setWidth,height:ab.setHeight});delete ab.setWidth;delete ab.setHeight}if(V.width){Q({width:null})}if(V.height){Q({height:null})}}function o(ad){if(typeof ad=="string"){var ac=ad.indexOf("#");if(ac>-1){return ad.substring(ac)}}return""}function v(ad){if(typeof ad=="string"){ad=ad.replace(/<\/?(html|head|body)([^>]*)>/gi,"")}var ac=new Array();G.each(G.clean({0:ad},this.ownerDocument),function(){if(G.nodeName(this,"script")){if(!this.src||G(this).attr("rel")=="forceLoad"){if(G(this).attr("rev")=="shown"){r.scriptsShown.push(this)}else{r.scripts.push(this)}}}else{ac.push(this)}});return ac}function Z(ad){ad=ad.get(0);var ac={h:{margin:K(ad,"marginTop")+K(ad,"marginBottom"),border:K(ad,"borderTopWidth")+K(ad,"borderBottomWidth"),padding:K(ad,"paddingTop")+K(ad,"paddingBottom")},w:{margin:K(ad,"marginLeft")+K(ad,"marginRight"),border:K(ad,"borderLeftWidth")+K(ad,"borderRightWidth"),padding:K(ad,"paddingLeft")+K(ad,"paddingRight")}};ac.h.outer=ac.h.margin+ac.h.border;ac.w.outer=ac.w.margin+ac.w.border;ac.h.inner=ac.h.padding+ac.h.border;ac.w.inner=ac.w.padding+ac.w.border;ac.h.total=ac.h.outer+ac.h.padding;ac.w.total=ac.w.outer+ac.w.padding;return ac}function K(ae,ad){var ac=parseInt(G.curCSS(ae,ad,true));if(isNaN(ac)){ac=0}return ac}function x(ac){if(G.fn.nyroModal.settings.debug||ab&&ab.debug){nyroModalDebug(ac,r,ab||{})}}function I(ad,ac,ae){ad.bg.css({opacity:0}).fadeTo(500,0.75,ae)}function A(ad,ac,ae){ad.bg.fadeOut(300,ae)}function m(ad,ac,ae){ad.loading.css({marginTop:ac.marginTopLoading+"px",marginLeft:ac.marginLeftLoading+"px",opacity:0}).show().animate({opacity:1},{complete:ae,duration:400})}function E(ad,ac,ae){ae()}function D(ad,ac,ae){ad.loading.css({marginTop:ac.marginTopLoading+"px",marginLeft:ac.marginLeftLoading+"px"}).show().animate({width:ac.width+"px",height:ac.height+"px",marginTop:ac.marginTop+"px",marginLeft:ac.marginLeft+"px"},{duration:350,complete:function(){ad.contentWrapper.css({width:ac.width+"px",height:ac.height+"px",marginTop:ac.marginTop+"px",marginLeft:ac.marginLeft+"px"}).show();ad.loading.fadeOut(200,ae)}})}function T(ad,ac,ae){ad.contentWrapper.animate({height:"50px",width:"50px",marginTop:(-(25+ac.borderH)/2+ac.marginScrollTop)+"px",marginLeft:(-(25+ac.borderW)/2+ac.marginScrollLeft)+"px"},{duration:350,complete:function(){ad.contentWrapper.hide();ae()}})}function f(ad,ac,ae){ad.loading.css({marginTop:ad.contentWrapper.css("marginTop"),marginLeft:ad.contentWrapper.css("marginLeft"),height:ad.contentWrapper.css("height"),width:ad.contentWrapper.css("width"),opacity:0}).show().fadeTo(400,1,function(){ad.contentWrapper.hide();ae()})}function a(ad,ac,ae){ad.contentWrapper.hide().css({width:ac.width+"px",height:ac.height+"px",marginLeft:ac.marginLeft+"px",marginTop:ac.marginTop+"px",opacity:1});ad.loading.animate({width:ac.width+"px",height:ac.height+"px",marginLeft:ac.marginLeft+"px",marginTop:ac.marginTop+"px"},{complete:function(){ad.contentWrapper.show();ad.loading.fadeOut(400,function(){ad.loading.hide();ae()})},duration:350})}function q(ad,ac,ae){ad.contentWrapper.animate({width:ac.width+"px",height:ac.height+"px",marginLeft:ac.marginLeft+"px",marginTop:ac.marginTop+"px"},{complete:ae,duration:400})}function g(ad,ac,ae){if(!G.fx.step.backgroundColor){ad.bg.css({backgroundColor:ac.bgColor});ae()}else{ad.bg.animate({backgroundColor:ac.bgColor},{complete:ae,duration:400})}}G(G.fn.nyroModal.settings.openSelector).nyroModal()});function nyroModalDebug(c,b,a){if(b.full){b.bg.prepend(c+"<br />")}};