if (!jQuery.jsonp)
{
	// jquery.jsonp 1.0.4 (c) 2009 Julian Aubourg | MIT License
	// http://code.google.com/p/jquery-jsonp/
	(function($){var x=function(o){return o!==undefined&&o!==null;},H=$("head"),Z={},K={callback:"C",url:location.href};$.jsonp=function(d){d=$.extend({},K,d);if(x(d.beforeSend)){var t=0;d.abort=function(){t=1;};if(d.beforeSend(d,d)===false||t)return d;}
	var _="",y="success",n="error",u=x(d.url)?d.url:_,p=x(d.data)?d.data:_,s=(typeof p)=="string",k=function(f){setTimeout(f,1);},S,P,i,j,U;p=s?p:$.param(p);x(d.callbackParameter)&&(p+=(p==_?_:"&")+escape(d.callbackParameter)+"=?");!d.cache&&!d.pageCache&&(p+=[(p==_?_:"&"),"_xx",(new Date()).getTime(),"=",1].join(_));S=u.split("?");if(p!=_){P=p.split("?");j=S.length-1;j&&(S[j]+="&"+P.shift());S=S.concat(P);}
	i=S.length-2;i&&(S[i]+=d.callback+S.pop());U=S.join("?");if(d.pageCache&&x(Z[U])){k(function(){if(x(Z[U].e)){x(d.error)&&d.error(d,n);x(d.complete)&&d.complete(d,n);}else{var v=Z[U].s;x(d.dataFilter)&&(v=d.dataFilter(v));x(d.success)&&d.success(v,y);x(d.complete)&&d.complete(d,y);}});return d;}
	var f=$("<iframe />");H.append(f);var F=f[0],W=F.contentWindow||F.contentDocument,D=W.document;if(!x(D)){D=W;W=D.getParentNode();}
	var w,e=function(_,m){d.pageCache&&!x(m)&&(Z[U]={e:1});w();m=x(m)?m:n;x(d.error)&&d.error(d,m);x(d.complete)&&d.complete(d,m);},t=0,C=d.callback,E=C=="E"?"X":"E";D.open();W[C]=function(v){t=1;d.pageCache&&(Z[U]={s:v});k(function(){w();x(d.dataFilter)&&(v=d.dataFilter(v));x(d.success)&&d.success(v,y);x(d.complete)&&d.complete(d,y);});};W[E]=function(s){(!s||s=="complete")&&!t++&&k(e);};w=function(){W[E]=undefined;W[C]=undefined;try{delete W[E];}catch(_){}
	try{delete W[C];}catch(_){}
	D.open()
	D.write(_);D.close();f.remove();}
	k(function(){D.write(['<html><head><script src="',U,'" onload="',E,'()" onreadystatechange="',E,'(this.readyState)"></script></head><body onload="',E,'()"></body></html>'].join(_));D.close();});d.timeout>0&&setTimeout(function(){!t&&e(_,"timeout");},d.timeout);d.abort=w;return d;}
	$.jsonp.setup=function(o){$.extend(K,o);};})(jQuery);
}

if (!jQuery().flash)
{
	// jQuery SWFObject v1.1.1 MIT/GPL @jon_neal
	// http://jquery.thewikies.com/swfobject
	(function(f,h,i){function k(a,c){var b=(a[0]||0)-(c[0]||0);return b>0||!b&&a.length>0&&k(a.slice(1),c.slice(1))}function l(a){if(typeof a!=g)return a;var c=[],b="";for(var d in a){b=typeof a[d]==g?l(a[d]):[d,m?encodeURI(a[d]):a[d]].join("=");c.push(b)}return c.join("&")}function n(a){var c=[];for(var b in a)a[b]&&c.push([b,'="',a[b],'"'].join(""));return c.join(" ")}function o(a){var c=[];for(var b in a)c.push(['<param name="',b,'" value="',l(a[b]),'" />'].join(""));return c.join("")}var g="object",m=true;try{var j=i.description||function(){return(new i("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(p){j="Unavailable"}var e=j.match(/\d+/g)||[0];f[h]={available:e[0]>0,activeX:i&&!i.name,version:{original:j,array:e,string:e.join("."),major:parseInt(e[0],10)||0,minor:parseInt(e[1],10)||0,release:parseInt(e[2],10)||0},hasVersion:function(a){a=/string|number/.test(typeof a)?a.toString().split("."):/object/.test(typeof a)?[a.major,a.minor]:a||[0,0];return k(e,a)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(a){if(!a.swf||this.expressInstallIsActive||!this.available&&!a.hasVersionFail)return false;if(!this.hasVersion(a.hasVersion||1)){this.expressInstallIsActive=true;if(typeof a.hasVersionFail=="function")if(!a.hasVersionFail.apply(a))return false;a={swf:a.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:a.swf,type:"application/x-shockwave-flash",id:a.id||"flash_"+Math.floor(Math.random()*999999999),width:a.width||320,height:a.height||180,style:a.style||""};m=typeof a.useEncode!=="undefined"?a.useEncode:this.encodeParams;a.movie=a.swf;a.wmode=a.wmode||"opaque";delete a.fallback;delete a.hasVersion;delete a.hasVersionFail;delete a.height;delete a.id;delete a.swf;delete a.useEncode;delete a.width;var c=document.createElement("div");c.innerHTML=["<object ",n(attrs),">",o(a),"</object>"].join("");return c.firstChild}};f.fn[h]=function(a){var c=this.find(g).andSelf().filter(g);/string|object/.test(typeof a)&&this.each(function(){var b=f(this),d;a=typeof a==g?a:{swf:a};a.fallback=this;if(d=f[h].create(a)){b.children().remove();b.html(d)}});typeof a=="function"&&c.each(function(){var b=this;b.jsInteractionTimeoutMs=b.jsInteractionTimeoutMs||0;if(b.jsInteractionTimeoutMs<660)b.clientWidth||b.clientHeight?a.call(b):setTimeout(function(){f(b)[h](a)},b.jsInteractionTimeoutMs+66)});return c}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);
}

if (typeof Yox == "undefined")
Yox={addStylesheet:function(a,b){var d=a.createElement("link");d.setAttribute("rel","Stylesheet");d.setAttribute("type","text/css");d.setAttribute("href",b);a.getElementsByTagName("head")[0].appendChild(d)},compare:function(a,b){function d(g){var h=0;for(var i in g)i!=null&&h++;return h}if(typeof a!=typeof b)return false;else if(typeof a=="function")return a==b;if(d(a)!=d(b))return false;for(var e in a){var c=a[e],f=b[e];if(typeof c!=typeof f)return false;if(c&&c.length&&c[0]!==undefined&&c[0].tagName){if(!f||
f.length!=c.length||!f[0].tagName||f[0].tagName!=c[0].tagName)return false}else if(typeof c=="function"||typeof c=="object"){c=Yox.compare(c,f);if(!c)return c}else if(c!=f)return false}return true},hasProperties:function(a){var b=false;for(pName in a){b=true;break}return b},dataSources:[],fitImageSize:function(a,b,d,e){var c={width:a.width,height:a.height};if(a.width>b.width||d&&a.width<b.width){c.height=Math.round(b.width/a.width*a.height);c.width=b.width}if(!e&&c.height>b.height){c.width=Math.round(b.height/
c.height*c.width);c.height=b.height}else if(e&&c.height<b.height&&(b.height<=a.height||d)){c.height=b.height;c.width=Math.round(b.height/a.height*a.width)}return c},flashVideoPlayers:{jwplayer:function(a,b,d,e,c){a={swf:a||"/jwplayer/player.swf",flashVars:{file:b,image:d,stretching:"fill",title:e,backcolor:"000000",frontcolor:"FFFFFF"}};$.extend(a.flashVars,c);return a}},getDataSourceName:function(a){for(dataSourceIndex in Yox.Regex.data)if(a.match(Yox.Regex.data[dataSourceIndex]))return dataSourceIndex;
return null},getPath:function(a){for(var b=document.getElementsByTagName("script"),d=0;d<b.length;d++){var e=b[d].src.match(a);if(e)return e[1]}return null},getTopWindow:function(){var a=window;if(window.top)a=window.top;else for(;a.parent;)a=a.parent;return a},getUrlData:function(a){a=a.match(Yox.Regex.url);if(!a)return null;var b={path:a[1],anchor:a[3]};if(a[2])b.queryFields=this.queryToJson(a[2]);return b},hex2rgba:function(a,b){a=parseInt(a.replace("#","0x"),16);return"rgba("+((a&16711680)>>16)+
", "+((a&65280)>>8)+", "+(a&255)+", "+(typeof b!="undefined"?b:"1")+")"},queryToJson:function(a){a=a.split("&");for(var b={},d=0;d<a.length;d++){var e=a[d].split("=");if(e.length==2)b[e[0]]=e[1]}return b},loadDataSource:function(a,b){var d;if(a.dataUrl)(d=Yox.getDataSourceName(a.dataUrl))&&$.extend(a,{dataSource:dataSourceIndex});if(a.dataSource&&!Yox.dataSources[d])$.ajax({url:a.dataFolder+a.dataSource+".js",async:false,dataType:"script",success:function(e){eval(e);eval("Yox.dataSources['"+a.dataSource+
"'] = new yox_"+a.dataSource+"();");b(Yox.dataSources[a.dataSource])},error:function(e,c,f){console.log(e,c,f)}});else b&&b()},Regex:{data:{picasa:/http:\/\/(www.)?picasaweb\.google\..*/i,flickr:/http:\/\/(www.)?flickr.com/i,smugmug:/http:\/\/.*\.smugmug.com/i},flash:/^(.*\.(swf))(\?[^\?]+)?/i,flashvideo:/^(.*\.(flv|f4v|f4p|f4a|f4b|aac))(\?[^\?]+)?/i,image:/^[^\?#]+\.(?:jpg|jpeg|gif|png)$/i,url:/^([^#\?]*)?(?:\?([^\?#]*))?(?:#([A-Za-z]{1}[A-Za-z\d-_\:\.]+))?$/,video:{youtube:/.*youtube.com\/watch.*(?:v=[^&]+).*/i,
vimeo:/vimeo.com\/\d+/i,hulu:/hulu.com\/watch\//i,viddler:/viddler.com\//i,flickr:/.*flickr.com\/.*/i,myspace:/.*vids.myspace.com\/.*/i,qik:/qik.com/i,revision3:/revision3.com/i,dailymotion:/dailymotion.com/i,"5min":/.*5min\.com\/Video/i}},Sprites:function(a,b,d){this.spritesImage=(new Image).src=b;var e=0;jQuery.each(a,function(c,f){f.top=e;e+=f.height});this.getSprite=function(c,f,g){return jQuery("<img/>",{src:d,alt:f,title:g,css:{width:a[c].width,height:a[c].height,"background-image":"url("+b+
")","background-repeat":"no-repeat","background-position":this.getBackgroundPosition(c,f)}})};this.getBackgroundPosition=function(c,f){return"-"+jQuery.inArray(f,a[c].sprites)*(a[c].width||0)+"px -"+a[c].top+"px"}},Support:{rgba:function(){if(!("result"in arguments.callee)){var a=document.createElement("div"),b=false;try{a.style.color="rgba(0, 0, 0, 0.5)";b=/^rgba/.test(a.style.color)}catch(d){}arguments.callee.result=b}return arguments.callee.result}},urlDataToPath:function(a){var b=a.path||"";if(a.queryFields&&
this.hasProperties(a.queryFields)){b+="?";for(field in a.queryFields)b+=field+"="+a.queryFields[field]+"&";b=b.substring(0,b.length-1)}if(a.anchor)b+="#"+a.anchor;return b}};

// yoxthumbs:
(function(g){function m(c,b){function j(a){var d=jQuery("<a>",{href:a.link,className:"yoxthumbs_thumbnail"}),e=jQuery("<img>",{src:a.thumbnailSrc,alt:a.media.alt,title:a.media.title});a.data&&d.data("yoxthumbs",a.data);a.thumbnailDimensions&&e.css({width:a.thumbnailDimensions.width,height:a.thumbnailDimensions.height});e.appendTo(d);return d}var h=this;c.data("yoxview")&&c.data("yoxview");var f=jQuery,k=c[0].tagName=="A";b.images&&jQuery.each(b.images,function(a,d){c.append(j(d))});this.thumbnails=
[];var n=k?c:c.find("a:has(img)"),o=0;f.each(n,function(a,d){var e=f(d),l=true;if(b.enableOnlyMedia)if(!d.href.match(Yox.Regex.image)){var i=false;for(dataProvider in Yox.Regex.data)if(d.href.match(Yox.Regex.data[dataProvider])){i=true;break}if(!i){i=false;for(videoProvider in Yox.Regex.video)if(d.href.match(Yox.Regex.video[videoProvider])){i=true;break}i||(l=false)}}if(l){e.data("yoxthumbs",f.extend({imageIndex:o++},e.data("yoxthumbs")));h.thumbnails.push(e)}});if(b.thumbsOpacity){this.thumbnails.css("opacity",
b.thumbsOpacity);c.delegate("a:has(img)","mouseenter.yoxthumbs",function(a){if(h.currentSelectedIndex===undefined||f(a.currentTarget).data("yoxthumbs").imageIndex!=h.currentSelectedIndex)f(a.currentTarget).stop().animate({opacity:1},b.thumbsOpacityFadeTime)}).delegate("a:has(img)","mouseout.yoxthumbs",function(a){if(h.currentSelectedIndex===undefined||f(a.currentTarget).data("yoxthumbs").imageIndex!=h.currentSelectedIndex)f(a.currentTarget).stop().animate({opacity:b.thumbsOpacity},b.thumbsOpacityFadeTime)})}if(b.onClick)k?
c.bind("click.yoxthumbs",function(a){b.onClick(a);return false}):c.delegate("a:has(img)","click.yoxthumbs",function(a){if(!f(a.currentTarget).data("yoxthumbs"))return true;b.onClick(a);return false});this.select=function(a){if(this.currentSelectedIndex===undefined||this.currentSelectedIndex!=a){var d=this.thumbnails.eq(a),e=c.data("yoxslide");e&&e.show(d);if(this.currentSelectedIndex!==undefined){e=this.thumbnails.eq(this.currentSelectedIndex);e.removeClass(b.selectedThumbnailClassName);b.thumbsOpacity&&
e.animate({opacity:b.thumbsOpacity},b.thumbsOpacityFadeTime)}d.addClass(b.selectedThumbnailClassName);b.thumbsOpacity&&d.animate({opacity:1},b.thumbsOpacityFadeTime);this.currentSelectedIndex=a}};this.unload=function(a){f.each(this.thumbnails,function(d,e){f(e).removeData("yoxthumbs");a&&f(e).removeData(a)});c.undelegate("a:has(img)","click.yoxthumbs");c.find(".yoxthumbs_thumbnail").remove();k&&c.unbind(".yoxthumbs")}}g.fn.yoxthumbs=function(c){if(this.length==0)return this;if(typeof c!="string"){var b=
g.extend({target:null,selectedThumbnailClassName:"selected",thumbsOpacityFadeTime:300,thumbsOpacity:undefined,prevBtn:undefined,nextBtn:undefined,onClick:undefined,images:undefined,enableOnlyMedia:false},c),j=g(this);j.data("yoxthumbs",new m(j,b))}else if(b=g(this).data("yoxthumbs"))if(g.isFunction(b[c]))b[c].apply(b,Array.prototype.slice.call(arguments,1));else return b[c];return this}})(jQuery);

/*!
 * jquery.yoxview
 * jQuery media viewer
 * http://yoxigen.com/yoxview
 *
 * Copyright (c) 2010 Yossi Kolesnicov
 *
 * Licensed under the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Date: 30th October, 2010
 * Version : 2.15
 */ 
(function(b){function ib(){function H(a){for(var c=A.length,e=0;e<c;e++)if(Yox.compare(A[e],a))return e;A.push(a);return c}function za(a){return"a:has(img)"+(a.textLinksSelector!==null?",a"+a.textLinksSelector:"")}function jb(a,c){if(a.skin){var e=a.skin;if(!b.yoxview.yoxviewSkins[e]){var f=P+"skins/"+e+"/yoxview."+e;b.ajax({url:f+".js",dataType:"script",success:function(){b.yoxview.yoxviewSkins[e].css!==false&&Yox.addStylesheet(top.document,f+".css");c&&c(b.yoxview.yoxviewSkins[e])},error:function(){alert("Error loading skin file "+
f+".js")}})}}else c&&c()}function kb(a,c){if(W[a])c&&c(W[a]);else{W[a]={};var e=P+"lang/"+a+".js";b.ajax({url:e,async:false,dataType:"json",success:function(f){W[a]=f;c&&c(f)},error:function(){alert("Error loading language file "+e)}})}}function Aa(a){a=a.data("yoxview");if(!v||Ba!=a.viewIndex){if(!a.cacheVars)a.cacheVars={cachedImagesCount:0,cacheDirectionForward:true,cacheBufferLastIndex:null,currentCacheImg:0};v=a.images;m=v.length;Ba=a.viewIndex;var c=false;if(!la||la!=a.optionsSet){la=a.optionsSet||
0;d=A[la];c=true}if(d.onLoadImages)d.onLoadImages({images:v,viewData:a});else if(Q&&m==1||j&&!Q&&m>0)c=true;if(c){if(j){t.remove();K=R=X=L=ma=Q=j=undefined;u=0;b.yoxview.infoButtons={}}Ra()}l=a.cacheVars}}function Sa(a,c,e){a=c&&(c.width||c.height)?{width:parseInt(c.width),height:parseInt(c.height)}:e.defaultDimensions[a];if(isNaN(a.width))a.width=null;if(isNaN(a.height))a.height=null;return a}function Ta(a,c,e,f){var h=function(g){var i=b(g.currentTarget).data("yoxview");if(!i||i.imageIndex===null)return true;
else{g.preventDefault();b.yoxview.open(b(g.liveFired||g.currentTarget).data("yoxview").viewIndex,i.imageIndex)}};if(a[0].tagName=="A")a.bind("click.yoxview",h);else e?a.yoxthumbs({images:e,enableOnlyMedia:false,onClick:f||function(g){g.preventDefault();c.thumbnailsOptions&&c.thumbnailsOptions.onClick?c.thumbnailsOptions.onClick(b(g.currentTarget).data("yoxview").imageIndex,b(g.currentTarget),b(g.liveFired).data("yoxview").viewIndex):b.yoxview.open(b(g.liveFired||g.currentTarget).data("yoxview").viewIndex,
b(g.currentTarget).data("yoxview").imageIndex);return false}}):a.delegate(za(c),"click.yoxview",h)}function Ua(a){var c=M[Ba];B=c[0].tagName=="A"?c:v[u].thumbnailImg;if(!B||B.length==0)B=v[0].thumbnailImg;if(B){c=B.attr("src");a&&L&&c&&L.attr("src",c);if(lb&&!S&&window.name)S=b(top.document).find("[name='"+window.name+"']").offset();Ca=B.offset();Y={width:B.width(),height:B.height(),top:Math.round(Ca.top-Z.scrollTop()+(S?S.top:0)),left:Math.round(Ca.left+(S?S.left:0))}}}function na(a){oa.css("background-position",
C.getBackgroundPosition("notifications",a));oa.stop().fadeIn(d.buttonsFadeTime,function(){b(this).delay(500).fadeOut(d.buttonsFadeTime)})}function mb(a){b(a).stop().animate({opacity:0.5},d.buttonsFadeTime)}function nb(a){if(b.yoxview&&b.yoxview.isOpen){var c=b.yoxview[Va[ob[a.keyCode]]];if(c){a.preventDefault();c.apply(b.yoxview);return false}return true}return true}function Da(a,c,e){var f=b("<a>",{href:"#",click:function(){return b.yoxview.clickBtn(b.yoxview[c],e)}});b("<span>"+a+"</span>").css("opacity",
"0").appendTo(f);f.append(C.getSprite("icons",c));return f}function Wa(a,c,e){var f=new Image;f.src=d.imagesFolder+c+".png";f=b("<a>",{css:{background:"url("+f.src+") no-repeat "+c+" center",opacity:"0",outline:"0"},className:"yoxview_ctlBtn",href:"#"});f.css(c,"0");if(e)f.css("cursor","default");else{f.click(function(){this.blur();return b.yoxview.clickBtn(a,true)});d.buttonsFadeTime!=0&&f.hover(function(){b.yoxview.isOpen&&b(this).stop().animate({opacity:0.6},d.buttonsFadeTime)},function(){b(this).stop().animate({opacity:0},
d.buttonsFadeTime)})}return f}function pb(){var a=typeof d.popupMargin=="number"?[String(d.popupMargin)]:d.popupMargin.split(" ",4);k.top=parseInt(a[0]);switch(a.length){case 1:k.bottom=k.right=k.left=k.top;break;case 2:k.bottom=k.top;k.right=k.left=parseInt(a[1]);break;case 3:k.bottom=parseInt(a[2]);k.right=k.left=parseInt(a[1]);break;default:k.right=parseInt(a[1]);k.bottom=parseInt(a[2]);k.left=parseInt(a[3]);break}k.totalHeight=k.top+k.bottom;k.totalWidth=k.left+k.right}function Ra(){pb();F=Xa();
C=new Yox.Sprites({notifications:{width:59,height:59,sprites:["empty","playRTL","play","pause","last","first"]},icons:{width:18,height:18,sprites:["close","help","playpause","link","pin","unpin","play","pause","right","left"]},menu:{height:42,sprites:["back"]}},d.imagesFolder+"sprites.png",d.imagesFolder+"empty.gif");Va={RIGHT:d.isRTL?"prev":"next",DOWN:"next",UP:"prev",LEFT:d.isRTL?"next":"prev",ENTER:"play",HOME:"first",END:"last",SPACE:"next",h:"help",ESCAPE:"close"};n=W[d.lang];var a=d.skin?b.yoxview.yoxviewSkins[d.skin]:
null;j=b("<div>",{id:"yoxview",click:function(g){g.stopPropagation()}});t=b("<div>",{id:"yoxview_popupWrap",click:function(g){g.preventDefault();b.yoxview.clickBtn(b.yoxview.close,true)}});d.skin&&t.attr("className","yoxview_"+d.skin);if(d.backgroundOpacity===0)t.css("background","none");else Yox.Support.rgba()&&t.css("background-color",Yox.hex2rgba(d.backgroundColor,d.backgroundOpacity));t.appendTo(b(top.document.getElementsByTagName("body")[0])).append(j);R=b("<div>",{className:"yoxview_imgPanel",
css:{"z-index":"2"}});K=b("<div>",{className:"yoxview_imgPanel",css:{"z-index":"1",display:"none"}});L=b("<img />",{className:"yoxview_fadeImg",css:{display:"block",width:"100%",height:"100%"}});X=b("<img />",{className:"yoxview_fadeImg",css:{display:"block",width:"100%",height:"100%"}});R.data("yoxviewPanel",{image:L}).append(L).appendTo(j);K.data("yoxviewPanel",{image:X});K.append(X).appendTo(j);var c=m==1;if(c&&!v[0].media.title)d.renderInfo=false;if(d.renderMenu!==false){var e=b("<div>",{className:"yoxview_popupBarPanel yoxview_top"});
d.autoHideMenu!==false&&e.hover(function(){b.yoxview.isOpen&&Ya()},function(){b.yoxview.isOpen&&Ea()});w=b("<div>",{id:"yoxview_menuPanel"});if(Yox.Support.rgba()&&d.menuBackgroundColor)w.css("background",Yox.hex2rgba(d.menuBackgroundColor,d.menuBackgroundOpacity||0.8));var f=Da(n.Help,"help",false);b.yoxview.infoButtons.playBtn=Da(n.Slideshow,"play",false);$=b.yoxview.infoButtons.playBtn.children("span");w.append(Da(n.Close,"close",true),f,b.yoxview.infoButtons.playBtn);if(c){b.yoxview.infoButtons.playBtn.css("display",
"none");f.css("display","none");w.css({width:58})}w.find("a:last-child").attr("class","last");e.append(w).appendTo(j);w.delegate("a","mouseenter",function(){b(this).stop().animate({top:"8px"},"fast").find("span").stop().animate({opacity:1},"fast")}).delegate("a","mouseleave",function(){b(this).stop().animate({top:"0"},"fast").find("span").stop().animate({opacity:0},"fast")})}if(d.renderButtons!==false&&(!c||!b.support.opacity)){Q=Wa(b.yoxview.prev,d.isRTL?"right":"left",c);ma=Wa(b.yoxview.next,d.isRTL?
"left":"right",c);j.append(Q,ma);N=c&&!b.support.opacity?b():j.find(".yoxview_ctlBtn")}else N=b();aa=b("<div>",{id:"yoxview_ajaxLoader",className:"yoxview_notification",css:{display:"none"}});aa.append(b("<img>",{src:d.imagesFolder+"popup_ajax_loader.gif",alt:n.Loading,css:{width:32,height:32,"background-image":"url("+d.imagesFolder+"sprites.png)","background-position":C.getBackgroundPosition("notifications","empty")}})).appendTo(j);if(!d.disableNotifications){oa=b("<img>",{className:"yoxview_notification"});
j.append(oa)}O=b("<div>",{id:"yoxview_helpPanel",href:"#",title:n.CloseHelp,css:{background:"url("+d.imagesFolder+"help_panel.png) no-repeat center top",direction:n.Direction,opacity:"0"},click:function(){return b.yoxview.clickBtn(b.yoxview.help,false)}});e=document.createElement("h1");e.innerHTML=n.Help.toUpperCase();f=document.createElement("p");f.innerHTML=n.HelpText;var h=document.createElement("span");h.id="yoxview_closeHelp";h.innerHTML=n.CloseHelp;O.append(e).append(f).append(h).appendTo(j);
if(d.renderInfo!==false){p=b("<div>",{id:"yoxview_infoPanel",click:function(g){g.stopPropagation()}});if(d.infoBackOpacity===0){p.css("background","none");G=p}else if(Yox.Support.rgba()){G=p;p.css("background-color",Yox.hex2rgba(d.infoBackColor,d.infoBackOpacity))}else{p.append(b("<div>",{id:"yoxview_infoPanelBack",css:{background:d.infoBackColor,opacity:d.infoBackOpacity}}));G=b("<div>",{id:"yoxview_infoPanelContent"})}pa=b("<span>",{id:"yoxview_count"});T=b("<div>",{id:"yoxview_infoText"});if(c){T.css("margin-left",
"10px");pa.css("display","none")}G.append(pa);if(d.renderInfoPin!==false){Fa=C.getSprite("icons",d.autoHideInfo?"pin":"unpin");Za=b("<a>",{className:"yoxviewInfoLink",href:"#",title:d.autoHideInfo?n.PinInfo:n.UnpinInfo,css:{display:"inline"},click:function(g){g.preventDefault();d.autoHideInfo=!d.autoHideInfo;Fa.css("background-position",C.getBackgroundPosition("icons",d.autoHideInfo?"pin":"unpin"));this.title=d.autoHideInfo?n.PinInfo:n.UnpinInfo}});Za.append(Fa).appendTo(G)}if(a&&a.infoButtons){a=
a.infoButtons(d,n,C,t,j);if(d.infoButtons)b.extend(d.infoButtons,a);else d.infoButtons=a}if(d.infoButtons){b.extend(b.yoxview.infoButtons,d.infoButtons);for(infoButton in d.infoButtons)d.infoButtons[infoButton].attr("className","yoxviewInfoLink").css("display","block").appendTo(G)}if(d.linkToOriginalContext!==false){ba=b("<a>",{className:"yoxviewInfoLink",target:"_blank",title:n.OriginalContext});ba.append(C.getSprite("icons","link")).appendTo(G)}G.append(T);Yox.Support.rgba()||p.append(G);p.appendTo(d.renderInfoExternally?
t:j);if(!d.renderInfoExternally){I=b("<div>",{className:"yoxview_popupBarPanel yoxview_bottom"});I.hover(function(){b.yoxview.isOpen&&!ca&&d.autoHideInfo!==false&&qa()},function(){b.yoxview.isOpen&&!ca&&d.autoHideInfo!==false&&da()});p.wrap(I);I=p.parent()}}Yox.Support.rgba()||(qb=b("<div>",{css:{position:"fixed",height:"100%",width:"100%",top:"0",left:"0",background:d.backgroundColor,"z-index":"1",opacity:d.backgroundOpacity}}).appendTo(t))}function Ga(){l.cachedImagesCount++;if(l.cachedImagesCount==
m)l.cacheComplete=true;else $a()}function $a(){if(!d.cacheBuffer||l.currentCacheImg!=l.cacheBufferLastIndex)ea(l.currentCacheImg+(l.cacheDirectionForward?1:-1))}function Ha(){if(d.cacheBuffer){l.cacheBufferLastIndex=l.cacheDirectionForward?u+d.cacheBuffer:u-d.cacheBuffer;if(l.cacheBufferLastIndex<0)l.cacheBufferLastIndex+=m;else if(l.cacheBufferLastIndex>=m)l.cacheBufferLastIndex-=m}}function ea(a){if(!l.cacheComplete){if(a==m)a=0;else if(a<0)a+=m;var c=v[a].media;l.currentCacheImg=a;if(c&&!c.loaded)if(!c.contentType||
c.contentType==="image")ab.src=c.src;else bb(c,function(){Ga()});else $a()}}function rb(){Ia=true;clearTimeout(Ja);aa.stop();Ja=setTimeout(function(){aa.css("opacity","0.6").fadeIn(d.buttonsFadeTime)},d.buttonsFadeTime)}function cb(){r||rb();sb(b.yoxview.currentImage.media)}function Ka(a,c){j.stop().animate(a,d.popupResizeTime,c)}function ra(){if(m!=1){r=true;if($)$.text(n.Pause);else b.yoxview.infoButtons.playBtn&&b.yoxview.infoButtons.playBtn.attr("title",n.Pause);b.yoxview.infoButtons.playBtn&&
b.yoxview.infoButtons.playBtn.find("img").css("background-position",C.getBackgroundPosition("icons","pause"));if(u<m-1)La=setTimeout(function(){b.yoxview.next(true)},d.playDelay);else{if(d.loopPlay)La=setTimeout(function(){b.yoxview.select(0,null)},d.playDelay);else D();d.onEnd&&setTimeout(d.onEnd,d.playDelay)}}}function D(){clearTimeout(La);r=false;if($)$.text(n.Play);else b.yoxview.infoButtons.playBtn&&b.yoxview.infoButtons.playBtn.attr("title",n.Play);b.yoxview.infoButtons.playBtn&&b.yoxview.infoButtons.playBtn.find("img").css("background-position",
C.getBackgroundPosition("icons","play"))}function Xa(){var a=Z.width(),c=Z.height();return{height:c,width:a,usableArea:{height:c-k.totalHeight,width:a-k.totalWidth}}}function db(a){a=a.width&&a.height?Yox.fitImageSize(a,F.usableArea):{width:a.width?Math.min(a.width,F.usableArea.width):F.usableArea.width,height:a.height?Math.min(a.height,F.usableArea.height):F.usableArea.height};a.top=k.top+Math.round((F.usableArea.height-a.height)/2);a.left=k.left+Math.round((F.usableArea.width-a.width)/2);return a}
function qa(a){clearTimeout(fa);var c=T.outerHeight();if(c<eb)c=eb;p.stop().animate({height:c},500,function(){a&&a()})}function da(a){clearTimeout(fa);p.stop().animate({height:0},500,function(){a&&a()})}function Ea(a){if(w){clearTimeout(Ma);w.stop().animate({top:tb},500,function(){a&&a()})}}function Ya(a){if(w){clearTimeout(Ma);w.stop().animate({top:0},500,function(){a&&a()})}}function fb(){ga=s;s=sa?K:R;sa=!sa}function ta(a){var c=a.contentType==="image"||!a.contentType;c&&ca&&I&&I.css("display",
"block");clearTimeout(fa);fb();var e=s.data("yoxviewPanel");x.width=a.width;x.height=a.height;x.padding=a.padding;if(p){var f=a.title||"";if(a.description)f+=f!=""?"<div id='yoxview_infoTextDescription'>"+a.description+"</div>":a.description;T.html(f);m>1&&pa.html(u+1+"/"+m);if(ba)b.yoxview.currentImage.link?ba.attr("href",b.yoxview.currentImage.link).css("display","inline"):ba.css("display","none")}f=db(a);if(c){currentImageElement=sa?L:X;currentImageElement.attr({src:a.src,title:a.title,alt:a.alt});
e.image=currentImageElement;if(!e.isImage&&e.element){e.element.css("display","none");e.image.css("display","block");e.isImage=true}if(!ha){d.renderButtons&&N.css({height:"100%",width:"50%",top:"0"});ca=false;ha=true}}else{if(e.element&&e.elementId!=a.elementId){e.element.remove();e.element=undefined}if(!e.element)if(a.html){e.element=b("<div>",{className:ub});j.append(e.element)}else{j.append(a.element);e.element=a.element}a.html&&e.element.html(a.html);s=e.element;if(ha){if(I){d.autoHideInfo!==
false&&da();I.css("display","none");ca=true}d.renderButtons&&N.css({width:ua.width,height:ua.height});ha=false}d.renderButtons&&N.css({top:(f.height-ua.height)/2});if(e.isImage===undefined||e.isImage){e.element.css("display","block");e.image.css("display","none");e.isImage=false}}var h={width:f.width,height:f.height};s.css(ia?{width:"100%",height:"100%"}:h);if(Ia){Ia=false;clearTimeout(Ja);aa.stop().fadeOut(d.buttonsFadeTime)}U=true;Ka(f,function(){if(ia){b.yoxview.isOpen=true;s.css(h);if(d.controlsInitialDisplayTime>
0){d.showButtonsOnOpen&&N.animate({opacity:0.5},d.controlsInitialFadeTime,function(){d.buttonsFadeTime!=0&&b(this).delay(d.controlsInitialDisplayTime).animate({opacity:0},d.controlsInitialFadeTime)});if(d.showBarsOnOpen){Ya(function(){if(d.autoHideMenu!==false)Ma=setTimeout(function(){Ea()},d.controlsInitialDisplayTime)});p&&qa(function(){if(d.autoHideInfo!==false)fa=setTimeout(function(){da()},d.controlsInitialDisplayTime)})}}d.autoPlay&&b.yoxview.play();d.onOpen&&d.onOpen();if(va){va();va=undefined}ia=
false}if(x.padding){var g=j.width(),i=j.height();if(x.padding){g-=x.padding.horizontal;i-=x.padding.vertical}s.css({width:g+"px",height:i+"px"})}U=false});s.css({"z-index":"2",opacity:1});ga&&ga.css("z-index","1");ia?s.css({display:"block",width:"100%",height:"100%"}):s.fadeIn(d.popupResizeTime,function(){ga&&ga.css("display","none");p&&qa(function(){if(d.autoHideInfo!==false)fa=setTimeout(function(){da()},d.titleDisplayDuration)});if(m>1){if(d.cacheImagesInBackground&&!l.cacheComplete)ea(u+(l.cacheDirectionForward?
1:-1));r&&ra()}})}function vb(a,c,e,f,h){jQuery.jsonp({url:wb[a]||"http://oohembed.com/oohembed/",data:jQuery.extend({url:c,format:"json"},e),dataType:"jsonp",callbackParameter:"callback",success:function(g){var i={title:g.title,width:g.width,height:g.height,type:g.type};if(g.type==="video")i.html=g.html.replace(/<embed /,'<embed wmode="transparent" ').replace(/<param/,'<param name="wmode" value="transparent"><param').replace(/width=\"[\d]+\"/ig,'width="100%"').replace(/height=\"[\d]+\"/ig,'height="100%"');
else g.type==="photo"&&jQuery.extend(i,{src:g.url,alt:g.title,type:"image"});f(i)},error:function(g,i){h&&h(g,i)}})}function sb(a){try{if(!a)throw"Error: Media is unavailable.";if(a.contentType==="image"||!a.contentType){if(b.support.opacity)Na.src="";Na.src=a.src}else!a.loaded&&a.contentType=="ooembed"?bb(a,function(e){ta(e)},function(e){wa("Error getting data from:<br /><span class='errorUrl'>"+e.data.url+"</span>")}):ta(b.yoxview.currentImage.media)}catch(c){wa(c)}}function bb(a,c,e){a.contentType==
"ooembed"&&vb(a.provider,a.url,d.defaultDimensions.video,function(f){b.extend(a,f,{loaded:true});c&&c(a)},e)}function wa(a){ta({html:"<span class='yoxview_error'>"+a+"</span>",width:500,height:300,type:"error",title:""})}var P=P||Yox.getPath(/(.*\/)jquery\.yoxview/i),gb={autoHideInfo:true,autoPlay:false,backgroundColor:"#000000",backgroundOpacity:0.8,buttonsFadeTime:300,cacheBuffer:5,cacheImagesInBackground:true,controlsInitialFadeTime:1500,controlsInitialDisplayTime:1E3,dataFolder:P+"data/",defaultDimensions:{flash:{width:720,
height:560},iframe:{width:1024}},flashVideoPlayer:"jwplayer",imagesFolder:P+"images/",infoBackColor:"#000000",infoBackOpacity:0.5,isRTL:false,lang:"en",langFolder:P+"lang/",loopPlay:true,playDelay:3E3,popupMargin:20,popupResizeTime:600,renderButtons:true,renderMenu:true,showBarsOnOpen:true,showButtonsOnOpen:true,textLinksSelector:".yoxviewLink",titleAttribute:"title",titleDisplayDuration:2E3};this.infoButtons={};this.isOpen=false;this.yoxviewSkins={};var aa,l={},ab=new Image,pa,N,xb=0,u=0,n={},x=
{},la,Ba=0,lb=window!=window.parent,ca=false,yb={wmode:"transparent",width:"100%",height:"100%",allowfullscreen:"true",allowscriptaccess:"true",hasVersion:9},ia=true,S,O,fa,Ma,L,X,v,m=0,p,G,ba,eb=30,I,Za,Fa,T,sa=false,ha=true,r=false,U=false,M=[],Ja,Ia=false,ua={width:100,height:100},ub="yoxview_mediaPanel",wb={vimeo:"http://vimeo.com/api/oembed.json",myspace:"http://vids.myspace.com/index.cfm?fuseaction=oembed"},tb=-42,w,ma,oa,va,d,A=[],R,K,$,j,qb,k={},La,Z=b(Yox.getTopWindow()),t,Q,ja=false,C,Na=
new Image,B,Ca,Y,F,W={},ob={40:"DOWN",35:"END",13:"ENTER",36:"HOME",37:"LEFT",39:"RIGHT",32:"SPACE",38:"UP",72:"h",27:"ESCAPE"},Va;this.init=function(a,c){function e(){a.each(function(g,i){i=b(i);var xa=M.length;i.data("yoxview",{viewIndex:xa,cacheVars:{cachedImagesCount:0,cacheDirectionForward:true,cacheBufferLastIndex:null,currentCacheImg:0}});var ka=i.data("yoxview");if(h)ka.optionsSet=h;f.allowedImageUrls=[Yox.Regex.image];if(f.allowedUrls)f.allowedImageUrls=f.allowedImageUrls.concat(f.allowedUrls);
var Oa=i[0].tagName=="A",J=[],ya=0;(Oa?i:i.find(za(f))).each(function(y,Pa){var q=b(Pa),o;o=f;var z={},E=q.attr("href"),V=q.children("img:first");if(V.length==0)V=q;z={};for(supportedType in hb){var Qa=hb[supportedType](q,E,V,o);if(Qa){b.extend(Qa,{contentType:supportedType,elementId:xb++});z.media=Qa;break}}if(z.media){z.thumbnailImg=V;o=z}else o=null;if(o){J.push(o);if(Oa)q.data("yoxview").imageIndex=ya;else q.data("yoxview",{imageIndex:ya,viewIndex:xa});ya++}});if(f.images)J=J.concat(f.images);
if(f.dataSource)Yox.dataSources[f.dataSource].getImagesData(f,function(y){J=J.concat(y.images);ka.images=J;var Pa=y.isGroup?[b.extend(y,{media:{title:y.title+" ("+y.images.length+" images)",alt:y.title}})]:y.images;Ta(i,f,Oa?null:Pa,!y.createGroups?null:function(q){var o=b(q.currentTarget).data("yoxview"),z=b(q.currentTarget);q=z.data("yoxthumbs");if(o.imagesAreSet)b.yoxview.open(o.viewIndex);else{z.css("cursor","wait");var E=b.extend({},f);if(E.dataSourceOptions)b.extend(E.dataSourceOptions,q);else E.dataSourceOptions=
q;Yox.dataSources[f.dataSource].getImagesData(E,function(V){o.images=V.images;o.imagesAreSet=true;z.css("cursor","");b.yoxview.open(o.viewIndex)})}});y.createGroups?b.each(i.yoxthumbs("thumbnails"),function(q,o){o.data("yoxview",{viewIndex:++xa});M.push(b(o))}):b.each(i.yoxthumbs("thumbnails"),function(q,o){var z=ya+q,E=o.children("img");if(E.length==0)E=o;J[z].thumbnailImg=E;o.data("yoxview",{imageIndex:q,viewIndex:xa})});if(!b.yoxview.firstViewWithImages&&y.images.length>0){b.yoxview.firstViewWithImages=
i;f.cacheImagesInBackground&&b.yoxview.startCache()}});else{ka.images=J;Ta(i,f)}M.push(i);if(!b.yoxview.firstViewWithImages&&ka.images&&ka.images!=0){b.yoxview.firstViewWithImages=i;Aa(i);if(f.cacheImagesInBackground&&m!=0){Ha();ea(0)}}})}var f=b.extend({},gb,c),h;if(A.length==0){A.push(f);h=0}else h=c?H(f):null;kb(f.lang,function(){jb(f,function(g){g&&b.extend(f,b.yoxview.yoxviewSkins[f.skin].options);Yox.loadDataSource(f,e)})})};var hb={image:function(a,c,e,f){for(var h=null,g=0;g<f.allowedImageUrls.length&&
!h;g++)if(c.match(f.allowedImageUrls[g]))h={src:a.attr("href"),title:e.attr(f.titleAttribute),alt:e.attr("alt")};return h},flash:function(a,c,e,f){var h=null;var g=(a=c.match(Yox.Regex.flash))?null:c.match(Yox.Regex.flashvideo);if(a||g){h=Yox.getUrlData(c);c=Sa("flash",h.queryFields,f);if(h.queryFields){delete h.queryFields.width;delete h.queryFields.height}var i=b("<div>",{className:"yoxview_element",html:"<div class='yoxview_error'>Please install the latest version of the <a href='http://www.adobe.com/go/getflashplayer' target='_blank'>Flash player</a> to view content</div>"});
g=g?Yox.flashVideoPlayers[f.flashVideoPlayer](f.flashVideoPlayerPath,h.path,h.queryFields&&h.queryFields.image?h.queryFields.image:e[0].nodeName=="IMG"?e.attr("src"):null,e.attr(f.titleAttribute)):h.queryFields||{};if(a)g.swf=h.path;b.extend(g,yb);i.flash(g);h={element:i,title:e.attr(f.titleAttribute)};b.extend(h,c)}return h},ooembed:function(a,c){var e=null;for(videoProvider in Yox.Regex.video)if(c.match(Yox.Regex.video[videoProvider])){e={provider:videoProvider,url:c};break}return e},inline:function(a,
c,e,f){if(!f.allowInternalLinks)return null;a=null;if((c=Yox.getUrlData(c))&&c.anchor){c=b("#"+c.anchor);if(c.length!=0){e={width:parseInt(c.css("width")),height:parseInt(c.css("height"))};c.css({position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"block"});a={type:"inlineElement",element:c,title:c.attr("title")};f={horizontal:parseInt(c.css("padding-right"))+parseInt(c.css("padding-left")),vertical:parseInt(c.css("padding-top"))+parseInt(c.css("padding-bottom"))};e.width=isNaN(e.width)?
null:e.width+f.horizontal;e.height=isNaN(e.height)?null:e.height+f.vertical;b.extend(a,e);if(f.horizontal!=0||f.vertical!=0)a.padding=f;c.remove()}}return a},iframe:function(a,c,e,f){var h=null;if((a=a.attr("target"))&&a=="yoxview")if((c=Yox.getUrlData(c))&&c.path){f=Sa("iframe",c.queryFields,f);if(c.queryFields){delete c.queryFields.width;delete c.queryFields.height}h={element:b("<iframe>",{src:Yox.urlDataToPath(c),className:"yoxview_element"}),title:e.attr("title"),frameborder:"0"};b.extend(h,f)}return h}};
this.open=function(a,c,e){var f=this instanceof jQuery;if(f){if(a&&typeof a=="function")e=a;c=this.data("yoxview");a=c.viewIndex;c=c.imageIndex}else if(typeof a=="function"){e=a;a=c=0}else if(typeof c=="function"){e=c;c=0}a=a||0;c=c||0;b(document).bind("keydown.yoxview",nb);Aa(M[a]);!j&&m!=0&&Ra();b.yoxview.selectImage(c);t.stop().css({opacity:0,display:"block"}).animate({opacity:1},"slow",function(){t.css("opacity","")});d.cacheImagesInBackground&&ea(c);if(e)va=e;return f?this:false};this.selectImage=
function(a){b.yoxview.currentImage=v[a];u=a;Ua(true);B.blur();R.css({"z-index":"1",width:"100%",height:"100%"});K.css({display:"none","z-index":"2"});ia=true;j.css(Y);this.select(a)};this.refresh=function(){(ja=r)&&D();cb(u);ja&&ra()};this.options=function(a,c){if(!a)return this;if(c&&typeof a==="string"){var e=a;a={};a[e]=c}if(this instanceof jQuery){if(e=this.data("yoxview")){b.extend(A[e.optionsSet||0],a);this.yoxview("update")}return this}else{b.each(A,function(f,h){b.extend(h,a)});b.yoxview.update()}};
this.select=function(a,c){if(typeof c==="number")c=undefined;if(!U){if(a<0){a=m-1;if(d.onEnd){d.onEnd();return}}else if(a==m){a=0;if(d.onEnd){d.onEnd();return}}if(!r&&c){var e=c;e.css("opacity")==0&&e.stop().animate({opacity:0},d.buttonsFadeTime,mb(e))}b.yoxview.currentImage=v[a];u=a;cb(u);Ha();d.onSelect&&d.onSelect(a,v[a])}};this.prev=function(a){l.cacheDirectionForward=false;this.select(u-1,Q);r&&a!==true&&D()};this.next=function(a){l.cacheDirectionForward=true;this.select(u+1,ma);r&&a!==true&&
D()};this.first=function(){d.disableNotifications||na("first");this.select(0);r&&D()};this.last=function(){d.disableNotifications||na("last");this.select(m-1);r&&D()};this.setDefaults=function(a){b.extend(gb,a)};this.play=function(){if(!(!this.isOpen||m==1)){l.cacheDirectionForward=true;if(r){d.disableNotifications||na("pause");D()}else{d.disableNotifications||na("play");ra()}}};this.close=function(){if(this.isOpen){this.closeHelp();Ua(false);Ka(Y,function(){b.yoxview.isOpen=false});Ea();p&&da(function(){T.html("")});
s.animate({width:Y.width,height:Y.height},d.popupResizeTime,function(){s.css("opacity",1)});t.stop().fadeOut(1E3);r&&D();fb();d.onClose&&d.onClose();b(document).unbind("keydown.yoxview");U=false}};this.help=function(){if(this.isOpen)O.css("display")=="none"?O.css("display","block").stop().animate({opacity:0.8},d.buttonsFadeTime):this.closeHelp()};this.closeHelp=function(){O.css("display")!="none"&&O.stop().animate({opacity:0},d.buttonsFadeTime,function(){O.css("display","none")})};this.clickBtn=function(a,
c){c&&r&&D();a.call(this);return false};Z.bind("resize.yoxview",function(){F=Xa();b.yoxview.isOpen&&b.yoxview.resize()});b(ab).load(function(){b.extend(v[l.currentCacheImg].media,{width:this.width,height:this.height,loaded:true});Ga()}).error(function(){Ga()});this.startCache=function(){Aa(this.firstViewWithImages);Ha();ea(0)};var s=K,ga=R;this.resize=function(){if(r){ja=true;D()}var a=db(x);s.css({width:"100%",height:"100%"});U=true;ha||N.css({top:Math.round((a.height-ua.height)/2)});Ka(a,function(){var c=
{width:j.width(),height:j.height()};if(x.padding){c.width-=x.padding.horizontal;c.height-=x.padding.vertical}s.css(c);U=false;p&&qa();if(ja){ra();ja=false}})};b(Na).load(function(){this.width==0?wa("Image error"):ta(b.extend({},b.yoxview.currentImage.media,{width:this.width,height:this.height}))}).error(function(){wa("Image not found:<br /><span class='errorUrl'>"+this.src+"</span>")});this.update=function(){var a;if(this instanceof jQuery){a=A[this.data("yoxview").optionsSet||0];this.yoxview("unload",
function(c){c.yoxview(a)});return this}else{a=A[0];this.unload();b.each(M,function(c,e){e.yoxview(a)})}};this.unload=function(a){function c(){function f(g){g.undelegate(h,"click.yoxview").removeData("yoxview").yoxthumbs("unload","yoxview").find(h).removeData("yoxview")}var h=za(d);if(e instanceof jQuery)e.data("yoxview")&&f(e);else{jQuery.each(M,function(g,i){f(i)});Z.unbind(".yoxview");if(j){t.remove();j=undefined}}if(a)a(e);else return e}var e=this;if(!d)return this;d.onBeforeUnload?d.onBeforeUnload(c):
c()}}if(!b.yoxview)b.yoxview=new ib;b.fn.yoxview=function(H){if(this.length!=0)if(b.yoxview[H])return b.yoxview[H].apply(this,Array.prototype.slice.call(arguments,1));else typeof H==="object"||!H?b.yoxview.init(this,H):b.error("Method "+H+" does not exist on YoxView.");return this};b(Yox.getTopWindow()).unload(function(){if(b.yoxview){b.yoxview.unload();delete b.yoxview}})})(jQuery);
