/**
 * SqueezeBox - Expandable Lightbox
 *
 * Allows to open various content as modal,
 * centered and animated box.
 *
 * Dependencies: MooTools 1.2 trunk (04/2008)
 *
 * Inspired by
 *  ... Lokesh Dhakar	- The original Lightbox v2
 *
 * @version		1.1 rc3
 *
 * @license		MIT-style license
 * @author		Harald Kirschner <mail [at] digitarald.de>
 * @copyright	Author
 */

var SqueezeBox = {

	presets: {
		onOpen: $empty,
		onClose: $empty,
		onUpdate: $empty,
		onResize: $empty,
		onMove: $empty,
		onShow: $empty,
		onHide: $empty,
		size: {x: 600, y: 450},
		sizeLoading: {x: 200, y: 150},
		mai      nr <{x: 200 y: 152,
		mai      mag {x: 605 y: 1575
		mahd al <{xfalbesi    t: nullalbescnClndab:.2 te 200 y       gT-stI
 		si5555w: $em
 *layOpacit {x0.7b:.2 teassWind,
	''b:.2 teassO
 *lay
	''b: $em
 *layFxi  605 y:ry,
	Fxi  605 y: variouFxi  605 y:parse		mahd a // 'rel'5 y:parseSecure		mahd al <{shad,
      gT-sdocumenesi    t: nuajaxOpt
 *si  6: n605 : ninitialpty,funct
 *( = {
)	preseif (this.opt
 *s) return this;5 : n	this. = {
que$mealb(ox = {

	pding: {x: 200	this.o

ty,
	tcs.opt
 it {x0              u                   y:   unct
 *:sdood Kirscox = {

	pd).build(200	this.o
bound y: 0	th	wnd,
	'is.o
reposiKirs.bnd,ox = , [   t]),0	th	scroll	'is.o
checkTalbes.bnd,ox = ),0	thte 200	'is.o
e 200.bnd,ox = ),0	thtkey	'is.o
onKey.bnd,ox = )0	th  unct
 *:sis {
 y:
 *:sis
		siz y:ahd a uncteturn this;5 n605 : nibuildfunct
 *( 	preset
 *:s
 *layF y:neLr
 */


		siz y   ev',
	'is.i 	p's v2-eLr
 *'is.o
ole li: nidispm
 *lanone',5w: $em
  y:   unct
.5w: $e} *:sibound y: 0	o
r/


		siz y   ev',
	'is.i 	p's v2-o
repo'is.o
ole li: nidispm
 *lanone',5w: $em
  y:   unct
.5w: $e + 2} *:sibounpt
 *s) return thi. gT-sds
 *lapt
 *sBr toer.En   e.webkit420s
 *lapd y: 0	o
rox =Se li('-webkit- v2- gT-sd','0 0 10px rgba(y: y: y: y.7)'bounp:si ern  
 *s!Br toer.En   e.tridz y4s
 *lapd  Squ gT-sd/


		siz y   ev',
'
	''b'	p's v2-bg-wrap'}).inject(y: 0	o
rbounp:d  Squre
 */
reset
 *:ed  Squ gTect(
  y:   unct
.57#vy   ecsek'h	se]unp:d  S}th  unct
 unp:d  S['n'0 ',5w',5w's,5w's5w's,'0 ,'0 nw'].each(set
 *:eddir Squ gTect
		siz y   ev',
'
	''b'	p's v2-bg-w v2-bg-wr' 2}dir.inject(y:T-sds
 .add#vy   ecsek'he
 */unp:d  S}unp:d  *:sibod y: 0	o
5 y:par


		siz y   ev',
'
	p's v2-o
5 y:par).inject(y: 0	o
rbound y: 0	o
5gT-stI


		siz y   ea
'
	p's v2-o
btn-5gT-s
'href's #).inject(y: 0	o
rbound y: 0	o
fx
	'is.o
oy      /jx.Tween(Tect(
  y:  , = {

ir Squ propertm
 *o7b:.2 po'is.	onSh  tnuaated m)mnd y: me 0	earChaino'is.	oduraset
 1550o'is.	olink
 *cancseSecuruilem
  y:   unct  605 y:r))
rox(0),
	'is.o     /jx.Morphct(y: 0	o, = {

i'is.	onSh  tnuaated m)mnd y: me 0	earChaino'is.	ouninua'px'o'is.	oduraset
 1750o'is.	otransiset
 1jx.Transiset
s.Quintnw'seOuto'is.	olink
 *cancseSo'is.	ouninua'pxSecuruilem
  y:   unct 605 y: )),
	'i2-o
5 y     /jx.Tween(Tect(2-o
5 y, = {

ir Squ propertm
 *o7b:.2 po'is.	oduraset
 1550o'is.	olink
 *cancseSecuruilem
  y:   unt(2-o
5 y:r))
rox(0ct
 *:sis {$(,
	tcs. 0	dysds
:  (Tect(
  y:  , t(y: 0	o
ribuildfun
	'ign( 	preset
 to, eturn thi{ this;5 n605ods
 .add#vy   ecse 	preset
 *:s
 *his;5 n60!queezeBox .from
		si (Tect, eturn th;t
 *:
ribuildfunfrom
		si ( 	preset
 from, eturn thi{ thit(y: ,funct
 *(sibounpt
 *s) re
		si ) t(y: trash(siboun*s) re
		si ox = from)sdood Kirscox = {

= {

	pding: {x:t, eturn t u  {})sibounpt
 *s) re
		si  &&em
  y:   unt(e		mahi{ thp:d  Sobjox *s) re
		si .x =Propertm(m
  y:   unt(e		mah;
 *lapt
 objfx

  y:   unt(e		r20N.decodeunt(   unt(2-o
5 y:al <{shad,))) 
 *s) re
		si  sha,ibod y: 0	'ign( *s) re
iboun*s) re
url  u(s) re
		si ) t(?*s) return thi
url  {}) re
		si .x =Pr('
'hr'had: om)sd  {}''ound  Sobd al <{  u) return thi
d al <{ounpt
 *sd al <{s;5 : n	th))) 
 C
5 y:rsd al <{deunt(-o
5 yrs[d al <{].callect, ecumenibounp  Squretcteturn this;unt(-o
5 yrs.somech(set
 *:o
5 yr, nKe{ thp:d  Sobo
5 y:par
o
5 yr.callect, 
 *lapt
 obo
5 y:pir Squ gTretcteh))) 
 C
5 y:rsnKe,bo
5 y:p
 *laps;5 n60!qumen}unp:d  *ps;5 n60!eturn thih  tnuaat  *ps;5p  S	o
ribuildfun0	'ign( *s
 *( 	preset
 *:s
 *layF y:neLr))
rv',
'
.decodeunt(   u *lay
	''b:  *:sibound y: r))
rv',
'
.decodeunt(   u d,
	''b:.{})sibounp
 *s!Br toer.En   e.tridzound y: r5odCd,
(.i 	p's v2-o-ie6' *:
ribuild'is.o

 */
reset
 *:e *lapd toppndabe
ur$d y:et
 == 'e
 .a'{})sibounp toppndab) e. top({})sibounp!s {
 y:
 *om)sp toppndabobjf!$lambda t(?*s) returncnClndab)l <{].callececual <{s;5 : n		o
rbound y:yF y:neLr)nSh (0)l arCh t(?*stoggle
	''b:ox = )0	th  {})s *lapd y: 0	o
rox =Sei: nidi',pm
 *la{})s *lapd:   unct
.57		onClo ecsen(Tect(2-o
k'h	se ) t(y: trash(sibo(?*stoggleLis2-o-o
ash(sibo({
 y:
 *oa uncteturn this;5 n605 : nibuildy: tr
 *( 	preset
 *siboun*s) re
		si ibod y: u gT nuaj; *:sibod y: 0	o
. $emp()            y:   unct
 *:sdood Kremovunct
.
asKirscox = {

	pd).buil)l <{]CarCh  *:
ribuildonError
 *( 	preset
 *sibibod y: u gT nuaj; *:setcteh))) 
 C
5's   ng
.decodeunt(   uerrorMsgom)sdAn error oc5 yred' *:
ribuildh))) 
 C

 *( 	pres5 y:rsd alt
 obo
5 y)sibounp!s {
 y:rsdo
5 yrs[d a)  *ps;5 n60!et *:sibod y: 0	o
u d,
Nambe

'
	p's v2-o
v2-bg thi
d alsibibod ypplyTimd al <bod ypply)) 
 C
.dek'(ound y:yF y:neLeunt(   u.	oduras.decod, s {
 y:rsdo
5 yrs[d al <{].callalt
 obo
 {})sibounpt
 *yF y:neLere   e
 (m
 *o7b:.ual <{s;5 : n		o
rbou?*stoggle
	''b:o(t, ec	o
rbound y:yF y:neLr)nSh (ecodeunt(   uOpacit {x0.7b:nuaat  *ps;5reposiKirs.bnd,h  *:
ribuildypply)) 
 C

 *( 	pres5ct(2-o
5 t 605 y)sibounp!s {
 y:
 *objf!ibod ypplyTimd al <{s;5alsibibod ypplyTimd al $me 0	(ibod ypplyTimd aalsibibod h e.)) 
 C
({})sibounp!t
 obo
5 y)sirbou?*stogglez y:ahd(t, ec	o
bounp:si -sds
 *laps
		siz y:ahd)ecodeu 5 y:rsiidi',pm
 *la{})s *Close:   unct
.57		onClo ,   ad,))) 
 
5 yr.callect, 
 * 
5 yr[etcteh)))'arr0	o]7		onpd)slapd to[d al <{]) t
.57		onClo:  *:shtml'teh))) 
 C
5 y: y: y: y.7t
.57		onClo:hasCh

			onClo]) t
.57		onClos {$(,			onClo]d,))) 
 *s) r {

	pd).buil(2-o
5 t 605 y)sibt, 
 *e ) t(y: trash(sibo(?*?*stoggleze ) t(curuile(uile, *stogglezleLis2-o-o
ash(s*sto:rsiidi',pm
 *la{})s *Clo
as unct
.57		onClo gglez y:ahd(t,leze ) t(curuile(uilegglez yosiKirs.bnuruileildypply)(uile, d)stantlyError
 *( 	psve:5alsibibod yppl*( 	psve:5alsib||*sibi <{].calleb*/

rox(0ct
g{})hi{ t,  t]),0

rox(0ct
g{})t]),0od y: 0	o
. uiles. = {
qunp:si -sds
 *lap?) 
 C
5's   ng 600, y: 45 :) 
 C
5's   ng 600*( 	pr <{].calletois.o
bound dt5 :	o
. uile.x'is.	oheald. :	o
. uile.y'is.	olef. :( t]),0.em
 (b*/.em-:	o
. uile.em-) 
 C
5's   ng 200, y: 15.x) / 2)y: Iibib'is.	otop :( t]),0.ym
 (b*/.ym-:	o
. uile.ym-) 
 C
5's   ng 200, y: 15.y) / 2)y: Iibiblez yibod ypplyTimd aalsibibod h e.)) d)stantlyError

	''b:o(t0	th  und y:oyF y:nel*( 	psve: aalsib?*stoggle
	''b:z y:ahd(t,leze )= )0	th  {})s *lsy:oy  {})s *lapd y: 0	o
ron erro
 *( 	psve:5alsibib*( 	psve:md al <bod ypp50ps;5 n60!etu}Opacit {x0.7b:nuaat  *ps;5reposiKirs.bn: trash(sibo(?*ildypply)(utat'is.o

 */
fsh(s(utat'ap?)' thi{ th' :)' unct
 *:sd'par).inject(y: 0	o[fn]is;5 n605oild(200	thct(y: 60!etu obo
 {})sib[fn]is;5 n605oild(200	thct(y: 60!etu oox(0ct[fn]isetcdCdnct(y: 60!etu o 0!etu t, 
 * 
5 yr[et
5's   ng 200,:a[l t, 
 * 
5 yr[	o
. uetcdCd y: 0	o
. ui:.{})s(5's   ne, d)s t, 
 * 
5 yr[-o-ie65's   n	o
. u t, 
 * 
5 yr[-o-ie65ibo(?*ildypply)(ung 600

 */
fsh(s(utat'ap?)'	siz y:ahd a uncts(uta*lapd y: 0	o
[ :)' unct
 *:
(.i ).inject(y:
(.i )]	p's v2lhd a usibounp topp)' uncas unct
.57		onCloahd a uez y:a: 0	o
]5ibo(?*ildyppl	''b:o(t, 

 */
fsh(s(utat'ap?)' thi{roxt,  t]),0

rox(0ct
.x]is;5 n605oild(20ron erro
 *( 	psve:5a :)' unct
 ).i*la{})s *lapd:  tcs. 0	dys[ :)' unct
 *:
(.i ).inject(y:
(.i )]	p	dys-oild(20edsibounp topp)' u und y:oyF y:	o
. uOffT nuaj y: 0	o
. ui:.{})s(5
rox(0ct
.x -i{roxbounpd:  tcs. 0	dy0ron erro
 *: Iibi-ght	A:5ayF y:	o
. uOffT n= )0	th  {})s *lnpd:  tcs. 0	dy0ron erro
 *: Iibi-ght	A:5a''ileildypply)(uilps;5 n60!et 	preset
 *sibibnp top:ahd(t,leze 
ro*o7b:.ual <{sas unct
.57		onCShow: ez y:a: 0	o
]5ibund y:yF y(t,leze psve: 15ibo(?*ildy)) d n60!et 	preset
 *sibibnp top!:ahd(t,leze 
ro*o7b:.ual <{sas unct
.57		onCHide: ez y:a: 0	o
]5ibund y:yF y(t,leze ancseS(
rox(0c5ibo(?*ildyox = /
reset
 *:e *lapdswitch (e. nKe{ thp:dca})s'esc'00.bnd,ox = *:e;thp:dca})s'up'00ca})s'!etu :s;5 n60!et *:leildypply)(uils.bnd,ox = /
reset
 *:e *lapd;5 n60!
			onClo]) t
.57		onCe.tox = 5ibo(?*ildy.bn: trash/
reset
 *t'ap?)' tho
bout,  t]),0

rox(0ct
g{})t]),0od y: 0	o
. uiles. =t
g{}
bout,  t: 0	o
. uiles. =x(0ct
]is;5 n605oild(20ron erro
s(le.x'is.	ohe{}
bouile.'px'o'le.y'is.	olef}
bouiy'px'o'l?
d a *sibibnponCSh,0

rox(0ct
galeild  605 y:   ev',
'
	p's v2-o
5 y:par).inject(y: 0	o
rbo(y: 0	o
rbo(y.c[' v2-o
xe(s 0	o {

rox(0ct
galeildd y: 0		ge{}
bouile.'px'opply)(uilsnp top!:ahd(t,le: $e
ro*o70ct
 *:sis {$(,' uncas unct
.57		p?)' thi{ t.bn: trash(srr0	)15ibo(?*ildy))$ei{ t.pt
 *yF y:neLe5ibo(?*ildr0	) dy))$ei{ t.Error
 *( ml'teh))) dy))$ei{ t.[dr0	5 ydy))$ei{ t.[dr0	5Error
 s2-o-o
ash(sibo({
 y:
 *oaex = dbn: trash(sx.Tweeniebuildfun
	'ign$ex = decod, sx.Tweeniebu{
 y:
 *oaneLeunt(m
  y:HClo e:
 *oat
 *nt(m
  y:HClo e
 *o};
 *o#vy   ecse ex = de  y:       pty,
)) ex = de  y:unct
   pty,
)) ex = de  y:)))  pty,
));
 *o#vy   ecse t
 *nt( ex = deht	Autimag *si  6: n605 : niuildfun
	'ign05 : niab) e/\.(?:jpg|png|gif)$/id yest(si  sha,)eLe5ib$ibund y:yF
5's  ,)eLehutimag *si  6: n605 : niul'te$
	''b:o(t, ec	t
 *:e ei{ t.pt
$
	''b:o(t, ec	t
 *:e= {

= {

	pding: {x:t!

	pding:   ecg: Nodeei{ t.pt


	pding: *( 	psve:5i)$eia,)eLe5ib. ux(0(/#([\w-]+ng|uile.'px'oppl(5i)$ sha$(5i)$[1.[d:n
	'ign05?


	pding: $ibund yeeniebu{
 y,
 timag *si  6: n605 : niuildfun
	'ign05 : d yest(si{x:t!(/^) e/avabo(ipt|#)|gif)$/id yest(si   sha,)eLe5ib$ibund y:yF
5's  ,)iframutimag *si  6: n605 : niuildfun
	'ign05 :a,)eLe5ib sha,)eLe5ib$ibund y:yF
5's  ,)yr.caltimag *si  6: n605 : niuildfustogglezl}lo ty,
));
 *o#vy  :
 *oa t
 *nt( ex = deht	Autimag *si  5ibnCe.tox = 5ibo(*:smp
5 y:paIt	A. uiCarCh  *:
ribuildonError
smp.on:)' ildsmp.onabortildsmp.on's   nly) t
.57		onCe.tor
smp.on:)' ildsmp.onabortildsmp.on's   nldonError
eLe5ibsmp.. =x(i. gT-sds
 *la {

	alsibib1( 	psve:md aliuildfu)) 
 C
5 y	psve:5alsib||*sibi <{].calleb)) 
 Cs.	olef =Pr('
'hr'had:150},
		ma.x)) 
 Cs.	oyef =Pr('
'hr'had:150},
		ma.y)) 
 C
rox(0     smp.. =x(, y  smp.on err})) 
 Cf  n(sve:i(0 2; i--;i. gT-sdsifibnponCSh> s.	oli. gT-sds	o(y.c['*= s.	olct
nponCS;gT-sds	o(y.olc= s.	oS;gT-s- gT-sd','0 o(y.c[h> s.	oyi. gT-sds	o(y.cx'*= s.	oyct
npoa.y)gT-sds	o(y.c['= s.	oy;gT-s- g) 
 C
5 y		o(y.olc= o(y.olleildd y;gT-s-o(y.c['= o(y.c[leildd y;gT-rCh  *:
ribuild$(smpy;gT-rCsmpnldonE;gT-rCh  *:
ribu.. =x(c= o(y.ol;gT-rCh  *:
ribu.on errc= o(ya.y)gT-sd2-o
v2-bg thi
d a(h  *:
ribu 45 :) 
 C
5})F y:nel*( 	rror
smp.srcc= 5ib {

= {smp{x:tsmp.on:)' {x:tsmp.complete)tsmp.on:)' (uile.'px'oppl(h  *:
ribu sha[h  *:
ribu 45 :)] :donE;yF
5's  ,)eLehutimag *si  el5 : niul't el5 px'opplel.eLehu(uile.'px'oppl
 *la {

	cit {x0.7b:nua	onCtimag *si  el5 : niul't el5 px'opplelile.'px'oppl
 *la {

	cit {xbu{
 y,
 timag *si  5ibnCe.toxribu sha[h-o
5 y:par).eo#vst.HTML('i2-o
5 y    methooundall'y   uraset
 1550o'is     gT-sdo)'s v2-bg-wouiy'px',leucces t.bn: trash05 ptoxrib-o
v2-bg thi
d a(h  h05 ptbu{s2-o-o
ash(s*sto:rsiiA   e
ro05 p,  sha[h-o
5l <{sas *:
ribuildonError
smct(
  y:   unct,y'px',lFail	mahla {

	cit d,ox = ),0	thtkerCh  *:
ribuild.sx =bib1( 	psve:md build
ro{Ce.: {
}l <{s  ,)iframutimag *si  5ibnCe.toxribu sha[h-o
5:par).inject(y: mutima'
	'i2-o
5 y    = 5: {
,y'px'utimaBordmai 0,s. =x(0ct
]aset
 1550o'is.o
bound dt5 :	o
. uilt
 1550o'is.o
boyy   uraset
 1550o'ismutima gT-sdo)'
= {smp{xet
 1550o'ismutimaPre(uiltoxribbu sha[h-o
5( 	preset
 (uilturn thi{ this;5 n-o
v2-bg thi
d a(h  *:
ribu 45 )0	th  {})s *lsy:oy  {}))
smct(
  y:   unct-rCh  *:
ribuild$gle
	''b:ox = )0	th  {})s *y   ea
'
	p's	onClo:  *:sht,ox = *:e;thp:dca})sml'tehgT-sdo)'
= {smp{x'hguild
ro{Ce.: {
}l <{s
rs'.F y:neLe5ibo(?*:al <{
rs'.F y:neLe5ibo(ethoou;
)) ex = de  y:)o(?*:al <{) ex = de  y:)o(ethoou;
)) ex = de  y:)o(?*l
 *l <{) ex = de  y:)o(eel5 : ;