/**
 * flashgallery
 *
 * @version 0.3.4
 * @copyright 2011 flash-gallery.com
 */

if(JSON===void 0){var JSON;JSON||(JSON={});(function(){function d(d){return d<10?"0"+d:d}function n(d){m.lastIndex=0;return m.test(d)?'"'+d.replace(m,function(d){var c=t[d];return typeof c==="string"?c:"\\u"+("0000"+d.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+d+'"'}function o(d,l){var c,a,b,g,f=j,h,i=l[d];i&&typeof i==="object"&&typeof i.toJSON==="function"&&(i=i.toJSON(d));typeof p==="function"&&(i=p.call(l,d,i));switch(typeof i){case "string":return n(i);case "number":return isFinite(i)?String(i):
"null";case "boolean":case "null":return String(i);case "object":if(!i)return"null";j+=k;h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){g=i.length;for(c=0;c<g;c+=1)h[c]=o(c,i)||"null";b=h.length===0?"[]":j?"[\n"+j+h.join(",\n"+j)+"\n"+f+"]":"["+h.join(",")+"]";j=f;return b}if(p&&typeof p==="object"){g=p.length;for(c=0;c<g;c+=1)typeof p[c]==="string"&&(a=p[c],(b=o(a,i))&&h.push(n(a)+(j?": ":":")+b))}else for(a in i)Object.prototype.hasOwnProperty.call(i,a)&&(b=o(a,i))&&h.push(n(a)+
(j?": ":":")+b);b=h.length===0?"{}":j?"{\n"+j+h.join(",\n"+j)+"\n"+f+"}":"{"+h.join(",")+"}";j=f;return b}}if(typeof Date.prototype.toJSON!=="function")Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+d(this.getUTCMonth()+1)+"-"+d(this.getUTCDate())+"T"+d(this.getUTCHours())+":"+d(this.getUTCMinutes())+":"+d(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()};var q=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
m=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,j,k,t={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},p;if(typeof JSON.stringify!=="function")JSON.stringify=function(d,l,c){var a;k=j="";if(typeof c==="number")for(a=0;a<c;a+=1)k+=" ";else typeof c==="string"&&(k=c);if((p=l)&&typeof l!=="function"&&(typeof l!=="object"||typeof l.length!=="number"))throw Error("JSON.stringify");return o("",
{"":d})};if(typeof JSON.parse!=="function")JSON.parse=function(d,l){function c(a,g){var f,d,i=a[g];if(i&&typeof i==="object")for(f in i)Object.prototype.hasOwnProperty.call(i,f)&&(d=c(i,f),d!==void 0?i[f]=d:delete i[f]);return l.call(a,g,i)}var a,d=String(d);q.lastIndex=0;q.test(d)&&(d=d.replace(q,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(d.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return a=eval("("+d+")"),typeof l==="function"?c({"":a},""):a;throw new SyntaxError("JSON.parse");}})()}
jQuery.effects||function(d,n){function o(c){var a;return c&&c.constructor==Array&&c.length==3?c:(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))?[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)]:(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))?[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55]:(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))?[parseInt(a[1],16),parseInt(a[2],
16),parseInt(a[3],16)]:(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))?[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]:/rgba\(0, 0, 0, 0\)/.exec(c)?p.transparent:p[d.trim(c).toLowerCase()]}function q(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,a={},b,g;if(c&&c.length&&c[0]&&c[c[0]])for(var f=c.length;f--;)b=c[f],typeof c[b]=="string"&&(g=b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),a[g]=c[b]);else for(b in c)typeof c[b]===
"string"&&(a[b]=c[b]);return a}function m(c){var a,b;for(a in c)b=c[a],(b==null||d.isFunction(b)||a in l||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))&&delete c[a];return c}function j(c,a){var b={_:0},g;for(g in a)c[g]!=a[g]&&(b[g]=a[g]);return b}function k(c,a,b,g){if(typeof c=="object")g=a,b=null,a=c,c=a.effect;d.isFunction(a)&&(g=a,b=null,a={});if(typeof a=="number"||d.fx.speeds[a])g=b,b=a,a={};d.isFunction(b)&&(g=b,b=null);a=a||{};b=b||a.duration;b=d.fx.off?0:typeof b=="number"?
b:b in d.fx.speeds?d.fx.speeds[b]:d.fx.speeds._default;g=g||a.complete;return[c,a,b,g]}function t(c){return!c||typeof c==="number"||d.fx.speeds[c]?!0:typeof c==="string"&&!d.effects[c]?!0:!1}d.effects={};d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(c,a){d.fx.step[a]=function(b){if(!b.colorInit){var c;c=b.elem;var f=a,h;do{h=d.curCSS(c,f);if(h!=""&&h!="transparent"||d.nodeName(c,"body"))break;f="backgroundColor"}while(c=
c.parentNode);c=o(h);b.start=c;b.end=o(b.end);b.colorInit=!0}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var p={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],
darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],
maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},s=["add","remove","toggle"],l={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};d.effects.animateClass=function(c,a,b,g){d.isFunction(b)&&(g=b,b=null);return this.queue("fx",function(){var f=d(this),h=f.attr("style")||
" ",i=m(q.call(this)),r,l=f.attr("className");d.each(s,function(a,b){if(c[b])f[b+"Class"](c[b])});r=m(q.call(this));f.attr("className",l);f.animate(j(i,r),a,b,function(){d.each(s,function(a,b){if(c[b])f[b+"Class"](c[b])});typeof f.attr("style")=="object"?(f.attr("style").cssText="",f.attr("style").cssText=h):f.attr("style",h);g&&g.apply(this,arguments)});i=d.queue(this);r=i.splice(i.length-1,1)[0];i.splice(1,0,r);d.dequeue(this)})};d.fn.extend({_addClass:d.fn.addClass,addClass:function(c,a,b,g){return a?
d.effects.animateClass.apply(this,[{add:c},a,b,g]):this._addClass(c)},_removeClass:d.fn.removeClass,removeClass:function(c,a,b,g){return a?d.effects.animateClass.apply(this,[{remove:c},a,b,g]):this._removeClass(c)},_toggleClass:d.fn.toggleClass,toggleClass:function(c,a,b,g,f){return typeof a=="boolean"||a===n?b?d.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,g,f]):this._toggleClass(c,a):d.effects.animateClass.apply(this,[{toggle:c},a,b,g])},switchClass:function(c,a,b,g,f){return d.effects.animateClass.apply(this,
[{add:a,remove:c},b,g,f])}});d.extend(d.effects,{version:"1.8.12",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){a=="toggle"&&(a=c.is(":hidden")?"show":"hide");return a},getBaseline:function(c,a){var b,g;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":g=
0;break;case "center":g=0.5;break;case "right":g=1;break;default:g=c[1]/a.width}return{x:g,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var a={width:c.outerWidth(!0),height:c.outerHeight(!0),"float":c.css("float")},b=d("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();c.css("position")=="static"?(b.css({position:"relative"}),c.css({position:"relative"})):
(d.extend(a,{position:c.css("position"),zIndex:c.css("z-index")}),d.each(["top","left","bottom","right"],function(b,f){a[f]=c.css(f);isNaN(parseInt(a[f],10))&&(a[f]="auto")}),c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"}));return b.css(a).show()},removeWrapper:function(c){return c.parent().is(".ui-effects-wrapper")?c.parent().replaceWith(c):c},setTransition:function(c,a,b,g){g=g||{};d.each(a,function(a,d){unit=c.cssUnit(d);unit[0]>0&&(g[d]=unit[0]*b+unit[1])});return g}});d.fn.extend({effect:function(c,
a,b,g){var f=k.apply(this,arguments),h={options:f[1],duration:f[2],callback:f[3]},f=h.options.mode,i=d.effects[c];return d.fx.off||!i?f?this[f](h.duration,h.callback):this.each(function(){h.callback&&h.callback.call(this)}):i.call(this,h)},_show:d.fn.show,show:function(c){if(t(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:d.fn.hide,hide:function(c){if(t(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,
arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:d.fn.toggle,toggle:function(c){if(t(c)||typeof c==="boolean"||d.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];d.each(["em","px","%","pt"],function(c,f){a.indexOf(f)>0&&(b=[parseFloat(a),f])});return b}});d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(c,
a,b,g,f){return d.easing[d.easing.def](c,a,b,g,f)},easeInQuad:function(c,a,b,g,f){return g*(a/=f)*a+b},easeOutQuad:function(c,a,b,g,f){return-g*(a/=f)*(a-2)+b},easeInOutQuad:function(c,a,b,g,f){return(a/=f/2)<1?g/2*a*a+b:-g/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,g,f){return g*(a/=f)*a*a+b},easeOutCubic:function(c,a,b,g,f){return g*((a=a/f-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,g,f){return(a/=f/2)<1?g/2*a*a*a+b:g/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,g,f){return g*(a/=f)*a*a*a+
b},easeOutQuart:function(c,a,b,g,f){return-g*((a=a/f-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,g,f){return(a/=f/2)<1?g/2*a*a*a*a+b:-g/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,g,f){return g*(a/=f)*a*a*a*a+b},easeOutQuint:function(c,a,b,g,f){return g*((a=a/f-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,g,f){return(a/=f/2)<1?g/2*a*a*a*a*a+b:g/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,g,f){return-g*Math.cos(a/f*(Math.PI/2))+g+b},easeOutSine:function(c,a,b,g,f){return g*Math.sin(a/
f*(Math.PI/2))+b},easeInOutSine:function(c,a,b,g,f){return-g/2*(Math.cos(Math.PI*a/f)-1)+b},easeInExpo:function(c,a,b,g,f){return a==0?b:g*Math.pow(2,10*(a/f-1))+b},easeOutExpo:function(c,a,b,g,f){return a==f?b+g:g*(-Math.pow(2,-10*a/f)+1)+b},easeInOutExpo:function(c,a,b,g,f){return a==0?b:a==f?b+g:(a/=f/2)<1?g/2*Math.pow(2,10*(a-1))+b:g/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,g,f){return-g*(Math.sqrt(1-(a/=f)*a)-1)+b},easeOutCirc:function(c,a,b,g,f){return g*Math.sqrt(1-(a=a/f-1)*
a)+b},easeInOutCirc:function(c,a,b,g,f){return(a/=f/2)<1?-g/2*(Math.sqrt(1-a*a)-1)+b:g/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,g,f){var c=1.70158,d=0,i=g;if(a==0)return b;if((a/=f)==1)return b+g;d||(d=f*0.3);i<Math.abs(g)?(i=g,c=d/4):c=d/(2*Math.PI)*Math.asin(g/i);return-(i*Math.pow(2,10*(a-=1))*Math.sin((a*f-c)*2*Math.PI/d))+b},easeOutElastic:function(c,a,b,g,f){var c=1.70158,d=0,i=g;if(a==0)return b;if((a/=f)==1)return b+g;d||(d=f*0.3);i<Math.abs(g)?(i=g,c=d/4):c=d/(2*Math.PI)*
Math.asin(g/i);return i*Math.pow(2,-10*a)*Math.sin((a*f-c)*2*Math.PI/d)+g+b},easeInOutElastic:function(c,a,b,g,f){var c=1.70158,d=0,i=g;if(a==0)return b;if((a/=f/2)==2)return b+g;d||(d=f*0.3*1.5);i<Math.abs(g)?(i=g,c=d/4):c=d/(2*Math.PI)*Math.asin(g/i);return a<1?-0.5*i*Math.pow(2,10*(a-=1))*Math.sin((a*f-c)*2*Math.PI/d)+b:i*Math.pow(2,-10*(a-=1))*Math.sin((a*f-c)*2*Math.PI/d)*0.5+g+b},easeInBack:function(c,a,b,g,f,d){d==n&&(d=1.70158);return g*(a/=f)*a*((d+1)*a-d)+b},easeOutBack:function(c,a,b,g,
d,h){h==n&&(h=1.70158);return g*((a=a/d-1)*a*((h+1)*a+h)+1)+b},easeInOutBack:function(c,a,b,g,d,h){h==n&&(h=1.70158);return(a/=d/2)<1?g/2*a*a*(((h*=1.525)+1)*a-h)+b:g/2*((a-=2)*a*(((h*=1.525)+1)*a+h)+2)+b},easeInBounce:function(c,a,b,g,f){return g-d.easing.easeOutBounce(c,f-a,0,g,f)+b},easeOutBounce:function(c,a,b,d,f){return(a/=f)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,
a,b,g,f){return a<f/2?d.easing.easeInBounce(c,a*2,0,g,f)*0.5+b:d.easing.easeOutBounce(c,a*2-f,0,g,f)*0.5+g*0.5+b}})}(jQuery);
(function(d,n){function o(){var c=document.getElementsByTagName("script");return c[c.length-1].src||location.href}function q(c){return'url("'+c+'")'}function m(c){var a=[],b,d;for(b in c)for(d in c[b].items)a.push(c[b].items[d]);return a}function j(c){this.element=d(c);this.width=function(a){return this.element.width(a)};this.height=function(a){return this.element.height(a)};this.drawImage=function(a,b,c){var b=d.extend({left:0,top:0,width:120,height:90,scaleMode:"fill",background:"none"},b),c=c===
n?this.element:d(c,this.element),f=new Image;f.src=a.thumb;f.onload=function(){var h=document.createElement("a");d(h).attr({href:a.source});d(h).css({display:"block",position:"absolute",left:b.x,top:b.y,zIndex:b.z,width:b.width,height:b.height,overflow:"hidden",background:b.background,opacity:b.opacity});d(h).click(b.onclick);d(h).hover(b.onmouseover,b.onmouseout);var i=document.createElement("img");i.src=f.src;var r;b.scaleMode=="fit"?r=s.fit(this.width,this.height,b.width,b.height):b.scaleMode==
"fill"&&(r=s.fill(this.width,this.height,b.width,b.height));d(i).css({marginTop:r.top,marginRight:0,marginBottom:0,marginLeft:r.left,width:r.width,height:r.height,padding:0,border:"none",maxWidth:"none",maxHeight:"none"});d(h).append(i);c.append(h)}}}function k(c,a,b){this.canvas=c;this.albums=a;this.items=m(a);this.currentItem=-1;this.getCurrentItem=function(){return this.items[this.currentItem]};this.settings=d.extend(!0,{thumbnail:{width:160,height:120,alpha:85}},b);this.page=0;this.render()}function t(c,
a){c=d(c);l=a;var b,g,f;b=a.config||{};(function(){function a(b,c,d){g.push({id:c||0,description:d||"Album "+(c+1),items:b})}g=[];if(typeof b.albums=="array")for(var f in b.albums)a(b.albums[f].items,f,b.albums[f].description);else if(typeof b.items=="array")a(b.items);else{f=c.find("ul:first > li");var r=function(a){var b=[];d(a).find("img").each(function(){b.push({source:d(this).parent("a").attr("href")||d(this).attr("src"),thumb:d(this).attr("src"),description:this.title})});return b};if(f.length){var l=
0;f.each(function(){a(r(this),l++)})}else a(r(c))}})();e=document.createElement("div");f=new j(e);f.element.addClass("altgallery-canvas");f.element.css({display:"block",position:"relative",width:a.width,height:a.height,overflow:"hidden",margin:0,padding:0,background:a.background});c.empty().append(e);a.type.toLowerCase()=="box"&&new k(f,g,b.settings||{})}o();var p=o().replace(/[^\/]*$/,""),s={fit:function(c,a,b,g,f){var h,i,l=c/a,f=d.extend({noEnlarge:!1,minWidth:16,minHeight:16},f);h=b;i=b/l;i>g&&
(i=g,h=i*l);if(h<f.minWidth)h=f.minWidth,i=h/l;if(i<f.minHeight)i=f.minHeight,h=i*l;if(f.noEnlarge&&(h>c||i>a))h=c,i=a;c=(g-i)/2;return{left:parseInt((b-h)/2),top:parseInt(c),width:parseInt(h),height:parseInt(i)}},fill:function(c,a,b,d){var f=c/a,c=b,a=b/f;a<d&&(a=d,c=a*f);d=(d-a)/2;return{left:parseInt((b-c)/2),top:parseInt(d),width:parseInt(c),height:parseInt(a)}}};k.prototype.render=function(c){var a=this,b=this.canvas,g=this.items;if(c===n)c=a.page;b.element.empty();var f=this.canvas.width(),
h=this.canvas.height(),i=parseInt((f-50)/this.settings.thumbnail.width),r=parseInt((h-50)/this.settings.thumbnail.height),u=Math.ceil(g.length/i);r>u&&(r=u);u=i*r;c*=u;a.pagesCount=Math.ceil(g.length/u);var j=this.settings.thumbnail.width+2,m=this.settings.thumbnail.height+2,k=(f-j*i)/2-8,p=(h-m*r)/2-8,s=this.settings.thumbnail.alpha/100,o=d('<div class="altgallery-frame" />'),f={position:"absolute",left:parseInt(k),top:parseInt(p),width:parseInt(f-(k+8)*2)+14,height:parseInt(h-(p+8)*2)+14,overflow:"hidden",
background:"#fff",borderRadius:"4px",MozBorderRadius:"4px",webkitBorderRadius:"4px",boxShadow:"0 0 10px rgba(0, 0, 0, 0.5)",MozBoxShadow:"0 0 10px rgba(0, 0, 0, 0.5)",webkitBoxShadow:"0 0 10px rgba(0, 0, 0, 0.5)"};o.css(f);a.page>0&&(h=d('<a class="altgallery-page" style="left:4px; background:no-repeat center; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px;"></a>'),h.css({backgroundImage:q(l.images.left)}),h.click(function(){a.prevPage()}),o.append(h));a.page<a.pagesCount-1&&
(h=d('<a class="altgallery-page" style="right:4px; background:no-repeat center; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px;"></a>'),h.css({backgroundImage:q(l.images.right)}),h.click(function(){a.nextPage()}),o.append(h));o.find(".altgallery-page").css({position:"absolute",width:"30px",height:"30px",top:parseInt(f.height/2)-15,zIndex:20,cursor:"pointer"});o.hover(function(){o.find(".altgallery-page").show()},function(){o.find(".altgallery-page").hide()});b.element.append(o);
h=d('<div class="altgallery-frameMask" />');f.background="#000";f.opacity=0.6;f.zIndex=20;f.boxShadow="none";f.MozBoxShadow="none";f.webkitBoxShadow="none";h.css(f).hide();b.element.append(h);for(var t=1,v=1,f=c,h=-1,r=g.length;f<r;f++){if(f>=u+c)break;f%i||h++;t=f%i*j+8;v=h*m+8;(function(c,d,f){b.drawImage(g[c],{x:parseInt(d),y:parseInt(f),z:10,width:a.settings.thumbnail.width,height:a.settings.thumbnail.height,scaleMode:"fill",opacity:s,onclick:function(){a.currentItem=c;a.open(a.getCurrentItem(),
{left:parseInt(d+k),top:parseInt(f+p)});return!1},onmouseover:function(){this.style.opacity=1},onmouseout:function(){this.style.opacity=s}},".altgallery-frame")})(f,t,v)}};k.prototype.open=function(c,a){var b=this,g=document.createElement("img");g.src=c.thumb;var f=new Image;f.onload=function(){d(".altgallery-imageFrame",b.canvas.element).remove();d(".altgallery-frameMask",b.canvas.element).fadeIn(l.animation.duration);var c=document.createElement("div");d(c).addClass("altgallery-imageFrame").css({position:"absolute",
padding:8,background:"#000",zIndex:30});d(c).hide();var h=s.fit(f.width,f.height,b.canvas.width()-48,b.canvas.height()-48),j={left:h.left+16+h.width/3,top:h.top+16+h.height/3,width:h.width/3,height:h.height/3};if(a!==n){if(a.left!==n)j.left=a.left;if(a.top!==n)j.top=a.top}d(c).css(j);var k=s.fit(f.width,f.height,b.canvas.width()-48,b.canvas.height()-48),m={left:k.left+16+k.width/3,top:k.top+16+k.height/3,width:k.width/3,height:k.height/3,margin:0,padding:0,border:"none",maxWidth:"none",maxHeight:"none",
cursor:"pointer"};d(g).css(m);d(c).append(g);b.canvas.element.append(c);d(g).animate(k,l.animation.duration);d(c).animate({opacity:"show",left:h.left+16,top:h.top+16,width:h.width,height:h.height},l.animation.duration,function(){var a=d('<a class="altgallery-close" style="position:absolute; right:-15px; top:-13px; width:30px; height:30px; z-index:40; background:no-repeat center; cursor:pointer;"></a>');a.css({backgroundImage:q(l.images.close)});a.click(function(){d(this).remove();j.opacity="hide";
d(c).animate(j,l.animation.duration,function(){d(this).remove()});d(g).animate(m,l.animation.duration);d(".altgallery-frameMask",b.canvas.element).fadeOut(l.animation.duration)});d(c).append(a)});d(g).click(function(){d(".altgallery-close",c).remove();j.opacity="hide";d(c).animate(j,l.animation.duration,function(){d(this).remove();b.next()});d(g).animate(m,l.animation.duration)})};f.src=c.thumb;var h=new Image;h.onload=function(){d(g).attr("src",c.source)};h.src=c.source};k.prototype.prev=function(){this.currentItem--;
if(this.currentItem<0)this.currentItem=this.items.length-1;this.open(this.getCurrentItem())};k.prototype.next=function(){this.currentItem++;if(this.currentItem>=this.items.length)this.currentItem=0;this.open(this.getCurrentItem())};k.prototype.prevPage=function(){this.page--;this.render(this.page)};k.prototype.nextPage=function(){this.page++;this.render(this.page)};var l={};d.fn.altgallery=function(c){c=d.extend(!0,{type:"Box",width:"550px",height:"400px",background:"none",images:{folder:p+"img/",
left:"left.png",right:"right.png",close:"close.png"},animation:{duration:500}},c);if(c.images.folder){c.images.folder=c.images.folder.replace(/\/+$/,"")+"/";for(var a in c.images)a!="folder"&&(c.images[a]=c.images.folder+c.images[a].replace(/^\/+/,""))}this.each(function(){t(this,c)});return this};d.altbox=function(c,a){a=d.extend(!0,{frame:{color:"#000",borderRadius:0},mask:{color:"#000",opacity:0.7},images:{folder:p+"img/",close:"close.png",loader:"loader.gif"},animation:{duration:700}},a);if(a.images.folder)for(var b in a.images)b!=
"folder"&&!a.images[b].match("/")&&(a.images[b]=a.images.folder+a.images[b]);var g=d('<div style="position:fixed; z-index:999; left:0; top:0; width:100%; height:100%; background:no-repeat center;"></div>');g.css({opacity:0,backgroundColor:a.mask.color,backgroundImage:q(a.images.loader)});d(document.body).append(g);g.animate({opacity:a.mask.opacity},a.animation.duration);var f=new Image;f.src=c;f.onload=function(){function b(){g.remove();m.remove()}var i=d(window).width()-100,l=d(window).height()-
100,j=s.fit(f.width/4,f.height/4,i,l,{noEnlarge:!0,minWidth:100,minHeight:100});j.left+=50;j.top+=50;var k=s.fit(f.width+20,f.height+20,i,l,{noEnlarge:!0,minWidth:120,minHeight:120});k.left+=50;k.top+=50;var m=d('<div style="position:fixed; z-index:1000;"></div>');m.css(j);m.css({backgroundColor:a.frame.color,borderRadius:a.frame.borderRadius});m.hide();var o=d('<img src="'+c+'" alt="" style="display:block;" />');o.css({margin:"10px",width:j.width-20,height:j.height-20,borderRadius:a.frame.borderRadius>
8?a.frame.borderRadius-8:0});var n=d('<a href="#" style="display:block; position:absolute; right:-12px; top:-10px; width:30px; height:30px; background:no-repeat center;"></a>');n.css({backgroundImage:q(a.images.close)});m.append(o);d(document.body).append(m);(function(){g.css({backgroundImage:"none"});o.animate({width:k.width-20,height:k.height-20,margin:"10px"},a.animation.duration,"easeOutBack");k.opacity="show";m.animate(k,a.animation.duration,"easeOutBack",function(){m.append(n)})})();d(window).resize(function(){i=
d(window).width()-100;l=d(window).height()-100;j=s.fit(f.width/4,f.height/4,i,l,{noEnlarge:!0,minWidth:100,minHeight:100});j.left+=50;j.top+=50;k=s.fit(f.width+20,f.height+20,i,l,{noEnlarge:!0,minWidth:120,minHeight:120});k.left+=50;k.top+=50;m.css(k);o.css({width:k.width-20,height:k.height-20})});g.click(b);n.click(function(){n.remove();j.opacity="hide";m.animate(j,a.animation.duration*0.67);o.animate({width:j.width-20,height:j.height-20},a.animation.duration*0.67);g.fadeOut(a.animation.duration,
function(){b()});return!1})}}})(jQuery);
(function(d,n){window.flashgallery_id=window.flashgallery_id||0;d.flashgallery=d.flashgallery||function(o,q,m,j){function k(d){if(d.gallery!=n){if(d.gallery.items!=n){var d=d.gallery.items,c="",a;for(a in d){var b=d[a];if(b.thumb==n)b.thumb=b.source;c+='<li><a href="'+b.source+'"><img src="'+b.thumb+'" alt="'+b.description+'" /></a></li>'}j.html("<ol>"+c+"</ol>")}else if(d.gallery.albums!=n){var g=d.gallery.albums,f="",h;for(h in g){d=g[h].items;c="";for(a in d){b=d[a];if(b.thumb==n)b.thumb=b.source;
c+='<li><a href="'+b.source+'"><img src="'+b.thumb+'" alt="'+b.description+'" /></a></li>'}f+="<ol>"+c+"</ol>"}j.html("<ol>"+f+"</ol>")}j.altgallery(m)}}q=typeof q=="object"?{config:JSON.stringify(q)}:{configPath:q};m=d.extend({width:"550px",height:"400px",background:"transparent"},m);window.flashgallery_id++;var t="flashgallery-"+window.flashgallery_id;j==n?document.write('<div id="'+t+'"></div>'):d(j).html('<div id="'+t+'"></div>');j=d(document.getElementById(t));j.css({width:m.width,height:m.height,
background:m.background,overflow:"hidden"});var p={allowScriptAccess:"sameDomain",allowFullScreen:"true",wmode:"opaque",quality:"high"},s;(s=m.background.match(/(#[0-9a-f]+)/i))?p.bgcolor=s[1]:p.wmode="transparent";swfobject.embedSWF(o,t,m.width,m.height,"10.0.12.36","http://swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf",q,p,{},function(j){j.success||(q.configPath!=n?d.ajax({url:q.configPath,dataType:"json",success:function(c){k(c)}}):k(q.config))})};d.fn.flashgallery=d.fn.flashgallery||
function(o,n,m){d.flashgallery(o,n,m,this)}})(jQuery);
