-
Notifications
You must be signed in to change notification settings - Fork 1
/
global.js
34 lines (29 loc) · 52.9 KB
/
global.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Shadowbox.init();
$('.photo-image a').live('click', function (e) {
Shadowbox.setup(jQuery('.photo-image a'));
Shadowbox.open(this);
//Stops loading link
e.preventDefault();
});
$(window).scroll(function () {
if ($(window).scrollTop() + $(window).height() == $(document).height()) {
// call feed.next() once the page reaches the bottom
instaFeed.next();
}
});
// create two separate instances of Instafeed
var instaFeed = new Instafeed({
get: 'user',
userId: user_id,
accessToken: token,
limit: limit,
sortBy: sort_by,
resolution: 'standard_resolution',
template: '<div class="photo-all"><div class="photo-image"><a href="{{model.images.standard_resolution.url}}" rel="shadowbox[gal]" title="{{caption}} <span>Username: {{model.user.username}}</span>"><div class="bgimg" style="background:url({{model.images.standard_resolution.url}}) no-repeat center center; background-size:cover;"></div></a></div><div class="photo-caption"><div class="photo-likes"><a href="{{link}}" target="_blank">{{likes}}</a></div><div class="ffix"></div></div><div class="instalogo"><a href="{{link}}" target="_blank"><span>{{model.user.username}}<img src="{{model.user.profile_picture}}" class="owner_profile_picture" /></span></a></div></div>'
});
instaFeed.run();
//instafeed
// Generated by CoffeeScript 1.9.3
(function(){var e;e=function(){function e(e,t){var n,r;this.options={target:"instafeed",get:"popular",resolution:"thumbnail",sortBy:"none",links:!0,mock:!1,useHttp:!1};if(typeof e=="object")for(n in e)r=e[n],this.options[n]=r;this.context=t!=null?t:this,this.unique=this._genKey()}return e.prototype.hasNext=function(){return typeof this.context.nextUrl=="string"&&this.context.nextUrl.length>0},e.prototype.next=function(){return this.hasNext()?this.run(this.context.nextUrl):!1},e.prototype.run=function(t){var n,r,i;if(typeof this.options.clientId!="string"&&typeof this.options.accessToken!="string")throw new Error("Missing clientId or accessToken.");if(typeof this.options.accessToken!="string"&&typeof this.options.clientId!="string")throw new Error("Missing clientId or accessToken.");return this.options.before!=null&&typeof this.options.before=="function"&&this.options.before.call(this),typeof document!="undefined"&&document!==null&&(i=document.createElement("script"),i.id="instafeed-fetcher",i.src=t||this._buildUrl(),n=document.getElementsByTagName("head"),n[0].appendChild(i),r="instafeedCache"+this.unique,window[r]=new e(this.options,this),window[r].unique=this.unique),!0},e.prototype.parse=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D;if(typeof e!="object"){if(this.options.error!=null&&typeof this.options.error=="function")return this.options.error.call(this,"Invalid JSON data"),!1;throw new Error("Invalid JSON response")}if(e.meta.code!==200){if(this.options.error!=null&&typeof this.options.error=="function")return this.options.error.call(this,e.meta.error_message),!1;throw new Error("Error from Instagram: "+e.meta.error_message)}if(e.data.length===0){if(this.options.error!=null&&typeof this.options.error=="function")return this.options.error.call(this,"No images were returned from Instagram"),!1;throw new Error("No images were returned from Instagram")}this.options.success!=null&&typeof this.options.success=="function"&&this.options.success.call(this,e),this.context.nextUrl="",e.pagination!=null&&(this.context.nextUrl=e.pagination.next_url);if(this.options.sortBy!=="none"){this.options.sortBy==="random"?M=["","random"]:M=this.options.sortBy.split("-"),O=M[0]==="least"?!0:!1;switch(M[1]){case"random":e.data.sort(function(){return.5-Math.random()});break;case"recent":e.data=this._sortBy(e.data,"created_time",O);break;case"liked":e.data=this._sortBy(e.data,"likes.count",O);break;case"commented":e.data=this._sortBy(e.data,"comments.count",O);break;default:throw new Error("Invalid option for sortBy: '"+this.options.sortBy+"'.")}}if(typeof document!="undefined"&&document!==null&&this.options.mock===!1){m=e.data,A=parseInt(this.options.limit,10),this.options.limit!=null&&m.length>A&&(m=m.slice(0,A)),u=document.createDocumentFragment(),this.options.filter!=null&&typeof this.options.filter=="function"&&(m=this._filter(m,this.options.filter));if(this.options.template!=null&&typeof this.options.template=="string"){f="",d="",w="",D=document.createElement("div");for(c=0,N=m.length;c<N;c++){h=m[c],p=h.images[this.options.resolution];if(typeof p!="object")throw o="No image found for resolution: "+this.options.resolution+".",new Error(o);E=p.width,y=p.height,b="square",E>y&&(b="landscape"),E<y&&(b="portrait"),v=p.url,l=window.location.protocol.indexOf("http")>=0,l&&!this.options.useHttp&&(v=v.replace(/https?:\/\//,"//")),d=this._makeTemplate(this.options.template,{model:h,id:h.id,link:h.link,type:h.type,image:v,width:E,height:y,orientation:b,caption:this._getObjectProperty(h,"caption.text"),likes:h.likes.count,comments:h.comments.count,location:this._getObjectProperty(h,"location.name")}),f+=d}D.innerHTML=f,i=[],r=0,n=D.childNodes.length;while(r<n)i.push(D.childNodes[r]),r+=1;for(x=0,C=i.length;x<C;x++)L=i[x],u.appendChild(L)}else for(T=0,k=m.length;T<k;T++){h=m[T],g=document.createElement("img"),p=h.images[this.options.resolution];if(typeof p!="object")throw o="No image found for resolution: "+this.options.resolution+".",new Error(o);v=p.url,l=window.location.protocol.indexOf("http")>=0,l&&!this.options.useHttp&&(v=v.replace(/https?:\/\//,"//")),g.src=v,this.options.links===!0?(t=document.createElement("a"),t.href=h.link,t.appendChild(g),u.appendChild(t)):u.appendChild(g)}_=this.options.target,typeof _=="string"&&(_=document.getElementById(_));if(_==null)throw o='No element with id="'+this.options.target+'" on page.',new Error(o);_.appendChild(u),a=document.getElementsByTagName("head")[0],a.removeChild(document.getElementById("instafeed-fetcher")),S="instafeedCache"+this.unique,window[S]=void 0;try{delete window[S]}catch(P){s=P}}return this.options.after!=null&&typeof this.options.after=="function"&&this.options.after.call(this),!0},e.prototype._buildUrl=function(){var e,t,n;e="https://api.instagram.com/v1";switch(this.options.get){case"popular":t="media/popular";break;case"tagged":if(!this.options.tagName)throw new Error("No tag name specified. Use the 'tagName' option.");t="tags/"+this.options.tagName+"/media/recent";break;case"location":if(!this.options.locationId)throw new Error("No location specified. Use the 'locationId' option.");t="locations/"+this.options.locationId+"/media/recent";break;case"user":if(!this.options.userId)throw new Error("No user specified. Use the 'userId' option.");t="users/"+this.options.userId+"/media/recent";break;default:throw new Error("Invalid option for get: '"+this.options.get+"'.")}return n=e+"/"+t,this.options.accessToken!=null?n+="?access_token="+this.options.accessToken:n+="?client_id="+this.options.clientId,this.options.limit!=null&&(n+="&count="+this.options.limit),n+="&callback=instafeedCache"+this.unique+".parse",n},e.prototype._genKey=function(){var e;return e=function(){return((1+Math.random())*65536|0).toString(16).substring(1)},""+e()+e()+e()+e()},e.prototype._makeTemplate=function(e,t){var n,r,i,s,o;r=/(?:\{{2})([\w\[\]\.]+)(?:\}{2})/,n=e;while(r.test(n))s=n.match(r)[1],o=(i=this._getObjectProperty(t,s))!=null?i:"",n=n.replace(r,function(){return""+o});return n},e.prototype._getObjectProperty=function(e,t){var n,r;t=t.replace(/\[(\w+)\]/g,".$1"),r=t.split(".");while(r.length){n=r.shift();if(!(e!=null&&n in e))return null;e=e[n]}return e},e.prototype._sortBy=function(e,t,n){var r;return r=function(e,r){var i,s;return i=this._getObjectProperty(e,t),s=this._getObjectProperty(r,t),n?i>s?1:-1:i<s?1:-1},e.sort(r.bind(this)),e},e.prototype._filter=function(e,t){var n,r,i,s,o;n=[],r=function(e){if(t(e))return n.push(e)};for(i=0,o=e.length;i<o;i++)s=e[i],r(s);return n},e}(),function(e,t){return typeof define=="function"&&define.amd?define([],t):typeof module=="object"&&module.exports?module.exports=t():e.Instafeed=t()}(this,function(){return e})}).call(this);
//shadowbox
!function(e,t){function n(){for(var e,t,n,i,r,o,a,s,l=$.errorInfo,c=$.plugins,u=0;u<$.gallery.length;++u){switch(e=$.gallery[u],t=!1,n=null,e.player){case"flv":case"swf":c.fla||(n="fla");break;case"qt":c.qt||(n="qt");break;case"wmp":$.isMac?c.qt&&c.f4m?e.player="qt":n="qtf4m":c.wmp||(n="wmp");break;case"qtwmp":c.qt?e.player="qt":c.wmp?e.player="wmp":n="qtwmp"}if(n)if("link"==$.options.handleUnsupported){switch(n){case"qtf4m":r="shared",o=[l.qt.url,l.qt.name,l.f4m.url,l.f4m.name];break;case"qtwmp":r="either",o=[l.qt.url,l.qt.name,l.wmp.url,l.wmp.name];break;default:r="single",o=[l[n].url,l[n].name]}e.player="html",e.content='<div class="sb-message">'+f($.lang.errors[r],o)+"</div>"}else t=!0;else"inline"==e.player?(i=U.exec(e.content))&&(a=p(i[1]))?e.content=a.innerHTML:t=!0:"swf"!=e.player&&"flv"!=e.player||(s=e.options&&e.options.flashVersion||$.options.flashVersion,$.flash&&!$.flash.hasFlashPlayerVersion(s)&&(e.width=310,e.height=177));t&&($.gallery.splice(u,1),u<$.current?--$.current:u==$.current&&($.current=u>0?u-1:u),--u)}}function i(e){$.options.enableKeys&&(e?b:x)(document,"keydown",r)}function r(e){if(!(e.metaKey||e.shiftKey||e.altKey||e.ctrlKey)){var t;switch(w(e)){case 81:case 88:case 27:t=$.close;break;case 37:t=$.previous;break;case 39:t=$.next;break;case 32:t="number"==typeof X?$.pause:$.play}t&&(g(e),t())}}function o(e){i(!1);var t=$.getCurrent(),n="inline"==t.player?"html":t.player;if("function"!=typeof $[n])throw"unknown player "+n;if(e&&($.player.remove(),$.revertOptions(),$.applyOptions(t.options||{})),$.player=new $[n](t,$.playerId),$.gallery.length>1){var r=$.gallery[$.current+1]||$.gallery[0];"img"==r.player&&((new Image).src=r.content);var o=$.gallery[$.current-1]||$.gallery[$.gallery.length-1];"img"==o.player&&((new Image).src=o.content)}$.skin.onLoad(e,a)}function a(){if(Z)if(void 0!==$.player.ready)var e=setInterval(function(){Z?$.player.ready&&(clearInterval(e),e=null,$.skin.onReady(s)):(clearInterval(e),e=null)},10);else $.skin.onReady(s)}function s(){Z&&($.player.append($.skin.body,$.dimensions),$.skin.onShow(l))}function l(){Z&&($.player.onLoad&&$.player.onLoad(),$.options.onFinish($.getCurrent()),$.isPaused()||$.play(),i(!0))}function c(){return(new Date).getTime()}function u(e,t){for(var n in t)e[n]=t[n];return e}function d(e,t){for(var n=0,i=e.length,r=e[0];n<i&&!1!==t.call(r,n,r);r=e[++n]);}function f(e,t){return e.replace(/\{(\w+?)\}/g,function(e,n){return t[n]})}function h(){}function p(e){return document.getElementById(e)}function v(e){e.parentNode.removeChild(e)}function m(){var e=document.body,t=document.createElement("div");ie="string"==typeof t.style.opacity,t.style.position="fixed",t.style.margin=0,t.style.top="20px",e.appendChild(t,e.firstChild),re=20==t.offsetTop,e.removeChild(t)}function y(e){return[e.pageX,e.pageY]}function g(e){e.preventDefault()}function w(e){return e.keyCode}function b(e,t,n){jQuery(e).bind(t,n)}function x(e,t,n){jQuery(e).unbind(t,n)}function C(){if(!ae){try{document.documentElement.doScroll("left")}catch(e){return void setTimeout(C,1)}$.load()}}function k(){if("complete"===document.readyState)return $.load();if(document.addEventListener)document.addEventListener("DOMContentLoaded",oe,!1),e.addEventListener("load",$.load,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",oe),e.attachEvent("onload",$.load);var t=!1;try{t=null===e.frameElement}catch(e){}document.documentElement.doScroll&&t&&C()}}function S(e){$.open(this),$.gallery.length&&g(e)}function T(){pe={x:0,y:0,startX:null,startY:null}}function I(){var e=$.dimensions;u(ve.style,{height:e.innerHeight+"px",width:e.innerWidth+"px"})}function E(){T();var e=["position:absolute","cursor:"+($.isGecko?"-moz-grab":"move"),"background-color:"+($.isIE?"#fff;filter:alpha(opacity=0)":"transparent")].join(";");$.appendHTML($.skin.body,'<div id="'+ye+'" style="'+e+'"></div>'),ve=p(ye),I(),b(ve,"mousedown",A)}function O(){ve&&(x(ve,"mousedown",A),v(ve),ve=null),me=null}function A(e){g(e);var t=y(e);pe.startX=t[0],pe.startY=t[1],me=p($.player.id),b(document,"mousemove",N),b(document,"mouseup",L),$.isGecko&&(ve.style.cursor="-moz-grabbing")}function N(e){var t=$.player,n=$.dimensions,i=y(e),r=i[0]-pe.startX;pe.startX+=r,pe.x=Math.max(Math.min(0,pe.x+r),n.innerWidth-t.width);var o=i[1]-pe.startY;pe.startY+=o,pe.y=Math.max(Math.min(0,pe.y+o),n.innerHeight-t.height),u(me.style,{left:pe.x+"px",top:pe.y+"px"})}function L(){x(document,"mousemove",N),x(document,"mouseup",L),$.isGecko&&(ve.style.cursor="-moz-grab")}function M(e,t,n,i,r){var o="opacity"==t,a=o?$.setOpacity:function(e,n){e.style[t]=n+"px"};if(0==i||!o&&!$.options.animate||o&&!$.options.animateFade)return a(e,n),void(r&&r());var s=parseFloat($.getStyle(e,t))||0,l=n-s;if(0!=l){i*=1e3;var u,d=c(),f=$.ease,h=d+i,p=setInterval(function(){(u=c())>=h?(clearInterval(p),p=null,a(e,n),r&&r()):a(e,s+f((u-d)/i)*l)},10)}else r&&r()}function F(){we.style.height=$.getWindowSize("Height")+"px",we.style.width=$.getWindowSize("Width")+"px"}function j(){we.style.top=document.documentElement.scrollTop+"px",we.style.left=document.documentElement.scrollLeft+"px"}function D(e){e?d(ke,function(e,t){t[0].style.visibility=t[1]||""}):(ke=[],d($.options.troubleElements,function(e,t){d(document.getElementsByTagName(t),function(e,t){ke.push([t,t.style.visibility]),t.style.visibility="hidden"})}))}function H(e,t){var n=p("sb-nav-"+e);n&&(n.style.display=t?"":"none")}function P(e,t){var n=p("sb-loading"),i=$.getCurrent().player,r="img"==i||"html"==i;if(e){$.setOpacity(n,0),n.style.display="block";o=function(){$.clearOpacity(n),t&&t()};r?M(n,"opacity",1,$.options.fadeDuration,o):o()}else{var o=function(){n.style.display="none",$.clearOpacity(n),t&&t()};r?M(n,"opacity",0,$.options.fadeDuration,o):o()}}function W(e){var t=$.getCurrent();p("sb-title-inner").innerHTML=t.title||"";var n,i,r,o,a;$.options.displayNav?(n=!0,(l=$.gallery.length)>1&&($.options.continuous?i=a=!0:(i=l-1>$.current,a=$.current>0)),$.options.slideshowDelay>0&&$.hasNext()&&(r=!(o=!$.isPaused()))):n=i=r=o=a=!1,H("close",n),H("next",i),H("play",r),H("pause",o),H("previous",a);var s="";if($.options.displayCounter&&$.gallery.length>1){var l=$.gallery.length;if("skip"==$.options.counterType){var c=0,u=l,d=parseInt($.options.counterLimit)||0;if(d<l&&d>2){var f=Math.floor(d/2);(c=$.current-f)<0&&(c+=l),(u=$.current+(d-f))>l&&(u-=l)}for(;c!=u;)c==l&&(c=0),s+='<a onclick="Shadowbox.change('+c+');"',c==$.current&&(s+=' class="sb-counter-current"'),s+=">"+ ++c+"</a>"}else s=[$.current+1,$.lang.of,l].join(" ")}p("sb-counter").innerHTML=s,e()}function z(e){var t=p("sb-title-inner"),n=p("sb-info-inner");t.style.visibility=n.style.visibility="",""!=t.innerHTML&&M(t,"marginTop",0,.35),M(n,"marginTop",0,.35,e)}function B(e,t){var n=p("sb-title"),i=p("sb-info"),r=n.offsetHeight,o=i.offsetHeight,a=p("sb-title-inner"),s=p("sb-info-inner"),l=e?.35:0;M(a,"marginTop",r,l),M(s,"marginTop",-1*o,l,function(){a.style.visibility=s.style.visibility="hidden",t()})}function q(e,t,n,i){var r=p("sb-wrapper-inner"),o=n?$.options.resizeDuration:0;M(xe,"top",t,o),M(r,"height",e,o,i)}function R(e,t,n,i){var r=n?$.options.resizeDuration:0;M(xe,"left",t,r),M(xe,"width",e,r,i)}function V(e,t){var n=p("sb-body-inner"),e=parseInt(e),t=parseInt(t),i=xe.offsetHeight-n.offsetHeight,r=xe.offsetWidth-n.offsetWidth,o=be.offsetHeight,a=be.offsetWidth,s=parseInt($.options.viewportPadding)||20,l=$.player&&"drag"!=$.options.handleOversize;return $.setDimensions(e,t,o,a,i,r,s,l)}var $={version:"3.0.3"},G=navigator.userAgent.toLowerCase();G.indexOf("windows")>-1||G.indexOf("win32")>-1?$.isWindows=!0:G.indexOf("macintosh")>-1||G.indexOf("mac os x")>-1?$.isMac=!0:G.indexOf("linux")>-1&&($.isLinux=!0),$.isIE=G.indexOf("msie")>-1,$.isIE6=G.indexOf("msie 6")>-1,$.isIE7=G.indexOf("msie 7")>-1,$.isGecko=G.indexOf("gecko")>-1&&-1==G.indexOf("safari"),$.isWebKit=G.indexOf("applewebkit/")>-1;var Q,X,U=/#(.+)$/,_=/^(light|shadow)box\[(.*?)\]/i,K=/\s*([a-z_]*?)\s*=\s*(.+)\s*/,Y=/[0-9a-z]+$/i,J=/(.+\/)shadowbox\.js/i,Z=!1,ee=!1,te={},ne=0;$.current=-1,$.dimensions=null,$.ease=function(e){return 1+Math.pow(e-1,3)},$.errorInfo={fla:{name:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTime",url:"http://www.apple.com/quicktime/download/"},wmp:{name:"Windows Media Player",url:"http://www.microsoft.com/windows/windowsmedia/"},f4m:{name:"Flip4Mac",url:"http://www.flip4mac.com/wmv_download.htm"}},$.gallery=[],$.onReady=h,$.path=null,$.player=null,$.playerId="sb-player",$.options={animate:!0,animateFade:!0,autoplayMovies:!0,continuous:!1,enableKeys:!0,flashParams:{bgcolor:"#000000",allowfullscreen:!0},flashVars:{},flashVersion:"9.0.115",handleOversize:"resize",handleUnsupported:"link",onChange:h,onClose:h,onFinish:h,onOpen:h,showMovieControls:!0,skipSetup:!1,slideshowDelay:0,viewportPadding:20},$.getCurrent=function(){return $.current>-1?$.gallery[$.current]:null},$.hasNext=function(){return $.gallery.length>1&&($.current!=$.gallery.length-1||$.options.continuous)},$.isOpen=function(){return Z},$.isPaused=function(){return"pause"==X},$.applyOptions=function(e){te=u({},$.options),u($.options,e)},$.revertOptions=function(){u($.options,te)},$.init=function(e,t){if(!ee){if(ee=!0,$.skin.options&&u($.options,$.skin.options),e&&u($.options,e),!$.path)for(var n,i=document.getElementsByTagName("script"),r=0,o=i.length;r<o;++r)if(n=J.exec(i[r].src)){$.path=n[1];break}t&&($.onReady=t),k()}},$.open=function(e){if(!Z){var t=$.makeGallery(e);if($.gallery=t[0],$.current=t[1],null!=(e=$.getCurrent())&&($.applyOptions(e.options||{}),n(),$.gallery.length)){if(e=$.getCurrent(),!1===$.options.onOpen(e))return;Z=!0,$.skin.onOpen(e,o)}}},$.close=function(){Z&&(Z=!1,$.player&&($.player.remove(),$.player=null),"number"==typeof X&&(clearTimeout(X),X=null),ne=0,i(!1),$.options.onClose($.getCurrent()),$.skin.onClose(),$.revertOptions())},$.play=function(){$.hasNext()&&(ne||(ne=1e3*$.options.slideshowDelay),ne&&(Q=c(),X=setTimeout(function(){ne=Q=0,$.next()},ne),$.skin.onPlay&&$.skin.onPlay()))},$.pause=function(){"number"==typeof X&&(ne=Math.max(0,ne-(c()-Q)))&&(clearTimeout(X),X="pause",$.skin.onPause&&$.skin.onPause())},$.change=function(e){if(!(e in $.gallery)){if(!$.options.continuous)return;if(!((e=e<0?$.gallery.length+e:0)in $.gallery))return}$.current=e,"number"==typeof X&&(clearTimeout(X),X=null,ne=Q=0),$.options.onChange($.getCurrent()),o(!0)},$.next=function(){$.change($.current+1)},$.previous=function(){$.change($.current-1)},$.setDimensions=function(e,t,n,i,r,o,a,s){var l=e,c=t,u=2*a+r;e+u>n&&(e=n-u);var d=2*a+o;t+d>i&&(t=i-d);var f=(l-e)/l,h=(c-t)/c,p=f>0||h>0;return s&&p&&(f>h?t=Math.round(c/l*e):h>f&&(e=Math.round(l/c*t))),$.dimensions={height:e+r,width:t+o,innerHeight:e,innerWidth:t,top:Math.floor((n-(e+u))/2+a),left:Math.floor((i-(t+d))/2+a),oversized:p},$.dimensions},$.makeGallery=function(e){var t=[],n=-1;if("string"==typeof e&&(e=[e]),"number"==typeof e.length)d(e,function(e,n){n.content?t[e]=n:t[e]={content:n}}),n=0;else{if(e.tagName){var i=$.getCache(e);e=i||$.makeObject(e)}if(e.gallery){t=[];var r;for(var o in $.cache)(r=$.cache[o]).gallery&&r.gallery==e.gallery&&(-1==n&&r.content==e.content&&(n=t.length),t.push(r));-1==n&&(t.unshift(e),n=0)}else t=[e],n=0}return d(t,function(e,n){t[e]=u({},n)}),[t,n]},$.makeObject=function(e,t){var n={content:e.href,title:e.getAttribute("title")||"",link:e};t?(t=u({},t),d(["player","title","height","width","gallery"],function(e,i){void 0!==t[i]&&(n[i]=t[i],delete t[i])}),n.options=t):n.options={},n.player||(n.player=$.getPlayer(n.content));var i=e.getAttribute("rel");if(i){var r=i.match(_);r&&(n.gallery=escape(r[2])),d(i.split(";"),function(e,t){(r=t.match(K))&&(n[r[1]]=r[2])})}return n},$.getPlayer=function(e){if(e.indexOf("#")>-1&&0==e.indexOf(document.location.href))return"inline";var t=e.indexOf("?");t>-1&&(e=e.substring(0,t));var n,i=e.match(Y);if(i&&(n=i[0].toLowerCase()),n){if($.img&&$.img.ext.indexOf(n)>-1)return"img";if($.swf&&$.swf.ext.indexOf(n)>-1)return"swf";if($.flv&&$.flv.ext.indexOf(n)>-1)return"flv";if($.qt&&$.qt.ext.indexOf(n)>-1)return $.wmp&&$.wmp.ext.indexOf(n)>-1?"qtwmp":"qt";if($.wmp&&$.wmp.ext.indexOf(n)>-1)return"wmp"}return"iframe"},Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n=this.length>>>0;for((t=t||0)<0&&(t+=n);t<n;++t)if(t in this&&this[t]===e)return t;return-1});var ie=!0,re=!0;$.getStyle=function(){var e=/opacity=([^)]*)/,t=document.defaultView&&document.defaultView.getComputedStyle;return function(n,i){var r;if(!ie&&"opacity"==i&&n.currentStyle)return r=e.test(n.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"",""===r?"1":r;if(t){var o=t(n,null);o&&(r=o[i]),"opacity"==i&&""==r&&(r="1")}else r=n.currentStyle[i];return r}}(),$.appendHTML=function(e,t){if(e.insertAdjacentHTML)e.insertAdjacentHTML("BeforeEnd",t);else if(e.lastChild){var n=e.ownerDocument.createRange();n.setStartAfter(e.lastChild);var i=n.createContextualFragment(t);e.appendChild(i)}else e.innerHTML=t},$.getWindowSize=function(e){return"CSS1Compat"===document.compatMode?document.documentElement["client"+e]:document.body["client"+e]},$.setOpacity=function(e,t){var n=e.style;ie?n.opacity=1==t?"":t:(n.zoom=1,1==t?"string"==typeof n.filter&&/alpha/i.test(n.filter)&&(n.filter=n.filter.replace(/\s*[\w\.]*alpha\([^\)]*\);?/gi,"")):n.filter=(n.filter||"").replace(/\s*[\w\.]*alpha\([^\)]*\)/gi,"")+" alpha(opacity="+100*t+")")},$.clearOpacity=function(e){$.setOpacity(e,1)},jQuery.fn.shadowbox=function(e){return this.each(function(){var t=jQuery(this),n=jQuery.extend({},e||{},jQuery.metadata?t.metadata():jQuery.meta?t.data():{}),i=this.className||"";n.width=parseInt((i.match(/w:(\d+)/)||[])[1])||n.width,n.height=parseInt((i.match(/h:(\d+)/)||[])[1])||n.height,Shadowbox.setup(t,n)})};var oe,ae=!1;if(document.addEventListener?oe=function(){document.removeEventListener("DOMContentLoaded",oe,!1),$.load()}:document.attachEvent&&(oe=function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",oe),$.load())}),$.load=function(){if(!ae){if(!document.body)return setTimeout($.load,13);ae=!0,m(),$.onReady(),$.options.skipSetup||$.setup(),$.skin.init()}},$.plugins={},navigator.plugins&&navigator.plugins.length){var se=[];d(navigator.plugins,function(e,t){se.push(t.name)});var le=(se=se.join(",")).indexOf("Flip4Mac")>-1;$.plugins={fla:se.indexOf("Shockwave Flash")>-1,qt:se.indexOf("QuickTime")>-1,wmp:!le&&se.indexOf("Windows Media")>-1,f4m:le}}else{var ce=function(e){var t;try{t=new ActiveXObject(e)}catch(e){}return!!t};$.plugins={fla:ce("ShockwaveFlash.ShockwaveFlash"),qt:ce("QuickTime.QuickTime"),wmp:ce("wmplayer.ocx"),f4m:!1}}var ue=/^(light|shadow)box/i,de="shadowboxCacheKey",fe=1;$.cache={},$.select=function(e){var t=[];if(e){var n=e.length;if(n)if("string"==typeof e)$.find&&(t=$.find(e));else if(2==n&&"string"==typeof e[0]&&e[1].nodeType)$.find&&(t=$.find(e[0],e[1]));else for(var i=0;i<n;++i)t[i]=e[i];else t.push(e)}else{var r;d(document.getElementsByTagName("a"),function(e,n){(r=n.getAttribute("rel"))&&ue.test(r)&&t.push(n)})}return t},$.setup=function(e,t){d($.select(e),function(e,n){$.addCache(n,t)})},$.teardown=function(e){d($.select(e),function(e,t){$.removeCache(t)})},$.addCache=function(e,t){var n=e[de];void 0==n&&(n=fe++,e[de]=n,b(e,"click",S)),$.cache[n]=$.makeObject(e,t)},$.removeCache=function(e){x(e,"click",S),delete $.cache[e[de]],e[de]=null},$.getCache=function(e){var t=e[de];return t in $.cache&&$.cache[t]},$.clearCache=function(){for(var e in $.cache)$.removeCache($.cache[e].link);$.cache={}},$.find=function(){function e(t){for(var n,i="",r=0;t[r];r++)3===(n=t[r]).nodeType||4===n.nodeType?i+=n.nodeValue:8!==n.nodeType&&(i+=e(n.childNodes));return i}function t(e,t,n,i,r,o){for(var a=0,s=i.length;a<s;a++){var l=i[a];if(l){l=l[e];for(var c=!1;l;){if(l.sizcache===n){c=i[l.sizset];break}if(1!==l.nodeType||o||(l.sizcache=n,l.sizset=a),l.nodeName.toLowerCase()===t){c=l;break}l=l[e]}i[a]=c}}}function n(e,t,n,i,r,o){for(var a=0,s=i.length;a<s;a++){var c=i[a];if(c){c=c[e];for(var u=!1;c;){if(c.sizcache===n){u=i[c.sizset];break}if(1===c.nodeType)if(o||(c.sizcache=n,c.sizset=a),"string"!=typeof t){if(c===t){u=!0;break}}else if(l.filter(t,[c]).length>0){u=c;break}c=c[e]}i[a]=u}}}var i=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,r=0,o=Object.prototype.toString,a=!1,s=!0;[0,0].sort(function(){return s=!1,0});var l=function(e,t,n,r){n=n||[];var a=t=t||document;if(1!==t.nodeType&&9!==t.nodeType)return[];if(!e||"string"!=typeof e)return n;for(var s,d,h,y,g=[],w=!0,b=v(t),x=e;null!==(i.exec(""),s=i.exec(x));)if(x=s[3],g.push(s[1]),s[2]){y=s[3];break}if(g.length>1&&u.exec(e))if(2===g.length&&c.relative[g[0]])d=m(g[0]+g[1],t);else for(d=c.relative[g[0]]?[t]:l(g.shift(),t);g.length;)e=g.shift(),c.relative[e]&&(e+=g.shift()),d=m(e,d);else if(!r&&g.length>1&&9===t.nodeType&&!b&&c.match.ID.test(g[0])&&!c.match.ID.test(g[g.length-1])&&(t=(C=l.find(g.shift(),t,b)).expr?l.filter(C.expr,C.set)[0]:C.set[0]),t){var C=r?{expr:g.pop(),set:f(r)}:l.find(g.pop(),1!==g.length||"~"!==g[0]&&"+"!==g[0]||!t.parentNode?t:t.parentNode,b);for(d=C.expr?l.filter(C.expr,C.set):C.set,g.length>0?h=f(d):w=!1;g.length;){var k=g.pop(),S=k;c.relative[k]?S=g.pop():k="",null==S&&(S=t),c.relative[k](h,S,b)}}else h=g=[];if(h||(h=d),!h)throw"Syntax error, unrecognized expression: "+(k||e);if("[object Array]"===o.call(h))if(w)if(t&&1===t.nodeType)for(T=0;null!=h[T];T++)h[T]&&(!0===h[T]||1===h[T].nodeType&&p(t,h[T]))&&n.push(d[T]);else for(var T=0;null!=h[T];T++)h[T]&&1===h[T].nodeType&&n.push(d[T]);else n.push.apply(n,h);else f(h,n);return y&&(l(y,a,n,r),l.uniqueSort(n)),n};l.uniqueSort=function(e){if(h&&(a=s,e.sort(h),a))for(var t=1;t<e.length;t++)e[t]===e[t-1]&&e.splice(t--,1);return e},l.matches=function(e,t){return l(e,null,null,t)},l.find=function(e,t,n){var i;if(!e)return[];for(var r=0,o=c.order.length;r<o;r++){var a,s=c.order[r];if(a=c.leftMatch[s].exec(e)){var l=a[1];if(a.splice(1,1),"\\"!==l.substr(l.length-1)&&(a[1]=(a[1]||"").replace(/\\/g,""),null!=(i=c.find[s](a,t,n)))){e=e.replace(c.match[s],"");break}}}return i||(i=t.getElementsByTagName("*")),{set:i,expr:e}},l.filter=function(e,t,n,i){for(var r,o,a=e,s=[],l=t,u=t&&t[0]&&v(t[0]);e&&t.length;){for(var d in c.filter)if(null!=(r=c.match[d].exec(e))){var f,h,p=c.filter[d];if(o=!1,l===s&&(s=[]),c.preFilter[d])if(r=c.preFilter[d](r,l,n,s,i,u)){if(!0===r)continue}else o=f=!0;if(r)for(var m=0;null!=(h=l[m]);m++)if(h){var y=i^!!(f=p(h,r,m,l));n&&null!=f?y?o=!0:l[m]=!1:y&&(s.push(h),o=!0)}if(void 0!==f){if(n||(l=s),e=e.replace(c.match[d],""),!o)return[];break}}if(e===a){if(null==o)throw"Syntax error, unrecognized expression: "+e;break}a=e}return l};var c=l.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{class:"className",for:"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")}},relative:{"+":function(e,t){var n="string"==typeof t,i=n&&!/\W/.test(t),r=n&&!i;i&&(t=t.toLowerCase());for(var o,a=0,s=e.length;a<s;a++)if(o=e[a]){for(;(o=o.previousSibling)&&1!==o.nodeType;);e[a]=r||o&&o.nodeName.toLowerCase()===t?o||!1:o===t}r&&l.filter(t,e,!0)},">":function(e,t){var n="string"==typeof t;if(n&&!/\W/.test(t)){t=t.toLowerCase();for(var i=0,r=e.length;i<r;i++)if(a=e[i]){var o=a.parentNode;e[i]=o.nodeName.toLowerCase()===t&&o}}else{for(var i=0,r=e.length;i<r;i++){var a=e[i];a&&(e[i]=n?a.parentNode:a.parentNode===t)}n&&l.filter(t,e,!0)}},"":function(e,i,o){var a=r++,s=n;if("string"==typeof i&&!/\W/.test(i)){var l=i=i.toLowerCase();s=t}s("parentNode",i,a,e,l,o)},"~":function(e,i,o){var a=r++,s=n;if("string"==typeof i&&!/\W/.test(i)){var l=i=i.toLowerCase();s=t}s("previousSibling",i,a,e,l,o)}},find:{ID:function(e,t,n){if(void 0!==t.getElementById&&!n){var i=t.getElementById(e[1]);return i?[i]:[]}},NAME:function(e,t){if(void 0!==t.getElementsByName){for(var n=[],i=t.getElementsByName(e[1]),r=0,o=i.length;r<o;r++)i[r].getAttribute("name")===e[1]&&n.push(i[r]);return 0===n.length?null:n}},TAG:function(e,t){return t.getElementsByTagName(e[1])}},preFilter:{CLASS:function(e,t,n,i,r,o){if(e=" "+e[1].replace(/\\/g,"")+" ",o)return e;for(var a,s=0;null!=(a=t[s]);s++)a&&(r^(a.className&&(" "+a.className+" ").replace(/[\t\n]/g," ").indexOf(e)>=0)?n||i.push(a):n&&(t[s]=!1));return!1},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(e,t){return e[1].toLowerCase()},CHILD:function(e){if("nth"===e[1]){var t=/(-?)(\d*)n((?:\+|-)?\d*)/.exec("even"===e[2]&&"2n"||"odd"===e[2]&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=t[1]+(t[2]||1)-0,e[3]=t[3]-0}return e[0]=r++,e},ATTR:function(e,t,n,i,r,o){var a=e[1].replace(/\\/g,"");return!o&&c.attrMap[a]&&(e[1]=c.attrMap[a]),"~="===e[2]&&(e[4]=" "+e[4]+" "),e},PSEUDO:function(e,t,n,r,o){if("not"===e[1]){if(!((i.exec(e[3])||"").length>1||/^\w/.test(e[3]))){var a=l.filter(e[3],t,n,!0^o);return n||r.push.apply(r,a),!1}e[3]=l(e[3],null,null,t)}else if(c.match.POS.test(e[0])||c.match.CHILD.test(e[0]))return!0;return e},POS:function(e){return e.unshift(!0),e}},filters:{enabled:function(e){return!1===e.disabled&&"hidden"!==e.type},disabled:function(e){return!0===e.disabled},checked:function(e){return!0===e.checked},selected:function(e){return e.parentNode.selectedIndex,!0===e.selected},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(e,t,n){return!!l(n[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||"button"===e.nodeName.toLowerCase()},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},setFilters:{first:function(e,t){return 0===t},last:function(e,t,n,i){return t===i.length-1},even:function(e,t){return t%2==0},odd:function(e,t){return t%2==1},lt:function(e,t,n){return t<n[3]-0},gt:function(e,t,n){return t>n[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(t,n,i,r){var o=n[1],a=c.filters[o];if(a)return a(t,i,n,r);if("contains"===o)return(t.textContent||t.innerText||e([t])||"").indexOf(n[3])>=0;if("not"===o){for(var s=n[3],i=0,l=s.length;i<l;i++)if(s[i]===t)return!1;return!0}throw"Syntax error, unrecognized expression: "+o},CHILD:function(e,t){var n=t[1],i=e;switch(n){case"only":case"first":for(;i=i.previousSibling;)if(1===i.nodeType)return!1;if("first"===n)return!0;i=e;case"last":for(;i=i.nextSibling;)if(1===i.nodeType)return!1;return!0;case"nth":var r=t[2],o=t[3];if(1===r&&0===o)return!0;var a=t[0],s=e.parentNode;if(s&&(s.sizcache!==a||!e.nodeIndex)){var l=0;for(i=s.firstChild;i;i=i.nextSibling)1===i.nodeType&&(i.nodeIndex=++l);s.sizcache=a}var c=e.nodeIndex-o;return 0===r?0===c:c%r==0&&c/r>=0}},ID:function(e,t){return 1===e.nodeType&&e.getAttribute("id")===t},TAG:function(e,t){return"*"===t&&1===e.nodeType||e.nodeName.toLowerCase()===t},CLASS:function(e,t){return(" "+(e.className||e.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(e,t){var n=t[1],i=c.attrHandle[n]?c.attrHandle[n](e):null!=e[n]?e[n]:e.getAttribute(n),r=i+"",o=t[2],a=t[4];return null==i?"!="===o:"="===o?r===a:"*="===o?r.indexOf(a)>=0:"~="===o?(" "+r+" ").indexOf(a)>=0:a?"!="===o?r!==a:"^="===o?0===r.indexOf(a):"$="===o?r.substr(r.length-a.length)===a:"|="===o&&(r===a||r.substr(0,a.length+1)===a+"-"):r&&!1!==i},POS:function(e,t,n,i){var r=t[2],o=c.setFilters[r];if(o)return o(e,n,t,i)}}},u=c.match.POS;for(var d in c.match)c.match[d]=new RegExp(c.match[d].source+/(?![^\[]*\])(?![^\(]*\))/.source),c.leftMatch[d]=new RegExp(/(^(?:.|\r|\n)*?)/.source+c.match[d].source);var f=function(e,t){return e=Array.prototype.slice.call(e,0),t?(t.push.apply(t,e),t):e};try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(e){f=function(e,t){var n=t||[];if("[object Array]"===o.call(e))Array.prototype.push.apply(n,e);else if("number"==typeof e.length)for(var i=0,r=e.length;i<r;i++)n.push(e[i]);else for(i=0;e[i];i++)n.push(e[i]);return n}}var h;document.documentElement.compareDocumentPosition?h=function(e,t){if(!e.compareDocumentPosition||!t.compareDocumentPosition)return e==t&&(a=!0),e.compareDocumentPosition?-1:1;var n=4&e.compareDocumentPosition(t)?-1:e===t?0:1;return 0===n&&(a=!0),n}:"sourceIndex"in document.documentElement?h=function(e,t){if(!e.sourceIndex||!t.sourceIndex)return e==t&&(a=!0),e.sourceIndex?-1:1;var n=e.sourceIndex-t.sourceIndex;return 0===n&&(a=!0),n}:document.createRange&&(h=function(e,t){if(!e.ownerDocument||!t.ownerDocument)return e==t&&(a=!0),e.ownerDocument?-1:1;var n=e.ownerDocument.createRange(),i=t.ownerDocument.createRange();n.setStart(e,0),n.setEnd(e,0),i.setStart(t,0),i.setEnd(t,0);var r=n.compareBoundaryPoints(Range.START_TO_END,i);return 0===r&&(a=!0),r}),function(){var e=document.createElement("div"),t="script"+(new Date).getTime();e.innerHTML="<a name='"+t+"'/>";var n=document.documentElement;n.insertBefore(e,n.firstChild),document.getElementById(t)&&(c.find.ID=function(e,t,n){if(void 0!==t.getElementById&&!n){var i=t.getElementById(e[1]);return i?i.id===e[1]||void 0!==i.getAttributeNode&&i.getAttributeNode("id").nodeValue===e[1]?[i]:void 0:[]}},c.filter.ID=function(e,t){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return 1===e.nodeType&&n&&n.nodeValue===t}),n.removeChild(e),n=e=null}(),function(){var e=document.createElement("div");e.appendChild(document.createComment("")),e.getElementsByTagName("*").length>0&&(c.find.TAG=function(e,t){var n=t.getElementsByTagName(e[1]);if("*"===e[1]){for(var i=[],r=0;n[r];r++)1===n[r].nodeType&&i.push(n[r]);n=i}return n}),e.innerHTML="<a href='#'></a>",e.firstChild&&void 0!==e.firstChild.getAttribute&&"#"!==e.firstChild.getAttribute("href")&&(c.attrHandle.href=function(e){return e.getAttribute("href",2)}),e=null}(),document.querySelectorAll&&function(){var e=l,t=document.createElement("div");if(t.innerHTML="<p class='TEST'></p>",!t.querySelectorAll||0!==t.querySelectorAll(".TEST").length){l=function(t,n,i,r){if(n=n||document,!r&&9===n.nodeType&&!v(n))try{return f(n.querySelectorAll(t),i)}catch(e){}return e(t,n,i,r)};for(var n in e)l[n]=e[n];t=null}}(),function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>",e.getElementsByClassName&&0!==e.getElementsByClassName("e").length&&(e.lastChild.className="e",1!==e.getElementsByClassName("e").length&&(c.order.splice(1,0,"CLASS"),c.find.CLASS=function(e,t,n){if(void 0!==t.getElementsByClassName&&!n)return t.getElementsByClassName(e[1])},e=null))}();var p=document.compareDocumentPosition?function(e,t){return 16&e.compareDocumentPosition(t)}:function(e,t){return e!==t&&(!e.contains||e.contains(t))},v=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return!!t&&"HTML"!==t.nodeName},m=function(e,t){for(var n,i=[],r="",o=t.nodeType?[t]:t;n=c.match.PSEUDO.exec(e);)r+=n[0],e=e.replace(c.match.PSEUDO,"");e=c.relative[e]?e+"*":e;for(var a=0,s=o.length;a<s;a++)l(e,o[a],i);return l.filter(r,i)};return l}(),$.flash=function(){var t=function(){function n(){"complete"==C.readyState&&(C.parentNode.removeChild(C),i())}function i(){if(!P){if(z.ie&&z.win){var e=m("span");try{var t=O.getElementsByTagName("body")[0].appendChild(e);t.parentNode.removeChild(t)}catch(e){return}}P=!0,j&&(clearInterval(j),j=null);for(var n=N.length,i=0;i<n;i++)N[i]()}}function r(e){P?e():N[N.length]=e}function o(e){if(typeof E.addEventListener!=k)E.addEventListener("load",e,!1);else if(typeof O.addEventListener!=k)O.addEventListener("load",e,!1);else if(typeof E.attachEvent!=k)y(E,"onload",e);else if("function"==typeof E.onload){var t=E.onload;E.onload=function(){t(),e()}}else E.onload=e}function a(){for(var e=L.length,t=0;t<e;t++){var n=L[t].id;if(z.pv[0]>0){var i=v(n);i&&(L[t].width=i.getAttribute("width")?i.getAttribute("width"):"0",L[t].height=i.getAttribute("height")?i.getAttribute("height"):"0",g(L[t].swfVersion)?(z.webkit&&z.webkit<312&&s(i),b(n,!0)):L[t].expressInstall&&!W&&g("6.0.65")&&(z.win||z.mac)?l(L[t]):c(i))}else b(n,!0)}}function s(e){var t=e.getElementsByTagName(S)[0];if(t){var n=m("embed"),i=t.attributes;if(i)for(var r=i.length,o=0;o<r;o++)"DATA"==i[o].nodeName?n.setAttribute("src",i[o].nodeValue):n.setAttribute(i[o].nodeName,i[o].nodeValue);var a=t.childNodes;if(a)for(var s=a.length,l=0;l<s;l++)1==a[l].nodeType&&"PARAM"==a[l].nodeName&&n.setAttribute(a[l].getAttribute("name"),a[l].getAttribute("value"));e.parentNode.replaceChild(n,e)}}function l(e){W=!0;var t=v(e.id);if(t){if(e.altContentId){var n=v(e.altContentId);n&&(D=n,H=e.altContentId)}else D=u(t);!/%$/.test(e.width)&&parseInt(e.width,10)<310&&(e.width="310"),!/%$/.test(e.height)&&parseInt(e.height,10)<137&&(e.height="137"),O.title=O.title.slice(0,47)+" - Flash Player Installation";var i=z.ie&&z.win?"ActiveX":"PlugIn",r=O.title,o="MMredirectURL="+E.location+"&MMplayerType="+i+"&MMdoctitle="+r,a=e.id;if(z.ie&&z.win&&4!=t.readyState){var s=m("div");a+="SWFObjectNew",s.setAttribute("id",a),t.parentNode.insertBefore(s,t),t.style.display="none";y(E,"onload",function(){t.parentNode.removeChild(t)})}d({data:e.expressInstall,id:I,width:e.width,height:e.height},{flashvars:o},a)}}function c(e){if(z.ie&&z.win&&4!=e.readyState){var t=m("div");e.parentNode.insertBefore(t,e),t.parentNode.replaceChild(u(e),t),e.style.display="none";y(E,"onload",function(){e.parentNode.removeChild(e)})}else e.parentNode.replaceChild(u(e),e)}function u(e){var t=m("div");if(z.win&&z.ie)t.innerHTML=e.innerHTML;else{var n=e.getElementsByTagName(S)[0];if(n){var i=n.childNodes;if(i)for(var r=i.length,o=0;o<r;o++)1==i[o].nodeType&&"PARAM"==i[o].nodeName||8==i[o].nodeType||t.appendChild(i[o].cloneNode(!0))}}return t}function d(e,t,n){var i,r=v(n);if(r)if(typeof e.id==k&&(e.id=n),z.ie&&z.win){var o="";for(var a in e)e[a]!=Object.prototype[a]&&("data"==a.toLowerCase()?t.movie=e[a]:"styleclass"==a.toLowerCase()?o+=' class="'+e[a]+'"':"classid"!=a.toLowerCase()&&(o+=" "+a+'="'+e[a]+'"'));var s="";for(var l in t)t[l]!=Object.prototype[l]&&(s+='<param name="'+l+'" value="'+t[l]+'" />');r.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+o+">"+s+"</object>",M[M.length]=e.id,i=v(e.id)}else if(z.webkit&&z.webkit<312){var c=m("embed");c.setAttribute("type",T);for(var u in e)e[u]!=Object.prototype[u]&&("data"==u.toLowerCase()?c.setAttribute("src",e[u]):"styleclass"==u.toLowerCase()?c.setAttribute("class",e[u]):"classid"!=u.toLowerCase()&&c.setAttribute(u,e[u]));for(var d in t)t[d]!=Object.prototype[d]&&"movie"!=d.toLowerCase()&&c.setAttribute(d,t[d]);r.parentNode.replaceChild(c,r),i=c}else{var h=m(S);h.setAttribute("type",T);for(var p in e)e[p]!=Object.prototype[p]&&("styleclass"==p.toLowerCase()?h.setAttribute("class",e[p]):"classid"!=p.toLowerCase()&&h.setAttribute(p,e[p]));for(var y in t)t[y]!=Object.prototype[y]&&"movie"!=y.toLowerCase()&&f(h,y,t[y]);r.parentNode.replaceChild(h,r),i=h}return i}function f(e,t,n){var i=m("param");i.setAttribute("name",t),i.setAttribute("value",n),e.appendChild(i)}function h(e){var t=v(e);!t||"OBJECT"!=t.nodeName&&"EMBED"!=t.nodeName||(z.ie&&z.win?4==t.readyState?p(e):E.attachEvent("onload",function(){p(e)}):t.parentNode.removeChild(t))}function p(e){var t=v(e);if(t){for(var n in t)"function"==typeof t[n]&&(t[n]=null);t.parentNode.removeChild(t)}}function v(e){var t=null;try{t=O.getElementById(e)}catch(e){}return t}function m(e){return O.createElement(e)}function y(e,t,n){e.attachEvent(t,n),F[F.length]=[e,t,n]}function g(e){var t=z.pv,n=e.split(".");return n[0]=parseInt(n[0],10),n[1]=parseInt(n[1],10)||0,n[2]=parseInt(n[2],10)||0,t[0]>n[0]||t[0]==n[0]&&t[1]>n[1]||t[0]==n[0]&&t[1]==n[1]&&t[2]>=n[2]}function w(e,t){if(!z.ie||!z.mac){var n=O.getElementsByTagName("head")[0],i=m("style");if(i.setAttribute("type","text/css"),i.setAttribute("media","screen"),z.ie&&z.win||typeof O.createTextNode==k||i.appendChild(O.createTextNode(e+" {"+t+"}")),n.appendChild(i),z.ie&&z.win&&typeof O.styleSheets!=k&&O.styleSheets.length>0){var r=O.styleSheets[O.styleSheets.length-1];typeof r.addRule==S&&r.addRule(e,t)}}}function b(e,t){var n=t?"visible":"hidden";P&&v(e)?v(e).style.visibility=n:w("#"+e,"visibility:"+n)}function x(e){return null!=/[\\\"<>\.;]/.exec(e)?encodeURIComponent(e):e}var C,k="undefined",S="object",T="application/x-shockwave-flash",I="SWFObjectExprInst",E=e,O=document,A=navigator,N=[],L=[],M=[],F=[],j=null,D=null,H=null,P=!1,W=!1,z=function(){var e=typeof O.getElementById!=k&&typeof O.getElementsByTagName!=k&&typeof O.createElement!=k,t=[0,0,0],n=null;if(typeof A.plugins!=k&&typeof A.plugins["Shockwave Flash"]==S)!(n=A.plugins["Shockwave Flash"].description)||typeof A.mimeTypes!=k&&A.mimeTypes[T]&&!A.mimeTypes[T].enabledPlugin||(n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),t[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10),t[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10),t[2]=/r/.test(n)?parseInt(n.replace(/^.*r(.*)$/,"$1"),10):0);else if(typeof E.ActiveXObject!=k){var i=null,r=!1;try{i=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{i=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),t=[6,0,21],i.AllowScriptAccess="always"}catch(e){6==t[0]&&(r=!0)}if(!r)try{i=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}if(!r&&i)try{(n=i.GetVariable("$version"))&&(n=n.split(" ")[1].split(","),t=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)])}catch(e){}}var o=A.userAgent.toLowerCase(),a=A.platform.toLowerCase(),s=!!/webkit/.test(o)&&parseFloat(o.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")),l=/win/.test(a?a:o),c=/mac/.test(a?a:o);return{w3cdom:e,pv:t,webkit:s,ie:!1,win:l,mac:c}}();(function(){if(z.w3cdom){if(r(a),z.ie&&z.win)try{O.write("<script id=__ie_ondomload defer=true src=//:><\/script>"),(C=v("__ie_ondomload"))&&y(C,"onreadystatechange",n)}catch(e){}z.webkit&&typeof O.readyState!=k&&(j=setInterval(function(){/loaded|complete/.test(O.readyState)&&i()},10)),typeof O.addEventListener!=k&&O.addEventListener("DOMContentLoaded",i,null),o(i)}})(),z.ie&&z.win&&e.attachEvent("onunload",function(){for(var e=F.length,n=0;n<e;n++)F[n][0].detachEvent(F[n][1],F[n][2]);for(var i=M.length,r=0;r<i;r++)h(M[r]);for(var o in z)z[o]=null;z=null;for(var a in t)t[a]=null;t=null});return{registerObject:function(e,t,n){if(z.w3cdom&&e&&t){var i={};i.id=e,i.swfVersion=t,i.expressInstall=n||!1,L[L.length]=i,b(e,!1)}},getObjectById:function(e){var t=null;if(z.w3cdom){var n=v(e);if(n){var i=n.getElementsByTagName(S)[0];!i||i&&typeof n.SetVariable!=k?t=n:typeof i.SetVariable!=k&&(t=i)}}return t},embedSWF:function(e,t,n,i,o,a,s,c,u){if(z.w3cdom&&e&&t&&n&&i&&o)if(n+="",i+="",g(o)){b(t,!1);var f={};if(u&&typeof u===S)for(var h in u)u[h]!=Object.prototype[h]&&(f[h]=u[h]);f.data=e,f.width=n,f.height=i;var p={};if(c&&typeof c===S)for(var v in c)c[v]!=Object.prototype[v]&&(p[v]=c[v]);if(s&&typeof s===S)for(var m in s)s[m]!=Object.prototype[m]&&(typeof p.flashvars!=k?p.flashvars+="&"+m+"="+s[m]:p.flashvars=m+"="+s[m]);r(function(){d(f,p,t),f.id==t&&b(t,!0)})}else a&&!W&&g("6.0.65")&&(z.win||z.mac)&&(W=!0,b(t,!1),r(function(){var e={};e.id=e.altContentId=t,e.width=n,e.height=i,e.expressInstall=a,l(e)}))},getFlashPlayerVersion:function(){return{major:z.pv[0],minor:z.pv[1],release:z.pv[2]}},hasFlashPlayerVersion:g,createSWF:function(e,t,n){return z.w3cdom?d(e,t,n):void 0},removeSWF:function(e){z.w3cdom&&h(e)},createCSS:function(e,t){z.w3cdom&&w(e,t)},addDomLoadEvent:r,addLoadEvent:o,getQueryParamValue:function(e){var t=O.location.search||O.location.hash;if(null==e)return x(t);if(t)for(var n=t.substring(1).split("&"),i=0;i<n.length;i++)if(n[i].substring(0,n[i].indexOf("="))==e)return x(n[i].substring(n[i].indexOf("=")+1));return""},expressInstallCallback:function(){if(W&&D){var e=v(I);e&&(e.parentNode.replaceChild(D,e),H&&(b(H,!0),z.ie&&z.win&&(D.style.display="block")),D=null,H=null,W=!1)}}}}();return t}(),$.lang={code:"en",of:"of",loading:"loading",cancel:"Cancel",next:"Next",previous:"Previous",play:"Play",pause:"Pause",close:"Close",errors:{single:'You must install the <a href="{0}">{1}</a> browser plugin to view this content.',shared:'You must install both the <a href="{0}">{1}</a> and <a href="{2}">{3}</a> browser plugins to view this content.',either:'You must install either the <a href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.'}};var he,pe,ve,me,ye="sb-drag-proxy";$.img=function(e,t){this.obj=e,this.id=t,this.ready=!1;var n=this;(he=new Image).onload=function(){n.height=e.height?parseInt(e.height,10):he.height,n.width=e.width?parseInt(e.width,10):he.width,n.ready=!0,he.onload=null,he=null},he.src=e.content},$.img.ext=["bmp","gif","jpg","jpeg","png"],$.img.prototype={append:function(e,t){var n=document.createElement("img");n.id=this.id,n.src=this.obj.content,n.style.position="absolute";var i,r;t.oversized&&"resize"==$.options.handleOversize?(i=t.innerHeight,r=t.innerWidth):(i=this.height,r=this.width),n.setAttribute("height",i),n.setAttribute("width",r),e.appendChild(n)},remove:function(){var e=p(this.id);e&&v(e),O(),he&&(he.onload=null,he=null)},onLoad:function(){$.dimensions.oversized&&"drag"==$.options.handleOversize&&E()},onWindowResize:function(){var e=$.dimensions;switch($.options.handleOversize){case"resize":var t=p(this.id);t.height=e.innerHeight,t.width=e.innerWidth;break;case"drag":if(me){var n=parseInt($.getStyle(me,"top")),i=parseInt($.getStyle(me,"left"));n+this.height<e.innerHeight&&(me.style.top=e.innerHeight-this.height+"px"),i+this.width<e.innerWidth&&(me.style.left=e.innerWidth-this.width+"px"),I()}}}},$.iframe=function(e,t){this.obj=e,this.id=t;var n=p("sb-overlay");this.height=e.height?parseInt(e.height,10):n.offsetHeight,this.width=e.width?parseInt(e.width,10):n.offsetWidth},$.iframe.prototype={append:function(e,t){var n='<iframe id="'+this.id+'" name="'+this.id+'" height="100%" width="100%" frameborder="0" marginwidth="0" marginheight="0" style="visibility:hidden" onload="this.style.visibility=\'visible\'" scrolling="NO"';$.isIE&&(n+=' allowtransparency="true"',$.isIE6&&(n+=" src=\"javascript:false;document.write('');\"")),n+="></iframe>",e.innerHTML=n},remove:function(){var t=p(this.id);t&&(v(t),$.isGecko&&delete e.frames[this.id])},onLoad:function(){($.isIE?p(this.id).contentWindow:e.frames[this.id]).location.href=this.obj.content}},$.html=function(e,t){this.obj=e,this.id=t,this.height=e.height?parseInt(e.height,10):300,this.width=e.width?parseInt(e.width,10):500},$.html.prototype={append:function(e,t){var n=document.createElement("div");n.id=this.id,n.className="html",n.innerHTML=this.obj.content,e.appendChild(n)},remove:function(){var e=p(this.id);e&&v(e)}},$.swf=function(e,t){this.obj=e,this.id=t,this.height=e.height?parseInt(e.height,10):300,this.width=e.width?parseInt(e.width,10):300},$.swf.ext=["swf"],$.swf.prototype={append:function(e,t){var n=document.createElement("div");n.id=this.id,e.appendChild(n);var i=t.innerHeight,r=t.innerWidth,o=this.obj.content,a=$.options.flashVersion,s=$.path+"expressInstall.swf",l=$.options.flashVars,c=$.options.flashParams;$.flash.embedSWF(o,this.id,r,i,a,s,l,c)},remove:function(){$.flash.expressInstallCallback(),$.flash.removeSWF(this.id)},onWindowResize:function(){var e=$.dimensions,t=p(this.id);t.height=e.innerHeight,t.width=e.innerWidth}};$.flv=function(e,t){this.obj=e,this.id=t,this.height=e.height?parseInt(e.height,10):300,$.options.showMovieControls&&(this.height+=20),this.width=e.width?parseInt(e.width,10):300},$.flv.ext=["flv","m4v"],$.flv.prototype={append:function(e,t){var n=document.createElement("div");n.id=this.id,e.appendChild(n);var i=t.innerHeight,r=t.innerWidth,o=$.path+"player.swf",a=$.options.flashVersion,s=$.path+"expressInstall.swf",l=u({file:this.obj.content,height:i,width:r,autostart:$.options.autoplayMovies?"true":"false",controlbar:$.options.showMovieControls?"bottom":"none",backcolor:"0x000000",frontcolor:"0xCCCCCC",lightcolor:"0x557722"},$.options.flashVars),c=$.options.flashParams;$.flash.embedSWF(o,this.id,r,i,a,s,l,c)},remove:function(){$.flash.expressInstallCallback(),$.flash.removeSWF(this.id)},onWindowResize:function(){var e=$.dimensions,t=p(this.id);t.height=e.innerHeight,t.width=e.innerWidth}};$.qt=function(e,t){this.obj=e,this.id=t,this.height=e.height?parseInt(e.height,10):300,$.options.showMovieControls&&(this.height+=16),this.width=e.width?parseInt(e.width,10):300},$.qt.ext=["dv","mov","moov","movie","mp4","avi","mpg","mpeg"],$.qt.prototype={append:function(e,t){var n=$.options,i=String(n.autoplayMovies),r=String(n.showMovieControls),o="<object",a={id:this.id,name:this.id,height:this.height,width:this.width,kioskmode:"true"};$.isIE?(a.classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",a.codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"):(a.type="video/quicktime",a.data=this.obj.content);for(var s in a)o+=" "+s+'="'+a[s]+'"';o+=">";var l={src:this.obj.content,scale:"aspect",controller:r,autoplay:i};for(var c in l)o+='<param name="'+c+'" value="'+l[c]+'">';o+="</object>",e.innerHTML=o},remove:function(){try{document[this.id].Stop()}catch(e){}var e=p(this.id);e&&v(e)}};var ge=$.isIE?70:45;$.wmp=function(e,t){this.obj=e,this.id=t,this.height=e.height?parseInt(e.height,10):300,$.options.showMovieControls&&(this.height+=ge),this.width=e.width?parseInt(e.width,10):300},$.wmp.ext=["asf","avi","mpg","mpeg","wm","wmv"],$.wmp.prototype={append:function(e,t){var n=$.options,i=(n.autoplayMovies,'<object id="'+this.id+'" name="'+this.id+'" height="'+this.height+'" width="'+this.width+'"'),r={autostart:n.autoplayMovies?1:0};$.isIE?(i+=' classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"',r.url=this.obj.content,r.uimode=n.showMovieControls?"full":"none"):(i+=' type="video/x-ms-wmv"',i+=' data="'+this.obj.content+'"',r.showcontrols=n.showMovieControls?1:0),i+=">";for(var o in r)i+='<param name="'+o+'" value="'+r[o]+'">';i+="</object>",e.innerHTML=i},remove:function(){if($.isIE)try{e[this.id].controls.stop(),e[this.id].URL="movie"+c()+".wmv",e[this.id]=function(){}}catch(e){}var t=p(this.id);t&&setTimeout(function(){v(t)},10)}};var we,be,xe,Ce=!1,ke=[],Se=["sb-nav-close","sb-nav-next","sb-nav-play","sb-nav-pause","sb-nav-previous"],Te=!0,Ie={};Ie.markup='<div id="sb-container"><div id="sb-overlay"></div><div id="sb-wrapper"><div id="sb-title"><div id="sb-title-inner"></div></div><div id="sb-wrapper-inner"><div id="sb-body"><div id="sb-body-inner"></div><div id="sb-loading"><div id="sb-loading-inner"><span>{loading}</span></div></div></div></div><div id="sb-info"><div id="sb-info-inner"><div id="sb-counter"></div><div id="sb-nav"><a id="sb-nav-close" title="{close}" onclick="Shadowbox.close()"></a><a id="sb-nav-next" title="{next}" onclick="Shadowbox.next()"></a><a id="sb-nav-play" title="{play}" onclick="Shadowbox.play()"></a><a id="sb-nav-pause" title="{pause}" onclick="Shadowbox.pause()"></a><a id="sb-nav-previous" title="{previous}" onclick="Shadowbox.previous()"></a></div></div></div></div></div>',Ie.options={animSequence:"sync",counterLimit:10,counterType:"default",displayCounter:!0,displayNav:!0,fadeDuration:.35,initialHeight:160,initialWidth:320,modal:!1,overlayColor:"#000",overlayOpacity:.85,resizeDuration:.35,showOverlay:!0,troubleElements:["select","object","embed","canvas"]},Ie.init=function(){if($.appendHTML(document.body,f(Ie.markup,$.lang)),Ie.body=p("sb-body-inner"),we=p("sb-container"),be=p("sb-overlay"),xe=p("sb-wrapper"),re||(we.style.position="absolute"),!ie){var t,n,i=/url\("(.*\.png)"\)/;d(Se,function(e,r){(t=p(r))&&(n=$.getStyle(t,"backgroundImage").match(i))&&(t.style.backgroundImage="none",t.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+n[1]+",sizingMethod=scale);")})}var r;b(e,"resize",function(){r&&(clearTimeout(r),r=null),Z&&(r=setTimeout(Ie.onWindowResize,10))})},Ie.onOpen=function(t,n){Te=!1,we.style.display="block",F();var i=V($.options.initialHeight,$.options.initialWidth);q(i.innerHeight,i.top),R(i.width,i.left),$.options.showOverlay&&(be.style.backgroundColor=$.options.overlayColor,$.setOpacity(be,0),$.options.modal||b(be,"click",$.close),Ce=!0),re||(j(),b(e,"scroll",j)),D(),we.style.visibility="visible",Ce?M(be,"opacity",$.options.overlayOpacity,$.options.fadeDuration,n):n()},Ie.onLoad=function(e,t){for(P(!0);Ie.body.firstChild;)v(Ie.body.firstChild);B(e,function(){Z&&(e||(xe.style.visibility="visible"),W(t))})},Ie.onReady=function(e){if(Z){var t=$.player,n=V(t.height,t.width),i=function(){z(e)};switch($.options.animSequence){case"hw":q(n.innerHeight,n.top,!0,function(){R(n.width,n.left,!0,i)});break;case"wh":R(n.width,n.left,!0,function(){q(n.innerHeight,n.top,!0,i)});break;default:R(n.width,n.left,!0),q(n.innerHeight,n.top,!0,i)}}},Ie.onShow=function(e){P(!1,e),Te=!0},Ie.onClose=function(){re||x(e,"scroll",j),x(be,"click",$.close),xe.style.visibility="hidden";var t=function(){we.style.visibility="hidden",we.style.display="none",D(!0)};Ce?M(be,"opacity",0,$.options.fadeDuration,t):t()},Ie.onPlay=function(){H("play",!1),H("pause",!0)},Ie.onPause=function(){H("pause",!1),H("play",!0)},Ie.onWindowResize=function(){if(Te){F();var e=$.player,t=V(e.height,e.width);R(t.width,t.left),q(t.innerHeight,t.top),e.onWindowResize&&e.onWindowResize()}},$.skin=Ie,e.Shadowbox=$}(window);