(function(G,a,F){var b=a.documentElement,B=G.setTimeout,f=a.getElementsByTagName("script")[0],E={}.toString,c=[],A=0,p=("MozAppearance" in b.style),r=p&&!!a.createRange().compareNode,q=p&&!r,l=r?b:f.parentNode,u=G.opera&&E.call(G.opera)=="[object Opera]",w=("webkitAppearance" in b.style),s=w&&"async" in a.createElement("script"),D=p?"object":(u||s)?"img":"script",C=w?"img":D,m=Array.isArray||function(I){return E.call(I)=="[object Array]"},t=function(I){return Object(I)===I},v=function(I){return typeof I=="string"},o=function(I){return E.call(I)=="[object Function]"},h=[],y={},i,H;function n(I){return(!I||I=="loaded"||I=="complete")}function e(){var I=1,J=-1;while(c.length- ++J){if(c[J].s&&!(I=c[J].r)){break}}I&&d()}function k(J){var K=a.createElement("script"),I;K.src=J.s;K.onreadystatechange=K.onload=function(){if(!I&&n(K.readyState)){I=1;e();K.onload=K.onreadystatechange=null}};B(function(){if(!I){I=1;e()}},H.errorTimeout);J.e?K.onload():f.parentNode.insertBefore(K,f)}function j(K){var J=a.createElement("link"),I;J.href=K.s;J.rel="stylesheet";J.type="text/css";if(!K.e&&(w||p)){var L=function(M){B(function(){if(!I){try{if((w&&M.sheet!==null)||(p&&M.sheet.cssRules.length)){I=1;e()}else{L(M)}}catch(N){if((N.code==1000)||(N.message=="security"||N.message=="denied")){I=1;B(function(){e()},0)}else{L(M)}}}},0)};L(J)}else{J.onload=function(){if(!I){I=1;B(function(){e()},0)}};K.e&&J.onload()}B(function(){if(!I){I=1;e()}},H.errorTimeout);!K.e&&f.parentNode.insertBefore(J,f)}function d(){var I=c.shift();A=1;if(I){if(I.t){B(function(){I.t=="c"?j(I):k(I)},0)}else{I();e()}}else{A=0}}function z(L,R,Q,O,I,K){var N=a.createElement(L),J=0,P={t:Q,s:R,e:K};function M(){if(!J&&n(N.readyState)){P.r=J=1;!A&&e();N.onload=N.onreadystatechange=null;B(function(){l.removeChild(N)},0)}}N.src=N.data=R;!r&&(N.style.display="none");N.width=N.height="0";if(L!="object"){N.type=Q}N.onload=N.onreadystatechange=M;if(L=="img"){N.onerror=M}else{if(L=="script"){N.onerror=function(){P.e=P.r=1;d()}}}c.splice(O,0,P);l.insertBefore(N,r?null:f);B(function(){if(!J){l.removeChild(N);P.r=P.e=J=1;e()}},H.errorTimeout)}function x(K,L,I){var J=(L=="c"?C:D);A=0;L=L||"j";if(v(K)){z(J,K,L,this.i++,b,I)}else{c.splice(this.i++,0,K);c.length==1&&d()}return this}function g(){var I=H;I.loader={load:x,i:0};return I}H=function(N){var J,M,I=this.yepnope.loader;function O(W){var T=W.split("!"),P=h.length,S=T.pop(),U=T.length,V={url:S,origUrl:S,prefixes:T},R,Q;for(Q=0;Q<U;Q++){R=y[T[Q]];if(R){V=R(V)}}for(Q=0;Q<P;Q++){V=h[Q](V)}return V}function L(T,Q,R,S,V){var U=O(T),P=U.autoCallback;if(U.bypass){return}if(Q){Q=o(Q)?Q:Q[T]||Q[S]||Q[(T.split("/").pop().split("?")[0])]}if(U.instead){return U.instead(T,Q,R,S,V)}else{R.load(U.url,((U.forceCSS||(!U.forceJS&&/css$/.test(U.url))))?"c":F,U.noexec);if(o(Q)||o(P)){R.load(function(){g();Q&&Q(U.origUrl,V,S);P&&P(U.origUrl,V,S)})}}}function K(V,S){var W=!!V.test,T=W?V.yep:V.nope,P=V.load||V.both,Q=V.callback,R;function U(X){if(v(X)){L(X,Q,S,0,W)}else{if(t(X)){for(R in X){if(X.hasOwnProperty(R)){L(X[R],Q,S,R,W)}}}}}U(T);U(P);if(V.complete){S.load(V.complete)}}if(v(N)){L(N,0,I,0)}else{if(m(N)){for(J=0;J<N.length;J++){M=N[J];if(v(M)){L(M,0,I,0)}else{if(m(M)){H(M)}else{if(t(M)){K(M,I)}}}}}else{if(t(N)){K(N,I)}}}};H.addPrefix=function(J,I){y[J]=I};H.addFilter=function(I){h.push(I)};H.errorTimeout=10000;if(a.readyState==null&&a.addEventListener){a.readyState="loading";a.addEventListener("DOMContentLoaded",i=function(){a.removeEventListener("DOMContentLoaded",i,0);a.readyState="complete"},0)}G.yepnope=g()})(this,this.document);(function(a){a.addPrefix("css",function(b){b.forceCSS=true;return b})})(this.yepnope);var rezStreamLoader=function(l){var a=[],b={};function p(y){var x=i(y.debug);var w={};if(!m()){w.jQuery=j()+"ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery"+x+".js"}else{q("Using existing jQuery reference. Version: "+jQuery().jquery+" WARNING: jQuery v1.3.2 or higher is required.")}if(!n(y)){w.jQueryUi=j()+"ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui"+x+".js"}else{q("Using existing jQuery UI reference. Version: "+jQuery.ui.version+" WARNING: jQuery UI v1.8 or higher is required.")}if(m()){h(y)}yepnope({load:w,callback:function(B,A,z){if(z==="jQuery"){h(y)}}})}function q(w){if(l.console){l.console.log("RezStream: "+w)}}function m(){return l.jQuery}function n(y){if(!m()){return false}var w=[],x=l.jQuery;if(!x.ui){w.push("jQuery.ui")}else{if(!x.ui.button){w.push("jQuery.ui.button")}if(y.tableElements&&!x.ui.position){w.push("jQuery.ui.position")}}if(!x.widget){w.push("jQuery.widget")}if(w.length>0){q("Missing references: "+w.join(","))}return w.length===0}function h(w){var x="/guest/api/options/loaderfiles/"+f(w)+"?cssPrefix=css!";if(w.tableElements){x+="&includeAvailTable=true"}if(w.debug){x+="&mode=debug"}jQuery.ajax({url:d(x),dataType:"jsonp",cache:true,jsonpCallback:"_jqjspLoaderFiles",success:function(y){b=jQuery.extend({},y);if(!w.tableElements){delete y.availTableCss}yepnope({load:y,complete:function(){t(w);s(w);e()}})}})}function f(z){var w=z.account||z.AccountId;var y=z.property||z.PropertyId;var x=w.toString();if(y){x+="/"+y}return x}function d(w){var x=v();w=w.toLowerCase();if(x&&u(w,x)){w=w.substring(x.length)}if(w.substr(0,1)=="/"){w=w.substr(1)}return k()+w}function u(w,x){return w.substring(0,x.length)===x}function k(){var w=o();var x=v();if(!w||!x){return j()+"rezstream.net/"}return w+x}function o(){return g("rsHost")}function v(){return g("rsVirtualRoot")}function g(x){var w=document.getElementById(x);if(w){return w.value.toLowerCase()}return null}function j(){return document.location.protocol!="https:"?"http://":"https://"}function i(w){return w||document.location.protocol=="file:"?"":".min"}function t(w){if(w.calElements){jQuery(w.calElements).siteCalendar(w)}}function r(w){return jQuery('head link[href*="'+w+'"]').length===1}function s(w){if(w.tableElements){yepnope({test:r("availtable"),nope:b.availTableCss});jQuery(w.tableElements).availtable(w)}}function c(w){a.push(w)}function e(){while(a.length>0){var w=a.shift();if(w){w.call(l.rezStreamLoader)}}}return{load:function(x,w){c(w);p(x)},ready:function(w){c(w)},addCalendar:function(x,w){w.calElements=x;t(w)},addTable:function(x,w){w.tableElements=x;s(w)}}}(this);

