diff --git a/src/.htaccess b/src/.htaccess index faae4d2..808a634 100644 --- a/src/.htaccess +++ b/src/.htaccess @@ -27,3 +27,4 @@ Redirect 301 /Jardin/ http://www.estudiomiguelo.com/jardin/ Redirect 301 /Mesas/ http://www.estudiomiguelo.com/mesas/ Redirect 301 /Reformas/ http://www.estudiomiguelo.com/reformas/ Redirect 301 /Techos/ http://www.estudiomiguelo.com/techos/ +Redirect 301 /Trabajos/Jardin1.jpg http://www.estudiomiguelo.com/jardin/Jardin1.jpg \ No newline at end of file diff --git a/src/Plantilla.html b/src/Plantilla.html index 820c3a7..f9ad54a 100644 --- a/src/Plantilla.html +++ b/src/Plantilla.html @@ -1,29 +1,29 @@ - - - - -Documento sin título - - - - - - - - + + + + +Documento sin título + + + + + + + + diff --git a/src/acerca-de.html b/src/acerca-de.html index 966c460..416d890 100644 --- a/src/acerca-de.html +++ b/src/acerca-de.html @@ -1,54 +1,54 @@ - - - - - - - - - - Estudio de diseño y decoración Miguelo en Rivas, Madrid - Nuestra empresa - - - - - - - - - -
- -
-

Nuestra empresa es un proyecto familiar nacido de la ilusión y el esfuerzo de muchos años de experiencia en este sector.

-

 

-

-

 

-

Ofrecemos un trabajo profesional cargado de ideas con un personal joven y emprendedor, que dota de distinción y frescura nuestros proyectos.

-

Seguimos las tendencias actuales uniéndolas a la funcionalidad necesaria para nuestra vida cotidiana.

-

Diseñamos para particulares, constructoras, decoradores,... dando un trato personalizado y adaptándonos a las necesidades de cada cliente ofreciendo la mejor propuesta para cada espacio.

-

Después de muchos años, hemos llegado a la conclusión de que el complemento perfecto para un proyecto ideal, es un buen montaje.

-
- - - - + + + + + + + + + + Estudio de diseño y decoración Miguelo en Rivas, Madrid - Nuestra empresa + + + + + + + + + +
+ +
+

Nuestra empresa es un proyecto familiar nacido de la ilusión y el esfuerzo de muchos años de experiencia en este sector.

+

 

+

+

 

+

Ofrecemos un trabajo profesional cargado de ideas con un personal joven y emprendedor, que dota de distinción y frescura nuestros proyectos.

+

Seguimos las tendencias actuales uniéndolas a la funcionalidad necesaria para nuestra vida cotidiana.

+

Diseñamos para particulares, constructoras, decoradores,... dando un trato personalizado y adaptándonos a las necesidades de cada cliente ofreciendo la mejor propuesta para cada espacio.

+

Después de muchos años, hemos llegado a la conclusión de que el complemento perfecto para un proyecto ideal, es un buen montaje.

+
+ + + + diff --git a/src/armarios.html b/src/armarios.html index dfd8803..f18e883 100644 --- a/src/armarios.html +++ b/src/armarios.html @@ -1,57 +1,57 @@ - - - - - - - - - - Estudio Miguelo en Rivas, Madrid - Armarios - Armarios a medida - Vestidores - Frentes e interiores de armario - - - - - - - - -
- -
-

ARMARIOS

-

 

Armario Serie Perseo. Lacado Hueso - Cristal Lacado Color Tabaco

- -

 

Armario Serie Lira. Lacado Hueso con Cristal y Cortinilla

- -

 

Armario Serie Argo. Lacado Gris Estriado

- -

 

Armario Serie Cronos. Melamina Arena y Cristal Lacado Color Tabaco

- -

 

Armario Serie Argo. Lacado Blanco

- -

 

- -

 

- -

 

-
-
- - - - + + + + + + + + + + Estudio Miguelo en Rivas, Madrid - Armarios - Armarios a medida - Vestidores - Frentes e interiores de armario + + + + + + + + +
+ +
+

ARMARIOS

+

 

Armario Serie Perseo. Lacado Hueso - Cristal Lacado Color Tabaco

+ +

 

Armario Serie Lira. Lacado Hueso con Cristal y Cortinilla

+ +

 

Armario Serie Argo. Lacado Gris Estriado

+ +

 

Armario Serie Cronos. Melamina Arena y Cristal Lacado Color Tabaco

+ +

 

Armario Serie Argo. Lacado Blanco

+ +

 

+ +

 

+ +

 

+
+
+ + + + diff --git a/src/banos/bano1.jpg b/src/banos/bano1.jpg new file mode 100644 index 0000000..57d11c9 Binary files /dev/null and b/src/banos/bano1.jpg differ diff --git a/src/banos/bano10.jpg b/src/banos/bano10.jpg new file mode 100644 index 0000000..aa97afd Binary files /dev/null and b/src/banos/bano10.jpg differ diff --git a/src/banos/bano10_p.jpg b/src/banos/bano10_p.jpg new file mode 100644 index 0000000..2c83077 Binary files /dev/null and b/src/banos/bano10_p.jpg differ diff --git a/src/banos/bano11.jpg b/src/banos/bano11.jpg new file mode 100644 index 0000000..659a487 Binary files /dev/null and b/src/banos/bano11.jpg differ diff --git a/src/banos/bano11_p.jpg b/src/banos/bano11_p.jpg new file mode 100644 index 0000000..6bafafd Binary files /dev/null and b/src/banos/bano11_p.jpg differ diff --git a/src/banos/bano12.jpg b/src/banos/bano12.jpg new file mode 100644 index 0000000..a2a9a79 Binary files /dev/null and b/src/banos/bano12.jpg differ diff --git a/src/banos/bano12_p.jpg b/src/banos/bano12_p.jpg new file mode 100644 index 0000000..9e52c98 Binary files /dev/null and b/src/banos/bano12_p.jpg differ diff --git a/src/banos/bano13.jpg b/src/banos/bano13.jpg new file mode 100644 index 0000000..ac2c70c Binary files /dev/null and b/src/banos/bano13.jpg differ diff --git a/src/banos/bano13_p.jpg b/src/banos/bano13_p.jpg new file mode 100644 index 0000000..8df86ec Binary files /dev/null and b/src/banos/bano13_p.jpg differ diff --git a/src/banos/bano14.jpg b/src/banos/bano14.jpg new file mode 100644 index 0000000..9438f65 Binary files /dev/null and b/src/banos/bano14.jpg differ diff --git a/src/banos/bano14_p.jpg b/src/banos/bano14_p.jpg new file mode 100644 index 0000000..fb910d9 Binary files /dev/null and b/src/banos/bano14_p.jpg differ diff --git a/src/banos/bano15.JPG b/src/banos/bano15.JPG new file mode 100644 index 0000000..598c550 Binary files /dev/null and b/src/banos/bano15.JPG differ diff --git a/src/banos/bano15_p.JPG b/src/banos/bano15_p.JPG new file mode 100644 index 0000000..105dbaa Binary files /dev/null and b/src/banos/bano15_p.JPG differ diff --git a/src/banos/bano1_p.jpg b/src/banos/bano1_p.jpg new file mode 100644 index 0000000..1d61f74 Binary files /dev/null and b/src/banos/bano1_p.jpg differ diff --git a/src/banos/bano2.jpg b/src/banos/bano2.jpg new file mode 100644 index 0000000..10b5188 Binary files /dev/null and b/src/banos/bano2.jpg differ diff --git a/src/banos/bano2_p.jpg b/src/banos/bano2_p.jpg new file mode 100644 index 0000000..f743a93 Binary files /dev/null and b/src/banos/bano2_p.jpg differ diff --git a/src/banos/bano3.jpg b/src/banos/bano3.jpg new file mode 100644 index 0000000..a7afba8 Binary files /dev/null and b/src/banos/bano3.jpg differ diff --git a/src/banos/bano3_p.jpg b/src/banos/bano3_p.jpg new file mode 100644 index 0000000..bb1a406 Binary files /dev/null and b/src/banos/bano3_p.jpg differ diff --git a/src/banos/bano4.jpg b/src/banos/bano4.jpg new file mode 100644 index 0000000..143b28a Binary files /dev/null and b/src/banos/bano4.jpg differ diff --git a/src/banos/bano4_p.jpg b/src/banos/bano4_p.jpg new file mode 100644 index 0000000..cbcc191 Binary files /dev/null and b/src/banos/bano4_p.jpg differ diff --git a/src/banos/bano5.jpg b/src/banos/bano5.jpg new file mode 100644 index 0000000..81d450d Binary files /dev/null and b/src/banos/bano5.jpg differ diff --git a/src/banos/bano5_p.jpg b/src/banos/bano5_p.jpg new file mode 100644 index 0000000..0cfa3cd Binary files /dev/null and b/src/banos/bano5_p.jpg differ diff --git a/src/banos/bano6.jpg b/src/banos/bano6.jpg new file mode 100644 index 0000000..1eb75a9 Binary files /dev/null and b/src/banos/bano6.jpg differ diff --git a/src/banos/bano6_p.jpg b/src/banos/bano6_p.jpg new file mode 100644 index 0000000..e8fe634 Binary files /dev/null and b/src/banos/bano6_p.jpg differ diff --git a/src/banos/bano7.jpg b/src/banos/bano7.jpg new file mode 100644 index 0000000..fde02b6 Binary files /dev/null and b/src/banos/bano7.jpg differ diff --git a/src/banos/bano7_p.jpg b/src/banos/bano7_p.jpg new file mode 100644 index 0000000..39e45ad Binary files /dev/null and b/src/banos/bano7_p.jpg differ diff --git a/src/banos/bano8.jpg b/src/banos/bano8.jpg new file mode 100644 index 0000000..7a0144c Binary files /dev/null and b/src/banos/bano8.jpg differ diff --git a/src/banos/bano8_p.jpg b/src/banos/bano8_p.jpg new file mode 100644 index 0000000..cdf9444 Binary files /dev/null and b/src/banos/bano8_p.jpg differ diff --git a/src/banos/bano9.jpg b/src/banos/bano9.jpg new file mode 100644 index 0000000..0e61335 Binary files /dev/null and b/src/banos/bano9.jpg differ diff --git a/src/banos/bano9_p.jpg b/src/banos/bano9_p.jpg new file mode 100644 index 0000000..40c0048 Binary files /dev/null and b/src/banos/bano9_p.jpg differ diff --git a/src/banos/detallebano1.jpg b/src/banos/detallebano1.jpg new file mode 100644 index 0000000..a54632e Binary files /dev/null and b/src/banos/detallebano1.jpg differ diff --git a/src/banos/detallebano1_p.jpg b/src/banos/detallebano1_p.jpg new file mode 100644 index 0000000..e441819 Binary files /dev/null and b/src/banos/detallebano1_p.jpg differ diff --git a/src/banos/detallebano2.jpg b/src/banos/detallebano2.jpg new file mode 100644 index 0000000..263753b Binary files /dev/null and b/src/banos/detallebano2.jpg differ diff --git a/src/banos/detallebano2_p.jpg b/src/banos/detallebano2_p.jpg new file mode 100644 index 0000000..06121bd Binary files /dev/null and b/src/banos/detallebano2_p.jpg differ diff --git a/src/banos/detallebano3.jpg b/src/banos/detallebano3.jpg new file mode 100644 index 0000000..f27b559 Binary files /dev/null and b/src/banos/detallebano3.jpg differ diff --git a/src/banos/detallebano3_p.jpg b/src/banos/detallebano3_p.jpg new file mode 100644 index 0000000..84c6f84 Binary files /dev/null and b/src/banos/detallebano3_p.jpg differ diff --git a/src/banos/detallebano4.jpg b/src/banos/detallebano4.jpg new file mode 100644 index 0000000..2eedf27 Binary files /dev/null and b/src/banos/detallebano4.jpg differ diff --git a/src/banos/detallebano4_p.jpg b/src/banos/detallebano4_p.jpg new file mode 100644 index 0000000..69e8b91 Binary files /dev/null and b/src/banos/detallebano4_p.jpg differ diff --git a/src/cocinas.html b/src/cocinas.html index 81b0a60..6a0cfbd 100644 --- a/src/cocinas.html +++ b/src/cocinas.html @@ -1,96 +1,118 @@ - - - - - - - Estudio Miguelo en Rivas, Madrid - Mobiliario de cocina - Cocinas a medida - Electrodomésticos - - - - - + + + + + +Estudio Miguelo en Rivas, Madrid - Mobiliario de cocina - Cocinas a medida - Electrodomésticos + + + + + -
- -
-

COCINAS

-

 

Cocina Modelo Portocervo. SCIC

- -

 

Cocina Modelo Marina. Rechapado

- -

 

Cocina Modelo Montecarlo. SCIC

- -

 

Cocina Modelo Murano. SCIC

- -

 

Cocina Modelo Montecarlo. SCIC

- -

 

Cocina Modelo Yedra. Rechapado

- -

 

Cocina Modelo Space. Rechapado Combinado

- -

 

Cocina Modelo Maratea. SCIC

- -

 

Cocina Modelo Maratea. SCIC

- -

 

Cocina Modelo Yedra. Lacado Alto Brillo

- -

 

Cocina Modelo Yedra. Rechapado

- -

 

Cocina Modelo Montecarlo. SCIC

- -

 

Cocina Modelo Yedra. Lacado Alto Brillo

- -

 

Cocina Modelo Yedra. Lacado Alto Brillo

- -

 

Cocina Modelo Toscana. Madera Roble Oscuro

- -

 

Cocina Modelo Marina. Rechapado

- -

 

Cocina Modelo Montecarlo. SCIC

- -

COMPLEMENTOS

-

 

- -

 

- -

 

- -

 

- -

 

- -

 

- -

 

- -

 

- -

 

- - -
+ +
+
+

COCINAS

+

 

+

Cocina Modelo Portocervo. SCIC

+ +

 

+

Cocina Modelo Marina. Rechapado

+ +

 

+

Cocina Modelo Montecarlo. SCIC

+ +

 

+

Cocina Modelo Murano. SCIC

+ +

 

+

Cocina Modelo Montecarlo. SCIC

+ +

 

+

Cocina Modelo Yedra. Rechapado

+ +

 

+

Cocina Modelo Space. Rechapado Combinado

+ +

 

+

Cocina Modelo Maratea. SCIC

+ +

 

+

Cocina Modelo Maratea. SCIC

+ +

 

+

Cocina Modelo Yedra. Lacado Alto Brillo

+ +

 

+

Cocina Modelo Yedra. Rechapado

+ +

 

+

Cocina Modelo Montecarlo. SCIC

+ +

 

+

Cocina Modelo Yedra. Lacado Alto Brillo

+ +

 

+

Cocina Modelo Yedra. Lacado Alto Brillo

+ +

 

+

Cocina Modelo Toscana. Madera Roble Oscuro

+ +

 

+

Cocina Modelo Marina. Rechapado

+ +

 

+

Cocina Modelo Montecarlo. SCIC

+

COMPLEMENTOS

+

 

+ + +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+
+
diff --git a/src/contacto.html b/src/contacto.html index 8113f2a..7e757b5 100644 --- a/src/contacto.html +++ b/src/contacto.html @@ -1,101 +1,101 @@ - - - - - - - - - - >Estudio de diseño y decoración Miguelo en Rivas, Madrid - Contacto - Localización de tienda y exposición - - - - - - - - - -
- -
- - - - - - - - - - - - -
- -


















Tienda y exposición

C/ El torno, 17
- Pol. Industrial Santa Ana
- 28529 Rivas Vaciamadrid (MADRID)
-
- Tlfno. 91 670 25 62
- FAX. 91 670 25 03

-

comercialrivas@estudiomiguelo.com

-
- -
-
- - - + + + + + + + + + + >Estudio de diseño y decoración Miguelo en Rivas, Madrid - Contacto - Localización de tienda y exposición + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ +


















Tienda y exposición

C/ El torno, 17
+ Pol. Industrial Santa Ana
+ 28529 Rivas Vaciamadrid (MADRID)
+
+ Tlfno. 91 670 25 62
+ FAX. 91 670 25 03

+

comercialrivas@estudiomiguelo.com

+
+ +
+
+ + + \ No newline at end of file diff --git a/src/corporativo.css b/src/corporativo.css new file mode 100644 index 0000000..f992ab6 --- /dev/null +++ b/src/corporativo.css @@ -0,0 +1,172 @@ +body { + margin: 0px 0px 20px 0px; + text-align: center; + font-family: Verdana; + font-size: 8pt; + background-color: #D3D3D3; +} + +h1 { + color: #9B917D; + font-family: Verdana; + font-size: 9pt; + padding-top:10px; + pading-bottom: 10px; +} + +h2 { + color: #503500; + font-family: Verdana; + font-size: 8pt; + padding-top:10px; + pading-bottom: 10px; +} + +h4 { + color: #d72e23; + font-family: Verdana; + font-size: 12pt; + padding-top:10px; + pading-bottom: 10px; +} + +hr { + height: 1px; + color: #ccc; + border: dotted; +} + +li { + font-family: Verdana; + font-size: 8pt; + line-height: 25px; +} + +a:link, a:visited, a:hover { + color: #902424; + font-size: 8pt; + text-decoration: none; +} + +a:hover { + color: white; + text-decoration: none; +} + +td { + text-align:left; +} + +#documento { + background-color: #D3D3D3; + background-image: url(images/fondo.gif); + margin-right: auto; + margin-left: auto; + width: 948px; + height: 597px; + margin-top:20px; +} + +#cabecera { + background-color: #fff; + margin-right: auto; + margin-top: 20px; + margin-left: auto; + width: 800px; + height: 153px; +} + +#cuerpo { + background-color: transparent; + float: left; + overflow: auto; + margin-top: 100px; + margin-left: 60px; + width: 635px; + height: 415px; + padding-left: 0px; + padding-right: 10px; + padding-top: 0px; + padding-bottom: 0px; + text-align: left; + color: white; + scrollbar-face-color: black; + scrollbar-shadow-color: #9A977A; + scrollbar-highlight-color: #9A977A; + scrollbar-3dlight-color: #9A977A; + scrollbar-darkshadow-color: #9A977A; + scrollbar-track-color: black; + scrollbar-arrow-color: white; +} + +#portada { + float: left; + margin-top: 150px; + margin-left: 40px; + width: 660px; + height: 299px; + background-image: url(images/Portada.jpg); +} + +#spot { + margin-top: 300px; + width: 660px; + height: 35px; + background-color: #FFF; + color: #000; + padding-top: 3px; +} + +#spot2 { + margin-top: 0px; + width: 660px; + height: 35px; + background-color: #FFF; + color: #000; + padding-top: 3px; +} + +#menu { + float: left; + margin-left: 40px; + margin-top: 135px; + width: 160px; + height: 120px; + text-align: left; + line-height: 21px; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; + color: #FFFFFF; +} + +#menu1 { + float: left; + margin-left: 40px; + margin-top: 120px; + height: 200px; + text-align: left; + line-height: 21px; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; + color: #FFFFFF; +} + +#pie { + background-color: #fff; + margin-right: auto; + margin-left: auto; + width: 800px; + height: 99px; +} + +.Estilo1 { + color: #FF66CC; + font-weight: bold; +} + +#plano { +position: absolute; +border: 1px solid #3399ff; +} \ No newline at end of file diff --git a/src/default.htm b/src/default.htm index e6c0ed7..9f7c7ef 100644 --- a/src/default.htm +++ b/src/default.htm @@ -1,45 +1,45 @@ - - - - - - - - - - Estudio Miguelo - diseño y decoración en Rivas, Madrid - - - - - - - - - -
- -
- -
- - - - + + + + + + + + + + Estudio Miguelo - diseño y decoración en Rivas, Madrid + + + + + + + + + +
+ +
+ +
+ + + + diff --git a/src/effects.js b/src/effects.js index 9492c2f..6bcf8c3 100644 --- a/src/effects.js +++ b/src/effects.js @@ -1,903 +1,903 @@ -// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// Contributors: -// Justin Palmer (http://encytemedia.com/) -// Mark Pilgrim (http://diveintomark.org/) -// Martin Bialasinki -// -// See scriptaculous.js for full license. - -/* ------------- element ext -------------- */ - -// converts rgb() and #xxx to #xxxxxx format, -// returns self (or first argument) if not convertable -String.prototype.parseColor = function() { - var color = '#'; - if(this.slice(0,4) == 'rgb(') { - var cols = this.slice(4,this.length-1).split(','); - var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3); - } else { - if(this.slice(0,1) == '#') { - if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase(); - if(this.length==7) color = this.toLowerCase(); - } - } - return(color.length==7 ? color : (arguments[0] || this)); -} - -Element.collectTextNodes = function(element) { - return $A($(element).childNodes).collect( function(node) { - return (node.nodeType==3 ? node.nodeValue : - (node.hasChildNodes() ? Element.collectTextNodes(node) : '')); - }).flatten().join(''); -} - -Element.collectTextNodesIgnoreClass = function(element, className) { - return $A($(element).childNodes).collect( function(node) { - return (node.nodeType==3 ? node.nodeValue : - ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? - Element.collectTextNodes(node) : '')); - }).flatten().join(''); -} - -Element.setStyle = function(element, style) { - element = $(element); - for(k in style) element.style[k.camelize()] = style[k]; -} - -Element.setContentZoom = function(element, percent) { - Element.setStyle(element, {fontSize: (percent/100) + 'em'}); - if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0); -} - -Element.getOpacity = function(element){ - var opacity; - if (opacity = Element.getStyle(element, 'opacity')) - return parseFloat(opacity); - if (opacity = (Element.getStyle(element, 'filter') || '').match(/alpha\(opacity=(.*)\)/)) - if(opacity[1]) return parseFloat(opacity[1]) / 100; - return 1.0; -} - -Element.setOpacity = function(element, value){ - element= $(element); - if (value == 1){ - Element.setStyle(element, { opacity: - (/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? - 0.999999 : null }); - if(/MSIE/.test(navigator.userAgent)) - Element.setStyle(element, {filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'')}); - } else { - if(value < 0.00001) value = 0; - Element.setStyle(element, {opacity: value}); - if(/MSIE/.test(navigator.userAgent)) - Element.setStyle(element, - { filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'') + - 'alpha(opacity='+value*100+')' }); - } -} - -Element.getInlineOpacity = function(element){ - return $(element).style.opacity || ''; -} - -Element.childrenWithClassName = function(element, className) { - return $A($(element).getElementsByTagName('*')).select( - function(c) { return Element.hasClassName(c, className) }); -} - -Array.prototype.call = function() { - var args = arguments; - this.each(function(f){ f.apply(this, args) }); -} - -/*--------------------------------------------------------------------------*/ - -var Effect = { - tagifyText: function(element) { - var tagifyStyle = 'position:relative'; - if(/MSIE/.test(navigator.userAgent)) tagifyStyle += ';zoom:1'; - element = $(element); - $A(element.childNodes).each( function(child) { - if(child.nodeType==3) { - child.nodeValue.toArray().each( function(character) { - element.insertBefore( - Builder.node('span',{style: tagifyStyle}, - character == ' ' ? String.fromCharCode(160) : character), - child); - }); - Element.remove(child); - } - }); - }, - multiple: function(element, effect) { - var elements; - if(((typeof element == 'object') || - (typeof element == 'function')) && - (element.length)) - elements = element; - else - elements = $(element).childNodes; - - var options = Object.extend({ - speed: 0.1, - delay: 0.0 - }, arguments[2] || {}); - var masterDelay = options.delay; - - $A(elements).each( function(element, index) { - new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay })); - }); - }, - PAIRS: { - 'slide': ['SlideDown','SlideUp'], - 'blind': ['BlindDown','BlindUp'], - 'appear': ['Appear','Fade'] - }, - toggle: function(element, effect) { - element = $(element); - effect = (effect || 'appear').toLowerCase(); - var options = Object.extend({ - queue: { position:'end', scope:(element.id || 'global') } - }, arguments[2] || {}); - Effect[Element.visible(element) ? - Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options); - } -}; - -var Effect2 = Effect; // deprecated - -/* ------------- transitions ------------- */ - -Effect.Transitions = {} - -Effect.Transitions.linear = function(pos) { - return pos; -} -Effect.Transitions.sinoidal = function(pos) { - return (-Math.cos(pos*Math.PI)/2) + 0.5; -} -Effect.Transitions.reverse = function(pos) { - return 1-pos; -} -Effect.Transitions.flicker = function(pos) { - return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4; -} -Effect.Transitions.wobble = function(pos) { - return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5; -} -Effect.Transitions.pulse = function(pos) { - return (Math.floor(pos*10) % 2 == 0 ? - (pos*10-Math.floor(pos*10)) : 1-(pos*10-Math.floor(pos*10))); -} -Effect.Transitions.none = function(pos) { - return 0; -} -Effect.Transitions.full = function(pos) { - return 1; -} - -/* ------------- core effects ------------- */ - -Effect.ScopedQueue = Class.create(); -Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), { - initialize: function() { - this.effects = []; - this.interval = null; - }, - _each: function(iterator) { - this.effects._each(iterator); - }, - add: function(effect) { - var timestamp = new Date().getTime(); - - var position = (typeof effect.options.queue == 'string') ? - effect.options.queue : effect.options.queue.position; - - switch(position) { - case 'front': - // move unstarted effects after this effect - this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) { - e.startOn += effect.finishOn; - e.finishOn += effect.finishOn; - }); - break; - case 'end': - // start effect after last queued effect has finished - timestamp = this.effects.pluck('finishOn').max() || timestamp; - break; - } - - effect.startOn += timestamp; - effect.finishOn += timestamp; - this.effects.push(effect); - if(!this.interval) - this.interval = setInterval(this.loop.bind(this), 40); - }, - remove: function(effect) { - this.effects = this.effects.reject(function(e) { return e==effect }); - if(this.effects.length == 0) { - clearInterval(this.interval); - this.interval = null; - } - }, - loop: function() { - var timePos = new Date().getTime(); - this.effects.invoke('loop', timePos); - } -}); - -Effect.Queues = { - instances: $H(), - get: function(queueName) { - if(typeof queueName != 'string') return queueName; - - if(!this.instances[queueName]) - this.instances[queueName] = new Effect.ScopedQueue(); - - return this.instances[queueName]; - } -} -Effect.Queue = Effect.Queues.get('global'); - -Effect.DefaultOptions = { - transition: Effect.Transitions.sinoidal, - duration: 1.0, // seconds - fps: 25.0, // max. 25fps due to Effect.Queue implementation - sync: false, // true for combining - from: 0.0, - to: 1.0, - delay: 0.0, - queue: 'parallel' -} - -Effect.Base = function() {}; -Effect.Base.prototype = { - position: null, - start: function(options) { - this.options = Object.extend(Object.extend({},Effect.DefaultOptions), options || {}); - this.currentFrame = 0; - this.state = 'idle'; - this.startOn = this.options.delay*1000; - this.finishOn = this.startOn + (this.options.duration*1000); - this.event('beforeStart'); - if(!this.options.sync) - Effect.Queues.get(typeof this.options.queue == 'string' ? - 'global' : this.options.queue.scope).add(this); - }, - loop: function(timePos) { - if(timePos >= this.startOn) { - if(timePos >= this.finishOn) { - this.render(1.0); - this.cancel(); - this.event('beforeFinish'); - if(this.finish) this.finish(); - this.event('afterFinish'); - return; - } - var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); - var frame = Math.round(pos * this.options.fps * this.options.duration); - if(frame > this.currentFrame) { - this.render(pos); - this.currentFrame = frame; - } - } - }, - render: function(pos) { - if(this.state == 'idle') { - this.state = 'running'; - this.event('beforeSetup'); - if(this.setup) this.setup(); - this.event('afterSetup'); - } - if(this.state == 'running') { - if(this.options.transition) pos = this.options.transition(pos); - pos *= (this.options.to-this.options.from); - pos += this.options.from; - this.position = pos; - this.event('beforeUpdate'); - if(this.update) this.update(pos); - this.event('afterUpdate'); - } - }, - cancel: function() { - if(!this.options.sync) - Effect.Queues.get(typeof this.options.queue == 'string' ? - 'global' : this.options.queue.scope).remove(this); - this.state = 'finished'; - }, - event: function(eventName) { - if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this); - if(this.options[eventName]) this.options[eventName](this); - }, - inspect: function() { - return '#'; - } -} - -Effect.Parallel = Class.create(); -Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), { - initialize: function(effects) { - this.effects = effects || []; - this.start(arguments[1]); - }, - update: function(position) { - this.effects.invoke('render', position); - }, - finish: function(position) { - this.effects.each( function(effect) { - effect.render(1.0); - effect.cancel(); - effect.event('beforeFinish'); - if(effect.finish) effect.finish(position); - effect.event('afterFinish'); - }); - } -}); - -Effect.Opacity = Class.create(); -Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - // make this work on IE on elements without 'layout' - if(/MSIE/.test(navigator.userAgent) && (!this.element.hasLayout)) - Element.setStyle(this.element, {zoom: 1}); - var options = Object.extend({ - from: Element.getOpacity(this.element) || 0.0, - to: 1.0 - }, arguments[1] || {}); - this.start(options); - }, - update: function(position) { - Element.setOpacity(this.element, position); - } -}); - -Effect.Move = Class.create(); -Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - var options = Object.extend({ - x: 0, - y: 0, - mode: 'relative' - }, arguments[1] || {}); - this.start(options); - }, - setup: function() { - // Bug in Opera: Opera returns the "real" position of a static element or - // relative element that does not have top/left explicitly set. - // ==> Always set top and left for position relative elements in your stylesheets - // (to 0 if you do not need them) - Element.makePositioned(this.element); - this.originalLeft = parseFloat(Element.getStyle(this.element,'left') || '0'); - this.originalTop = parseFloat(Element.getStyle(this.element,'top') || '0'); - if(this.options.mode == 'absolute') { - // absolute movement, so we need to calc deltaX and deltaY - this.options.x = this.options.x - this.originalLeft; - this.options.y = this.options.y - this.originalTop; - } - }, - update: function(position) { - Element.setStyle(this.element, { - left: this.options.x * position + this.originalLeft + 'px', - top: this.options.y * position + this.originalTop + 'px' - }); - } -}); - -// for backwards compatibility -Effect.MoveBy = function(element, toTop, toLeft) { - return new Effect.Move(element, - Object.extend({ x: toLeft, y: toTop }, arguments[3] || {})); -}; - -Effect.Scale = Class.create(); -Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), { - initialize: function(element, percent) { - this.element = $(element) - var options = Object.extend({ - scaleX: true, - scaleY: true, - scaleContent: true, - scaleFromCenter: false, - scaleMode: 'box', // 'box' or 'contents' or {} with provided values - scaleFrom: 100.0, - scaleTo: percent - }, arguments[2] || {}); - this.start(options); - }, - setup: function() { - this.restoreAfterFinish = this.options.restoreAfterFinish || false; - this.elementPositioning = Element.getStyle(this.element,'position'); - - this.originalStyle = {}; - ['top','left','width','height','fontSize'].each( function(k) { - this.originalStyle[k] = this.element.style[k]; - }.bind(this)); - - this.originalTop = this.element.offsetTop; - this.originalLeft = this.element.offsetLeft; - - var fontSize = Element.getStyle(this.element,'font-size') || '100%'; - ['em','px','%'].each( function(fontSizeType) { - if(fontSize.indexOf(fontSizeType)>0) { - this.fontSize = parseFloat(fontSize); - this.fontSizeType = fontSizeType; - } - }.bind(this)); - - this.factor = (this.options.scaleTo - this.options.scaleFrom)/100; - - this.dims = null; - if(this.options.scaleMode=='box') - this.dims = [this.element.offsetHeight, this.element.offsetWidth]; - if(/^content/.test(this.options.scaleMode)) - this.dims = [this.element.scrollHeight, this.element.scrollWidth]; - if(!this.dims) - this.dims = [this.options.scaleMode.originalHeight, - this.options.scaleMode.originalWidth]; - }, - update: function(position) { - var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); - if(this.options.scaleContent && this.fontSize) - Element.setStyle(this.element, {fontSize: this.fontSize * currentScale + this.fontSizeType }); - this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale); - }, - finish: function(position) { - if (this.restoreAfterFinish) Element.setStyle(this.element, this.originalStyle); - }, - setDimensions: function(height, width) { - var d = {}; - if(this.options.scaleX) d.width = width + 'px'; - if(this.options.scaleY) d.height = height + 'px'; - if(this.options.scaleFromCenter) { - var topd = (height - this.dims[0])/2; - var leftd = (width - this.dims[1])/2; - if(this.elementPositioning == 'absolute') { - if(this.options.scaleY) d.top = this.originalTop-topd + 'px'; - if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px'; - } else { - if(this.options.scaleY) d.top = -topd + 'px'; - if(this.options.scaleX) d.left = -leftd + 'px'; - } - } - Element.setStyle(this.element, d); - } -}); - -Effect.Highlight = Class.create(); -Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {}); - this.start(options); - }, - setup: function() { - // Prevent executing on elements not in the layout flow - if(Element.getStyle(this.element, 'display')=='none') { this.cancel(); return; } - // Disable background image during the effect - this.oldStyle = { - backgroundImage: Element.getStyle(this.element, 'background-image') }; - Element.setStyle(this.element, {backgroundImage: 'none'}); - if(!this.options.endcolor) - this.options.endcolor = Element.getStyle(this.element, 'background-color').parseColor('#ffffff'); - if(!this.options.restorecolor) - this.options.restorecolor = Element.getStyle(this.element, 'background-color'); - // init color calculations - this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this)); - this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this)); - }, - update: function(position) { - Element.setStyle(this.element,{backgroundColor: $R(0,2).inject('#',function(m,v,i){ - return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) }); - }, - finish: function() { - Element.setStyle(this.element, Object.extend(this.oldStyle, { - backgroundColor: this.options.restorecolor - })); - } -}); - -Effect.ScrollTo = Class.create(); -Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - this.start(arguments[1] || {}); - }, - setup: function() { - Position.prepare(); - var offsets = Position.cumulativeOffset(this.element); - if(this.options.offset) offsets[1] += this.options.offset; - var max = window.innerHeight ? - window.height - window.innerHeight : - document.body.scrollHeight - - (document.documentElement.clientHeight ? - document.documentElement.clientHeight : document.body.clientHeight); - this.scrollStart = Position.deltaY; - this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart; - }, - update: function(position) { - Position.prepare(); - window.scrollTo(Position.deltaX, - this.scrollStart + (position*this.delta)); - } -}); - -/* ------------- combination effects ------------- */ - -Effect.Fade = function(element) { - var oldOpacity = Element.getInlineOpacity(element); - var options = Object.extend({ - from: Element.getOpacity(element) || 1.0, - to: 0.0, - afterFinishInternal: function(effect) { with(Element) { - if(effect.options.to!=0) return; - hide(effect.element); - setStyle(effect.element, {opacity: oldOpacity}); }} - }, arguments[1] || {}); - return new Effect.Opacity(element,options); -} - -Effect.Appear = function(element) { - var options = Object.extend({ - from: (Element.getStyle(element, 'display') == 'none' ? 0.0 : Element.getOpacity(element) || 0.0), - to: 1.0, - beforeSetup: function(effect) { with(Element) { - setOpacity(effect.element, effect.options.from); - show(effect.element); }} - }, arguments[1] || {}); - return new Effect.Opacity(element,options); -} - -Effect.Puff = function(element) { - element = $(element); - var oldStyle = { opacity: Element.getInlineOpacity(element), position: Element.getStyle(element, 'position') }; - return new Effect.Parallel( - [ new Effect.Scale(element, 200, - { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), - new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], - Object.extend({ duration: 1.0, - beforeSetupInternal: function(effect) { with(Element) { - setStyle(effect.effects[0].element, {position: 'absolute'}); }}, - afterFinishInternal: function(effect) { with(Element) { - hide(effect.effects[0].element); - setStyle(effect.effects[0].element, oldStyle); }} - }, arguments[1] || {}) - ); -} - -Effect.BlindUp = function(element) { - element = $(element); - Element.makeClipping(element); - return new Effect.Scale(element, 0, - Object.extend({ scaleContent: false, - scaleX: false, - restoreAfterFinish: true, - afterFinishInternal: function(effect) { with(Element) { - [hide, undoClipping].call(effect.element); }} - }, arguments[1] || {}) - ); -} - -Effect.BlindDown = function(element) { - element = $(element); - var oldHeight = Element.getStyle(element, 'height'); - var elementDimensions = Element.getDimensions(element); - return new Effect.Scale(element, 100, - Object.extend({ scaleContent: false, - scaleX: false, - scaleFrom: 0, - scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, - restoreAfterFinish: true, - afterSetup: function(effect) { with(Element) { - makeClipping(effect.element); - setStyle(effect.element, {height: '0px'}); - show(effect.element); - }}, - afterFinishInternal: function(effect) { with(Element) { - undoClipping(effect.element); - setStyle(effect.element, {height: oldHeight}); - }} - }, arguments[1] || {}) - ); -} - -Effect.SwitchOff = function(element) { - element = $(element); - var oldOpacity = Element.getInlineOpacity(element); - return new Effect.Appear(element, { - duration: 0.4, - from: 0, - transition: Effect.Transitions.flicker, - afterFinishInternal: function(effect) { - new Effect.Scale(effect.element, 1, { - duration: 0.3, scaleFromCenter: true, - scaleX: false, scaleContent: false, restoreAfterFinish: true, - beforeSetup: function(effect) { with(Element) { - [makePositioned,makeClipping].call(effect.element); - }}, - afterFinishInternal: function(effect) { with(Element) { - [hide,undoClipping,undoPositioned].call(effect.element); - setStyle(effect.element, {opacity: oldOpacity}); - }} - }) - } - }); -} - -Effect.DropOut = function(element) { - element = $(element); - var oldStyle = { - top: Element.getStyle(element, 'top'), - left: Element.getStyle(element, 'left'), - opacity: Element.getInlineOpacity(element) }; - return new Effect.Parallel( - [ new Effect.Move(element, {x: 0, y: 100, sync: true }), - new Effect.Opacity(element, { sync: true, to: 0.0 }) ], - Object.extend( - { duration: 0.5, - beforeSetup: function(effect) { with(Element) { - makePositioned(effect.effects[0].element); }}, - afterFinishInternal: function(effect) { with(Element) { - [hide, undoPositioned].call(effect.effects[0].element); - setStyle(effect.effects[0].element, oldStyle); }} - }, arguments[1] || {})); -} - -Effect.Shake = function(element) { - element = $(element); - var oldStyle = { - top: Element.getStyle(element, 'top'), - left: Element.getStyle(element, 'left') }; - return new Effect.Move(element, - { x: 20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { with(Element) { - undoPositioned(effect.element); - setStyle(effect.element, oldStyle); - }}}) }}) }}) }}) }}) }}); -} - -Effect.SlideDown = function(element) { - element = $(element); - Element.cleanWhitespace(element); - // SlideDown need to have the content of the element wrapped in a container element with fixed height! - var oldInnerBottom = Element.getStyle(element.firstChild, 'bottom'); - var elementDimensions = Element.getDimensions(element); - return new Effect.Scale(element, 100, Object.extend({ - scaleContent: false, - scaleX: false, - scaleFrom: 0, - scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, - restoreAfterFinish: true, - afterSetup: function(effect) { with(Element) { - makePositioned(effect.element); - makePositioned(effect.element.firstChild); - if(window.opera) setStyle(effect.element, {top: ''}); - makeClipping(effect.element); - setStyle(effect.element, {height: '0px'}); - show(element); }}, - afterUpdateInternal: function(effect) { with(Element) { - setStyle(effect.element.firstChild, {bottom: - (effect.dims[0] - effect.element.clientHeight) + 'px' }); }}, - afterFinishInternal: function(effect) { with(Element) { - undoClipping(effect.element); - undoPositioned(effect.element.firstChild); - undoPositioned(effect.element); - setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }} - }, arguments[1] || {}) - ); -} - -Effect.SlideUp = function(element) { - element = $(element); - Element.cleanWhitespace(element); - var oldInnerBottom = Element.getStyle(element.firstChild, 'bottom'); - return new Effect.Scale(element, 0, - Object.extend({ scaleContent: false, - scaleX: false, - scaleMode: 'box', - scaleFrom: 100, - restoreAfterFinish: true, - beforeStartInternal: function(effect) { with(Element) { - makePositioned(effect.element); - makePositioned(effect.element.firstChild); - if(window.opera) setStyle(effect.element, {top: ''}); - makeClipping(effect.element); - show(element); }}, - afterUpdateInternal: function(effect) { with(Element) { - setStyle(effect.element.firstChild, {bottom: - (effect.dims[0] - effect.element.clientHeight) + 'px' }); }}, - afterFinishInternal: function(effect) { with(Element) { - [hide, undoClipping].call(effect.element); - undoPositioned(effect.element.firstChild); - undoPositioned(effect.element); - setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }} - }, arguments[1] || {}) - ); -} - -// Bug in opera makes the TD containing this element expand for a instance after finish -Effect.Squish = function(element) { - return new Effect.Scale(element, window.opera ? 1 : 0, - { restoreAfterFinish: true, - beforeSetup: function(effect) { with(Element) { - makeClipping(effect.element); }}, - afterFinishInternal: function(effect) { with(Element) { - hide(effect.element); - undoClipping(effect.element); }} - }); -} - -Effect.Grow = function(element) { - element = $(element); - var options = Object.extend({ - direction: 'center', - moveTransistion: Effect.Transitions.sinoidal, - scaleTransition: Effect.Transitions.sinoidal, - opacityTransition: Effect.Transitions.full - }, arguments[1] || {}); - var oldStyle = { - top: element.style.top, - left: element.style.left, - height: element.style.height, - width: element.style.width, - opacity: Element.getInlineOpacity(element) }; - - var dims = Element.getDimensions(element); - var initialMoveX, initialMoveY; - var moveX, moveY; - - switch (options.direction) { - case 'top-left': - initialMoveX = initialMoveY = moveX = moveY = 0; - break; - case 'top-right': - initialMoveX = dims.width; - initialMoveY = moveY = 0; - moveX = -dims.width; - break; - case 'bottom-left': - initialMoveX = moveX = 0; - initialMoveY = dims.height; - moveY = -dims.height; - break; - case 'bottom-right': - initialMoveX = dims.width; - initialMoveY = dims.height; - moveX = -dims.width; - moveY = -dims.height; - break; - case 'center': - initialMoveX = dims.width / 2; - initialMoveY = dims.height / 2; - moveX = -dims.width / 2; - moveY = -dims.height / 2; - break; - } - - return new Effect.Move(element, { - x: initialMoveX, - y: initialMoveY, - duration: 0.01, - beforeSetup: function(effect) { with(Element) { - hide(effect.element); - makeClipping(effect.element); - makePositioned(effect.element); - }}, - afterFinishInternal: function(effect) { - new Effect.Parallel( - [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }), - new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }), - new Effect.Scale(effect.element, 100, { - scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, - sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true}) - ], Object.extend({ - beforeSetup: function(effect) { with(Element) { - setStyle(effect.effects[0].element, {height: '0px'}); - show(effect.effects[0].element); }}, - afterFinishInternal: function(effect) { with(Element) { - [undoClipping, undoPositioned].call(effect.effects[0].element); - setStyle(effect.effects[0].element, oldStyle); }} - }, options) - ) - } - }); -} - -Effect.Shrink = function(element) { - element = $(element); - var options = Object.extend({ - direction: 'center', - moveTransistion: Effect.Transitions.sinoidal, - scaleTransition: Effect.Transitions.sinoidal, - opacityTransition: Effect.Transitions.none - }, arguments[1] || {}); - var oldStyle = { - top: element.style.top, - left: element.style.left, - height: element.style.height, - width: element.style.width, - opacity: Element.getInlineOpacity(element) }; - - var dims = Element.getDimensions(element); - var moveX, moveY; - - switch (options.direction) { - case 'top-left': - moveX = moveY = 0; - break; - case 'top-right': - moveX = dims.width; - moveY = 0; - break; - case 'bottom-left': - moveX = 0; - moveY = dims.height; - break; - case 'bottom-right': - moveX = dims.width; - moveY = dims.height; - break; - case 'center': - moveX = dims.width / 2; - moveY = dims.height / 2; - break; - } - - return new Effect.Parallel( - [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }), - new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}), - new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }) - ], Object.extend({ - beforeStartInternal: function(effect) { with(Element) { - [makePositioned, makeClipping].call(effect.effects[0].element) }}, - afterFinishInternal: function(effect) { with(Element) { - [hide, undoClipping, undoPositioned].call(effect.effects[0].element); - setStyle(effect.effects[0].element, oldStyle); }} - }, options) - ); -} - -Effect.Pulsate = function(element) { - element = $(element); - var options = arguments[1] || {}; - var oldOpacity = Element.getInlineOpacity(element); - var transition = options.transition || Effect.Transitions.sinoidal; - var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) }; - reverser.bind(transition); - return new Effect.Opacity(element, - Object.extend(Object.extend({ duration: 3.0, from: 0, - afterFinishInternal: function(effect) { Element.setStyle(effect.element, {opacity: oldOpacity}); } - }, options), {transition: reverser})); -} - -Effect.Fold = function(element) { - element = $(element); - var oldStyle = { - top: element.style.top, - left: element.style.left, - width: element.style.width, - height: element.style.height }; - Element.makeClipping(element); - return new Effect.Scale(element, 5, Object.extend({ - scaleContent: false, - scaleX: false, - afterFinishInternal: function(effect) { - new Effect.Scale(element, 1, { - scaleContent: false, - scaleY: false, - afterFinishInternal: function(effect) { with(Element) { - [hide, undoClipping].call(effect.element); - setStyle(effect.element, oldStyle); - }} }); - }}, arguments[1] || {})); -} +// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// Contributors: +// Justin Palmer (http://encytemedia.com/) +// Mark Pilgrim (http://diveintomark.org/) +// Martin Bialasinki +// +// See scriptaculous.js for full license. + +/* ------------- element ext -------------- */ + +// converts rgb() and #xxx to #xxxxxx format, +// returns self (or first argument) if not convertable +String.prototype.parseColor = function() { + var color = '#'; + if(this.slice(0,4) == 'rgb(') { + var cols = this.slice(4,this.length-1).split(','); + var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3); + } else { + if(this.slice(0,1) == '#') { + if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase(); + if(this.length==7) color = this.toLowerCase(); + } + } + return(color.length==7 ? color : (arguments[0] || this)); +} + +Element.collectTextNodes = function(element) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + (node.hasChildNodes() ? Element.collectTextNodes(node) : '')); + }).flatten().join(''); +} + +Element.collectTextNodesIgnoreClass = function(element, className) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? + Element.collectTextNodes(node) : '')); + }).flatten().join(''); +} + +Element.setStyle = function(element, style) { + element = $(element); + for(k in style) element.style[k.camelize()] = style[k]; +} + +Element.setContentZoom = function(element, percent) { + Element.setStyle(element, {fontSize: (percent/100) + 'em'}); + if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0); +} + +Element.getOpacity = function(element){ + var opacity; + if (opacity = Element.getStyle(element, 'opacity')) + return parseFloat(opacity); + if (opacity = (Element.getStyle(element, 'filter') || '').match(/alpha\(opacity=(.*)\)/)) + if(opacity[1]) return parseFloat(opacity[1]) / 100; + return 1.0; +} + +Element.setOpacity = function(element, value){ + element= $(element); + if (value == 1){ + Element.setStyle(element, { opacity: + (/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? + 0.999999 : null }); + if(/MSIE/.test(navigator.userAgent)) + Element.setStyle(element, {filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'')}); + } else { + if(value < 0.00001) value = 0; + Element.setStyle(element, {opacity: value}); + if(/MSIE/.test(navigator.userAgent)) + Element.setStyle(element, + { filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'') + + 'alpha(opacity='+value*100+')' }); + } +} + +Element.getInlineOpacity = function(element){ + return $(element).style.opacity || ''; +} + +Element.childrenWithClassName = function(element, className) { + return $A($(element).getElementsByTagName('*')).select( + function(c) { return Element.hasClassName(c, className) }); +} + +Array.prototype.call = function() { + var args = arguments; + this.each(function(f){ f.apply(this, args) }); +} + +/*--------------------------------------------------------------------------*/ + +var Effect = { + tagifyText: function(element) { + var tagifyStyle = 'position:relative'; + if(/MSIE/.test(navigator.userAgent)) tagifyStyle += ';zoom:1'; + element = $(element); + $A(element.childNodes).each( function(child) { + if(child.nodeType==3) { + child.nodeValue.toArray().each( function(character) { + element.insertBefore( + Builder.node('span',{style: tagifyStyle}, + character == ' ' ? String.fromCharCode(160) : character), + child); + }); + Element.remove(child); + } + }); + }, + multiple: function(element, effect) { + var elements; + if(((typeof element == 'object') || + (typeof element == 'function')) && + (element.length)) + elements = element; + else + elements = $(element).childNodes; + + var options = Object.extend({ + speed: 0.1, + delay: 0.0 + }, arguments[2] || {}); + var masterDelay = options.delay; + + $A(elements).each( function(element, index) { + new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay })); + }); + }, + PAIRS: { + 'slide': ['SlideDown','SlideUp'], + 'blind': ['BlindDown','BlindUp'], + 'appear': ['Appear','Fade'] + }, + toggle: function(element, effect) { + element = $(element); + effect = (effect || 'appear').toLowerCase(); + var options = Object.extend({ + queue: { position:'end', scope:(element.id || 'global') } + }, arguments[2] || {}); + Effect[Element.visible(element) ? + Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options); + } +}; + +var Effect2 = Effect; // deprecated + +/* ------------- transitions ------------- */ + +Effect.Transitions = {} + +Effect.Transitions.linear = function(pos) { + return pos; +} +Effect.Transitions.sinoidal = function(pos) { + return (-Math.cos(pos*Math.PI)/2) + 0.5; +} +Effect.Transitions.reverse = function(pos) { + return 1-pos; +} +Effect.Transitions.flicker = function(pos) { + return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4; +} +Effect.Transitions.wobble = function(pos) { + return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5; +} +Effect.Transitions.pulse = function(pos) { + return (Math.floor(pos*10) % 2 == 0 ? + (pos*10-Math.floor(pos*10)) : 1-(pos*10-Math.floor(pos*10))); +} +Effect.Transitions.none = function(pos) { + return 0; +} +Effect.Transitions.full = function(pos) { + return 1; +} + +/* ------------- core effects ------------- */ + +Effect.ScopedQueue = Class.create(); +Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), { + initialize: function() { + this.effects = []; + this.interval = null; + }, + _each: function(iterator) { + this.effects._each(iterator); + }, + add: function(effect) { + var timestamp = new Date().getTime(); + + var position = (typeof effect.options.queue == 'string') ? + effect.options.queue : effect.options.queue.position; + + switch(position) { + case 'front': + // move unstarted effects after this effect + this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) { + e.startOn += effect.finishOn; + e.finishOn += effect.finishOn; + }); + break; + case 'end': + // start effect after last queued effect has finished + timestamp = this.effects.pluck('finishOn').max() || timestamp; + break; + } + + effect.startOn += timestamp; + effect.finishOn += timestamp; + this.effects.push(effect); + if(!this.interval) + this.interval = setInterval(this.loop.bind(this), 40); + }, + remove: function(effect) { + this.effects = this.effects.reject(function(e) { return e==effect }); + if(this.effects.length == 0) { + clearInterval(this.interval); + this.interval = null; + } + }, + loop: function() { + var timePos = new Date().getTime(); + this.effects.invoke('loop', timePos); + } +}); + +Effect.Queues = { + instances: $H(), + get: function(queueName) { + if(typeof queueName != 'string') return queueName; + + if(!this.instances[queueName]) + this.instances[queueName] = new Effect.ScopedQueue(); + + return this.instances[queueName]; + } +} +Effect.Queue = Effect.Queues.get('global'); + +Effect.DefaultOptions = { + transition: Effect.Transitions.sinoidal, + duration: 1.0, // seconds + fps: 25.0, // max. 25fps due to Effect.Queue implementation + sync: false, // true for combining + from: 0.0, + to: 1.0, + delay: 0.0, + queue: 'parallel' +} + +Effect.Base = function() {}; +Effect.Base.prototype = { + position: null, + start: function(options) { + this.options = Object.extend(Object.extend({},Effect.DefaultOptions), options || {}); + this.currentFrame = 0; + this.state = 'idle'; + this.startOn = this.options.delay*1000; + this.finishOn = this.startOn + (this.options.duration*1000); + this.event('beforeStart'); + if(!this.options.sync) + Effect.Queues.get(typeof this.options.queue == 'string' ? + 'global' : this.options.queue.scope).add(this); + }, + loop: function(timePos) { + if(timePos >= this.startOn) { + if(timePos >= this.finishOn) { + this.render(1.0); + this.cancel(); + this.event('beforeFinish'); + if(this.finish) this.finish(); + this.event('afterFinish'); + return; + } + var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); + var frame = Math.round(pos * this.options.fps * this.options.duration); + if(frame > this.currentFrame) { + this.render(pos); + this.currentFrame = frame; + } + } + }, + render: function(pos) { + if(this.state == 'idle') { + this.state = 'running'; + this.event('beforeSetup'); + if(this.setup) this.setup(); + this.event('afterSetup'); + } + if(this.state == 'running') { + if(this.options.transition) pos = this.options.transition(pos); + pos *= (this.options.to-this.options.from); + pos += this.options.from; + this.position = pos; + this.event('beforeUpdate'); + if(this.update) this.update(pos); + this.event('afterUpdate'); + } + }, + cancel: function() { + if(!this.options.sync) + Effect.Queues.get(typeof this.options.queue == 'string' ? + 'global' : this.options.queue.scope).remove(this); + this.state = 'finished'; + }, + event: function(eventName) { + if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this); + if(this.options[eventName]) this.options[eventName](this); + }, + inspect: function() { + return '#'; + } +} + +Effect.Parallel = Class.create(); +Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), { + initialize: function(effects) { + this.effects = effects || []; + this.start(arguments[1]); + }, + update: function(position) { + this.effects.invoke('render', position); + }, + finish: function(position) { + this.effects.each( function(effect) { + effect.render(1.0); + effect.cancel(); + effect.event('beforeFinish'); + if(effect.finish) effect.finish(position); + effect.event('afterFinish'); + }); + } +}); + +Effect.Opacity = Class.create(); +Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + // make this work on IE on elements without 'layout' + if(/MSIE/.test(navigator.userAgent) && (!this.element.hasLayout)) + Element.setStyle(this.element, {zoom: 1}); + var options = Object.extend({ + from: Element.getOpacity(this.element) || 0.0, + to: 1.0 + }, arguments[1] || {}); + this.start(options); + }, + update: function(position) { + Element.setOpacity(this.element, position); + } +}); + +Effect.Move = Class.create(); +Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + var options = Object.extend({ + x: 0, + y: 0, + mode: 'relative' + }, arguments[1] || {}); + this.start(options); + }, + setup: function() { + // Bug in Opera: Opera returns the "real" position of a static element or + // relative element that does not have top/left explicitly set. + // ==> Always set top and left for position relative elements in your stylesheets + // (to 0 if you do not need them) + Element.makePositioned(this.element); + this.originalLeft = parseFloat(Element.getStyle(this.element,'left') || '0'); + this.originalTop = parseFloat(Element.getStyle(this.element,'top') || '0'); + if(this.options.mode == 'absolute') { + // absolute movement, so we need to calc deltaX and deltaY + this.options.x = this.options.x - this.originalLeft; + this.options.y = this.options.y - this.originalTop; + } + }, + update: function(position) { + Element.setStyle(this.element, { + left: this.options.x * position + this.originalLeft + 'px', + top: this.options.y * position + this.originalTop + 'px' + }); + } +}); + +// for backwards compatibility +Effect.MoveBy = function(element, toTop, toLeft) { + return new Effect.Move(element, + Object.extend({ x: toLeft, y: toTop }, arguments[3] || {})); +}; + +Effect.Scale = Class.create(); +Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), { + initialize: function(element, percent) { + this.element = $(element) + var options = Object.extend({ + scaleX: true, + scaleY: true, + scaleContent: true, + scaleFromCenter: false, + scaleMode: 'box', // 'box' or 'contents' or {} with provided values + scaleFrom: 100.0, + scaleTo: percent + }, arguments[2] || {}); + this.start(options); + }, + setup: function() { + this.restoreAfterFinish = this.options.restoreAfterFinish || false; + this.elementPositioning = Element.getStyle(this.element,'position'); + + this.originalStyle = {}; + ['top','left','width','height','fontSize'].each( function(k) { + this.originalStyle[k] = this.element.style[k]; + }.bind(this)); + + this.originalTop = this.element.offsetTop; + this.originalLeft = this.element.offsetLeft; + + var fontSize = Element.getStyle(this.element,'font-size') || '100%'; + ['em','px','%'].each( function(fontSizeType) { + if(fontSize.indexOf(fontSizeType)>0) { + this.fontSize = parseFloat(fontSize); + this.fontSizeType = fontSizeType; + } + }.bind(this)); + + this.factor = (this.options.scaleTo - this.options.scaleFrom)/100; + + this.dims = null; + if(this.options.scaleMode=='box') + this.dims = [this.element.offsetHeight, this.element.offsetWidth]; + if(/^content/.test(this.options.scaleMode)) + this.dims = [this.element.scrollHeight, this.element.scrollWidth]; + if(!this.dims) + this.dims = [this.options.scaleMode.originalHeight, + this.options.scaleMode.originalWidth]; + }, + update: function(position) { + var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); + if(this.options.scaleContent && this.fontSize) + Element.setStyle(this.element, {fontSize: this.fontSize * currentScale + this.fontSizeType }); + this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale); + }, + finish: function(position) { + if (this.restoreAfterFinish) Element.setStyle(this.element, this.originalStyle); + }, + setDimensions: function(height, width) { + var d = {}; + if(this.options.scaleX) d.width = width + 'px'; + if(this.options.scaleY) d.height = height + 'px'; + if(this.options.scaleFromCenter) { + var topd = (height - this.dims[0])/2; + var leftd = (width - this.dims[1])/2; + if(this.elementPositioning == 'absolute') { + if(this.options.scaleY) d.top = this.originalTop-topd + 'px'; + if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px'; + } else { + if(this.options.scaleY) d.top = -topd + 'px'; + if(this.options.scaleX) d.left = -leftd + 'px'; + } + } + Element.setStyle(this.element, d); + } +}); + +Effect.Highlight = Class.create(); +Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {}); + this.start(options); + }, + setup: function() { + // Prevent executing on elements not in the layout flow + if(Element.getStyle(this.element, 'display')=='none') { this.cancel(); return; } + // Disable background image during the effect + this.oldStyle = { + backgroundImage: Element.getStyle(this.element, 'background-image') }; + Element.setStyle(this.element, {backgroundImage: 'none'}); + if(!this.options.endcolor) + this.options.endcolor = Element.getStyle(this.element, 'background-color').parseColor('#ffffff'); + if(!this.options.restorecolor) + this.options.restorecolor = Element.getStyle(this.element, 'background-color'); + // init color calculations + this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this)); + this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this)); + }, + update: function(position) { + Element.setStyle(this.element,{backgroundColor: $R(0,2).inject('#',function(m,v,i){ + return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) }); + }, + finish: function() { + Element.setStyle(this.element, Object.extend(this.oldStyle, { + backgroundColor: this.options.restorecolor + })); + } +}); + +Effect.ScrollTo = Class.create(); +Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + this.start(arguments[1] || {}); + }, + setup: function() { + Position.prepare(); + var offsets = Position.cumulativeOffset(this.element); + if(this.options.offset) offsets[1] += this.options.offset; + var max = window.innerHeight ? + window.height - window.innerHeight : + document.body.scrollHeight - + (document.documentElement.clientHeight ? + document.documentElement.clientHeight : document.body.clientHeight); + this.scrollStart = Position.deltaY; + this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart; + }, + update: function(position) { + Position.prepare(); + window.scrollTo(Position.deltaX, + this.scrollStart + (position*this.delta)); + } +}); + +/* ------------- combination effects ------------- */ + +Effect.Fade = function(element) { + var oldOpacity = Element.getInlineOpacity(element); + var options = Object.extend({ + from: Element.getOpacity(element) || 1.0, + to: 0.0, + afterFinishInternal: function(effect) { with(Element) { + if(effect.options.to!=0) return; + hide(effect.element); + setStyle(effect.element, {opacity: oldOpacity}); }} + }, arguments[1] || {}); + return new Effect.Opacity(element,options); +} + +Effect.Appear = function(element) { + var options = Object.extend({ + from: (Element.getStyle(element, 'display') == 'none' ? 0.0 : Element.getOpacity(element) || 0.0), + to: 1.0, + beforeSetup: function(effect) { with(Element) { + setOpacity(effect.element, effect.options.from); + show(effect.element); }} + }, arguments[1] || {}); + return new Effect.Opacity(element,options); +} + +Effect.Puff = function(element) { + element = $(element); + var oldStyle = { opacity: Element.getInlineOpacity(element), position: Element.getStyle(element, 'position') }; + return new Effect.Parallel( + [ new Effect.Scale(element, 200, + { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], + Object.extend({ duration: 1.0, + beforeSetupInternal: function(effect) { with(Element) { + setStyle(effect.effects[0].element, {position: 'absolute'}); }}, + afterFinishInternal: function(effect) { with(Element) { + hide(effect.effects[0].element); + setStyle(effect.effects[0].element, oldStyle); }} + }, arguments[1] || {}) + ); +} + +Effect.BlindUp = function(element) { + element = $(element); + Element.makeClipping(element); + return new Effect.Scale(element, 0, + Object.extend({ scaleContent: false, + scaleX: false, + restoreAfterFinish: true, + afterFinishInternal: function(effect) { with(Element) { + [hide, undoClipping].call(effect.element); }} + }, arguments[1] || {}) + ); +} + +Effect.BlindDown = function(element) { + element = $(element); + var oldHeight = Element.getStyle(element, 'height'); + var elementDimensions = Element.getDimensions(element); + return new Effect.Scale(element, 100, + Object.extend({ scaleContent: false, + scaleX: false, + scaleFrom: 0, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { with(Element) { + makeClipping(effect.element); + setStyle(effect.element, {height: '0px'}); + show(effect.element); + }}, + afterFinishInternal: function(effect) { with(Element) { + undoClipping(effect.element); + setStyle(effect.element, {height: oldHeight}); + }} + }, arguments[1] || {}) + ); +} + +Effect.SwitchOff = function(element) { + element = $(element); + var oldOpacity = Element.getInlineOpacity(element); + return new Effect.Appear(element, { + duration: 0.4, + from: 0, + transition: Effect.Transitions.flicker, + afterFinishInternal: function(effect) { + new Effect.Scale(effect.element, 1, { + duration: 0.3, scaleFromCenter: true, + scaleX: false, scaleContent: false, restoreAfterFinish: true, + beforeSetup: function(effect) { with(Element) { + [makePositioned,makeClipping].call(effect.element); + }}, + afterFinishInternal: function(effect) { with(Element) { + [hide,undoClipping,undoPositioned].call(effect.element); + setStyle(effect.element, {opacity: oldOpacity}); + }} + }) + } + }); +} + +Effect.DropOut = function(element) { + element = $(element); + var oldStyle = { + top: Element.getStyle(element, 'top'), + left: Element.getStyle(element, 'left'), + opacity: Element.getInlineOpacity(element) }; + return new Effect.Parallel( + [ new Effect.Move(element, {x: 0, y: 100, sync: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 }) ], + Object.extend( + { duration: 0.5, + beforeSetup: function(effect) { with(Element) { + makePositioned(effect.effects[0].element); }}, + afterFinishInternal: function(effect) { with(Element) { + [hide, undoPositioned].call(effect.effects[0].element); + setStyle(effect.effects[0].element, oldStyle); }} + }, arguments[1] || {})); +} + +Effect.Shake = function(element) { + element = $(element); + var oldStyle = { + top: Element.getStyle(element, 'top'), + left: Element.getStyle(element, 'left') }; + return new Effect.Move(element, + { x: 20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { with(Element) { + undoPositioned(effect.element); + setStyle(effect.element, oldStyle); + }}}) }}) }}) }}) }}) }}); +} + +Effect.SlideDown = function(element) { + element = $(element); + Element.cleanWhitespace(element); + // SlideDown need to have the content of the element wrapped in a container element with fixed height! + var oldInnerBottom = Element.getStyle(element.firstChild, 'bottom'); + var elementDimensions = Element.getDimensions(element); + return new Effect.Scale(element, 100, Object.extend({ + scaleContent: false, + scaleX: false, + scaleFrom: 0, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { with(Element) { + makePositioned(effect.element); + makePositioned(effect.element.firstChild); + if(window.opera) setStyle(effect.element, {top: ''}); + makeClipping(effect.element); + setStyle(effect.element, {height: '0px'}); + show(element); }}, + afterUpdateInternal: function(effect) { with(Element) { + setStyle(effect.element.firstChild, {bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); }}, + afterFinishInternal: function(effect) { with(Element) { + undoClipping(effect.element); + undoPositioned(effect.element.firstChild); + undoPositioned(effect.element); + setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }} + }, arguments[1] || {}) + ); +} + +Effect.SlideUp = function(element) { + element = $(element); + Element.cleanWhitespace(element); + var oldInnerBottom = Element.getStyle(element.firstChild, 'bottom'); + return new Effect.Scale(element, 0, + Object.extend({ scaleContent: false, + scaleX: false, + scaleMode: 'box', + scaleFrom: 100, + restoreAfterFinish: true, + beforeStartInternal: function(effect) { with(Element) { + makePositioned(effect.element); + makePositioned(effect.element.firstChild); + if(window.opera) setStyle(effect.element, {top: ''}); + makeClipping(effect.element); + show(element); }}, + afterUpdateInternal: function(effect) { with(Element) { + setStyle(effect.element.firstChild, {bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); }}, + afterFinishInternal: function(effect) { with(Element) { + [hide, undoClipping].call(effect.element); + undoPositioned(effect.element.firstChild); + undoPositioned(effect.element); + setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }} + }, arguments[1] || {}) + ); +} + +// Bug in opera makes the TD containing this element expand for a instance after finish +Effect.Squish = function(element) { + return new Effect.Scale(element, window.opera ? 1 : 0, + { restoreAfterFinish: true, + beforeSetup: function(effect) { with(Element) { + makeClipping(effect.element); }}, + afterFinishInternal: function(effect) { with(Element) { + hide(effect.element); + undoClipping(effect.element); }} + }); +} + +Effect.Grow = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransistion: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.full + }, arguments[1] || {}); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: Element.getInlineOpacity(element) }; + + var dims = Element.getDimensions(element); + var initialMoveX, initialMoveY; + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + initialMoveX = initialMoveY = moveX = moveY = 0; + break; + case 'top-right': + initialMoveX = dims.width; + initialMoveY = moveY = 0; + moveX = -dims.width; + break; + case 'bottom-left': + initialMoveX = moveX = 0; + initialMoveY = dims.height; + moveY = -dims.height; + break; + case 'bottom-right': + initialMoveX = dims.width; + initialMoveY = dims.height; + moveX = -dims.width; + moveY = -dims.height; + break; + case 'center': + initialMoveX = dims.width / 2; + initialMoveY = dims.height / 2; + moveX = -dims.width / 2; + moveY = -dims.height / 2; + break; + } + + return new Effect.Move(element, { + x: initialMoveX, + y: initialMoveY, + duration: 0.01, + beforeSetup: function(effect) { with(Element) { + hide(effect.element); + makeClipping(effect.element); + makePositioned(effect.element); + }}, + afterFinishInternal: function(effect) { + new Effect.Parallel( + [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }), + new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }), + new Effect.Scale(effect.element, 100, { + scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, + sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true}) + ], Object.extend({ + beforeSetup: function(effect) { with(Element) { + setStyle(effect.effects[0].element, {height: '0px'}); + show(effect.effects[0].element); }}, + afterFinishInternal: function(effect) { with(Element) { + [undoClipping, undoPositioned].call(effect.effects[0].element); + setStyle(effect.effects[0].element, oldStyle); }} + }, options) + ) + } + }); +} + +Effect.Shrink = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransistion: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.none + }, arguments[1] || {}); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: Element.getInlineOpacity(element) }; + + var dims = Element.getDimensions(element); + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + moveX = moveY = 0; + break; + case 'top-right': + moveX = dims.width; + moveY = 0; + break; + case 'bottom-left': + moveX = 0; + moveY = dims.height; + break; + case 'bottom-right': + moveX = dims.width; + moveY = dims.height; + break; + case 'center': + moveX = dims.width / 2; + moveY = dims.height / 2; + break; + } + + return new Effect.Parallel( + [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }), + new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}), + new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }) + ], Object.extend({ + beforeStartInternal: function(effect) { with(Element) { + [makePositioned, makeClipping].call(effect.effects[0].element) }}, + afterFinishInternal: function(effect) { with(Element) { + [hide, undoClipping, undoPositioned].call(effect.effects[0].element); + setStyle(effect.effects[0].element, oldStyle); }} + }, options) + ); +} + +Effect.Pulsate = function(element) { + element = $(element); + var options = arguments[1] || {}; + var oldOpacity = Element.getInlineOpacity(element); + var transition = options.transition || Effect.Transitions.sinoidal; + var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) }; + reverser.bind(transition); + return new Effect.Opacity(element, + Object.extend(Object.extend({ duration: 3.0, from: 0, + afterFinishInternal: function(effect) { Element.setStyle(effect.element, {opacity: oldOpacity}); } + }, options), {transition: reverser})); +} + +Effect.Fold = function(element) { + element = $(element); + var oldStyle = { + top: element.style.top, + left: element.style.left, + width: element.style.width, + height: element.style.height }; + Element.makeClipping(element); + return new Effect.Scale(element, 5, Object.extend({ + scaleContent: false, + scaleX: false, + afterFinishInternal: function(effect) { + new Effect.Scale(element, 1, { + scaleContent: false, + scaleY: false, + afterFinishInternal: function(effect) { with(Element) { + [hide, undoClipping].call(effect.element); + setStyle(effect.element, oldStyle); + }} }); + }}, arguments[1] || {})); +} diff --git a/src/electrodomesticos.html b/src/electrodomesticos.html index b0ab173..63b4ba7 100644 --- a/src/electrodomesticos.html +++ b/src/electrodomesticos.html @@ -1,83 +1,184 @@ + + + + + + + + + Estudio Miguelo en Rivas, Madrid - Electrodomésticos - Hornos - Placas de inducción - Accesorios de cocina + + + + + + + + +
+ +
+

ELECTRODOMÉSTICOS
 

+

 

+ + +

 

+ + +

 

+ + +

 

+ + +

 

+ + +

 

+ + +

 

+

Campana Decorativa Frecan Modelo Zebra

+ -

 

+ +

 

+

Lavavajillas integrado Smeg

+ -

 

+ +

 

+

Modulares Foster; Wok, 2 fuegos inducción, Tepan Yaki

+ -

 

+ +

 

+

Frigorífico Combi Smeg, Modelo Bombino Crema

+ -

 

+ +

 

+

Horno Franke Pirolítico Serie Kubus

+ +

 

+
+
+
+ + + + + diff --git a/src/electrodomesticos/electro1.jpg b/src/electrodomesticos/electro1.jpg new file mode 100644 index 0000000..6316730 Binary files /dev/null and b/src/electrodomesticos/electro1.jpg differ diff --git a/src/electrodomesticos/electro1_p.jpg b/src/electrodomesticos/electro1_p.jpg new file mode 100644 index 0000000..63f2934 Binary files /dev/null and b/src/electrodomesticos/electro1_p.jpg differ diff --git a/src/electrodomesticos/electro2.jpg b/src/electrodomesticos/electro2.jpg new file mode 100644 index 0000000..689c77d Binary files /dev/null and b/src/electrodomesticos/electro2.jpg differ diff --git a/src/electrodomesticos/electro2_p.jpg b/src/electrodomesticos/electro2_p.jpg new file mode 100644 index 0000000..89e18f7 Binary files /dev/null and b/src/electrodomesticos/electro2_p.jpg differ diff --git a/src/electrodomesticos/electro3.jpg b/src/electrodomesticos/electro3.jpg new file mode 100644 index 0000000..df3da6d Binary files /dev/null and b/src/electrodomesticos/electro3.jpg differ diff --git a/src/electrodomesticos/electro3_p.jpg b/src/electrodomesticos/electro3_p.jpg new file mode 100644 index 0000000..88844af Binary files /dev/null and b/src/electrodomesticos/electro3_p.jpg differ diff --git a/src/electrodomesticos/electro4.jpg b/src/electrodomesticos/electro4.jpg new file mode 100644 index 0000000..5f59ccd Binary files /dev/null and b/src/electrodomesticos/electro4.jpg differ diff --git a/src/electrodomesticos/electro4_p.jpg b/src/electrodomesticos/electro4_p.jpg new file mode 100644 index 0000000..fcbf666 Binary files /dev/null and b/src/electrodomesticos/electro4_p.jpg differ diff --git a/src/electrodomesticos/electro5.jpg b/src/electrodomesticos/electro5.jpg new file mode 100644 index 0000000..295bb08 Binary files /dev/null and b/src/electrodomesticos/electro5.jpg differ diff --git a/src/electrodomesticos/electro5_p.jpg b/src/electrodomesticos/electro5_p.jpg new file mode 100644 index 0000000..061e65e Binary files /dev/null and b/src/electrodomesticos/electro5_p.jpg differ diff --git a/src/electrodomesticos/electro6.jpg b/src/electrodomesticos/electro6.jpg new file mode 100644 index 0000000..590b459 Binary files /dev/null and b/src/electrodomesticos/electro6.jpg differ diff --git a/src/electrodomesticos/electro6_p.jpg b/src/electrodomesticos/electro6_p.jpg new file mode 100644 index 0000000..e4a916a Binary files /dev/null and b/src/electrodomesticos/electro6_p.jpg differ diff --git a/src/electrodomesticos/promo/52920_IMGPR_Z.jpg b/src/electrodomesticos/promo/52920_IMGPR_Z.jpg new file mode 100644 index 0000000..856590e Binary files /dev/null and b/src/electrodomesticos/promo/52920_IMGPR_Z.jpg differ diff --git a/src/electrodomesticos/promo/52920_IMGPR_Z_small.jpg b/src/electrodomesticos/promo/52920_IMGPR_Z_small.jpg new file mode 100644 index 0000000..581ac25 Binary files /dev/null and b/src/electrodomesticos/promo/52920_IMGPR_Z_small.jpg differ diff --git a/src/electrodomesticos/promo/53735_IMGPR_Z.jpg b/src/electrodomesticos/promo/53735_IMGPR_Z.jpg new file mode 100644 index 0000000..3838785 Binary files /dev/null and b/src/electrodomesticos/promo/53735_IMGPR_Z.jpg differ diff --git a/src/electrodomesticos/promo/53735_IMGPR_Z_small.jpg b/src/electrodomesticos/promo/53735_IMGPR_Z_small.jpg new file mode 100644 index 0000000..d40733c Binary files /dev/null and b/src/electrodomesticos/promo/53735_IMGPR_Z_small.jpg differ diff --git a/src/estilos.css b/src/estilos.css index 51c477d..ef65ee9 100644 --- a/src/estilos.css +++ b/src/estilos.css @@ -5,58 +5,49 @@ body { font-size: 8pt; background-color: #D3D3D3; } - h1 { color: #9B917D; - font-family: Verdana; + font-family: Verdana; font-size: 9pt; padding-top:10px; pading-bottom: 10px; } - h2 { color: #503500; - font-family: Verdana; + font-family: Verdana; font-size: 8pt; padding-top:10px; pading-bottom: 10px; } - h4 { color: #d72e23; - font-family: Verdana; + font-family: Verdana; font-size: 12pt; padding-top:10px; pading-bottom: 10px; } - hr { height: 1px; color: #ccc; border: dotted; } - li { font-family: Verdana; font-size: 8pt; line-height: 25px; } - a:link, a:visited, a:hover { color: #902424; font-size: 8pt; text-decoration: none; } - a:hover { color: white; text-decoration: none; } - td { text-align:left; } - #documento { background-color: #D3D3D3; background-image: url(images/fondo.gif); @@ -66,7 +57,6 @@ td { height: 597px; margin-top:20px; } - #cabecera { background-color: #fff; margin-right: auto; @@ -75,7 +65,6 @@ td { width: 800px; height: 153px; } - #cuerpo { background-color: transparent; float: left; @@ -90,36 +79,31 @@ td { padding-bottom: 0px; text-align: left; color: white; - scrollbar-face-color: black; - scrollbar-shadow-color: #9A977A; - scrollbar-highlight-color: #9A977A; + scrollbar-face-color: black; + scrollbar-shadow-color: #9A977A; + scrollbar-highlight-color: #9A977A; scrollbar-3dlight-color: #9A977A; scrollbar-darkshadow-color: #9A977A; - scrollbar-track-color: black; - scrollbar-arrow-color: white; + scrollbar-track-color: black; + scrollbar-arrow-color: white; } - #portada { float: left; - margin-top: 150px; + margin-top: 110px; margin-left: 25px; width: 660px; - height: 299px; - background-image: url(images/portada2.jpg); + height: 405px; + background-image: url(images/portada3.jpg); } - #spot { width: 150px; height: 120px; padding-top: 3px; text-align:center; } - - #spot a img { - border: 1px solid #666; - } - - +#spot a img { + border: 1px solid #666; +} #menu { float: left; margin-left: 40px; @@ -133,7 +117,6 @@ td { font-weight: bold; color: #FFFFFF; } - #menu1 { float: left; margin-left: 40px; @@ -146,7 +129,6 @@ td { font-weight: bold; color: #FFFFFF; } - #pie { background-color: #fff; margin-right: auto; @@ -154,13 +136,11 @@ td { width: 800px; height: 99px; } - .Estilo1 { color: #FF66CC; font-weight: bold; } - #plano { -position: absolute; -border: 1px solid #3399ff; -} \ No newline at end of file + position: absolute; + border: 1px solid #3399ff; +} diff --git a/src/images/MenuBanos.jpg b/src/images/MenuBanos.jpg new file mode 100644 index 0000000..da60610 Binary files /dev/null and b/src/images/MenuBanos.jpg differ diff --git a/src/images/MenuExpo4.jpg b/src/images/MenuExpo4.jpg index 97eed75..05ea65f 100644 Binary files a/src/images/MenuExpo4.jpg and b/src/images/MenuExpo4.jpg differ diff --git a/src/images/portada3.jpg b/src/images/portada3.jpg new file mode 100644 index 0000000..3256b6d Binary files /dev/null and b/src/images/portada3.jpg differ diff --git a/src/index.htm b/src/index.htm index 1c80b9e..0a625a0 100644 --- a/src/index.htm +++ b/src/index.htm @@ -1,60 +1,68 @@ - - - - - - - Estudio Miguelo. Mobiliario de cocina y baño. Decoracion e interiorismo en Rivas, Madrid + + + + + + +Estudio Miguelo. Mobiliario de cocina y baño. Decoracion e interiorismo en Rivas, Madrid + + + + + + + - - - - - - - - - diff --git a/src/jardin.html b/src/jardin.html index e29f785..9792daf 100644 --- a/src/jardin.html +++ b/src/jardin.html @@ -1,61 +1,61 @@ - - - - - - - - - - - -Estudio Miguelo en Rivas, Madrid. Mobiliario para su jardín - muebles de terraza, butacas, mesas y sillas - - - - - - - - - - - -
- -
-

JARDÍN.
 

-

 

-

Mobiliario de Jardín. Modelo Colón . Fibra de Vidrio, color Blanco

- -

 

-

Mobiliario de Jardín. Modelo. Fibra de Vidrio, color Caoba

- -

 

-

Mobiliario de Jardín. Modelo Picasso . Fibra de Vidrio, color Negro

- -

 

-

Mobiliario de Jardín. Modelo Picasso . Fibra de Vidrio, color Negro

- -

 

-
-
-
- - - - + + + + + + + + + + + +Estudio Miguelo en Rivas, Madrid. Mobiliario para su jardín - muebles de terraza, butacas, mesas y sillas + + + + + + + + + + + +
+ +
+

JARDÍN.
 

+

 

+

Mobiliario de Jardín. Modelo Colón . Fibra de Vidrio, color Blanco

+ +

 

+

Mobiliario de Jardín. Modelo. Fibra de Vidrio, color Caoba

+ +

 

+

Mobiliario de Jardín. Modelo Picasso . Fibra de Vidrio, color Negro

+ +

 

+

Mobiliario de Jardín. Modelo Picasso . Fibra de Vidrio, color Negro

+ +

 

+
+
+
+ + + + diff --git a/src/lightbox.css b/src/lightbox.css index 31f0938..00bcdc5 100644 --- a/src/lightbox.css +++ b/src/lightbox.css @@ -1,104 +1,104 @@ -#lightbox{ - position: absolute; - top: 40px; - left: 0; - width: 100%; - z-index: 100; - text-align: center; - line-height: 0; - } - -#lightbox a img{ border: none; } - -#outerImageContainer{ - position: relative; - background-color: #fff; - width: 250px; - height: 250px; - margin: 0 auto; - } - -#imageContainer{ - padding: 10px; - } - -#loading{ - position: absolute; - top: 40%; - left: 0%; - height: 25%; - width: 100%; - text-align: center; - line-height: 0; - } -#hoverNav{ - position: absolute; - top: 0; - left: 0; - height: 100%; - width: 100%; - z-index: 10; - } -#imageContainer>#hoverNav{ left: 0;} -#hoverNav a{ outline: none;} - -#prevLink, #nextLink{ - width: 49%; - height: 100%; - background: transparent url(../images/blank.gif) no-repeat; /* Trick IE into showing hover */ - display: block; - } -#prevLink { left: 0; float: left;} -#nextLink { right: 0; float: right;} -#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; } -#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; } - - -#imageDataContainer{ - font: 10px Verdana, Helvetica, sans-serif; - background-color: #fff; - margin: 0 auto; - line-height: 1.4em; - } - -#imageData{ - padding:0 10px; - } -#imageData #imageDetails{ width: 70%; float: left; text-align: left; } -#imageData #caption{ font-weight: bold; } -#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; } -#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; } - -#overlay{ - position: absolute; - top: 0; - left: 0; - z-index: 90; - width: 100%; -# height: 500px; - background-color: #000; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; - } - - -.clearfix:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; - } - -* html>body .clearfix { - display: inline-block; - width: 100%; - } - -* html .clearfix { - /* Hides from IE-mac \*/ - height: 1%; - /* End hide from IE-mac */ - } +#lightbox{ + position: absolute; + top: 40px; + left: 0; + width: 100%; + z-index: 100; + text-align: center; + line-height: 0; + } + +#lightbox a img{ border: none; } + +#outerImageContainer{ + position: relative; + background-color: #fff; + width: 250px; + height: 250px; + margin: 0 auto; + } + +#imageContainer{ + padding: 10px; + } + +#loading{ + position: absolute; + top: 40%; + left: 0%; + height: 25%; + width: 100%; + text-align: center; + line-height: 0; + } +#hoverNav{ + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + z-index: 10; + } +#imageContainer>#hoverNav{ left: 0;} +#hoverNav a{ outline: none;} + +#prevLink, #nextLink{ + width: 49%; + height: 100%; + background: transparent url(../images/blank.gif) no-repeat; /* Trick IE into showing hover */ + display: block; + } +#prevLink { left: 0; float: left;} +#nextLink { right: 0; float: right;} +#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; } +#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; } + + +#imageDataContainer{ + font: 10px Verdana, Helvetica, sans-serif; + background-color: #fff; + margin: 0 auto; + line-height: 1.4em; + } + +#imageData{ + padding:0 10px; + } +#imageData #imageDetails{ width: 70%; float: left; text-align: left; } +#imageData #caption{ font-weight: bold; } +#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; } +#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; } + +#overlay{ + position: absolute; + top: 0; + left: 0; + z-index: 90; + width: 100%; +# height: 500px; + background-color: #000; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; + } + + +.clearfix:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + +* html>body .clearfix { + display: inline-block; + width: 100%; + } + +* html .clearfix { + /* Hides from IE-mac \*/ + height: 1%; + /* End hide from IE-mac */ + } \ No newline at end of file diff --git a/src/lightbox.js b/src/lightbox.js index f746712..b12df94 100644 --- a/src/lightbox.js +++ b/src/lightbox.js @@ -1,689 +1,689 @@ -// ----------------------------------------------------------------------------------- -// -// Lightbox v2.01 -// by Lokesh Dhakar - http://www.huddletogether.com -// 3/31/06 -// -// For more information on this script, visit: -// http://huddletogether.com/projects/lightbox2/ -// -// Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/ -// -// Credit also due to those who have helped, inspired, and made their code available to the public. -// Including: Scott Upton(uptonic.com), Peter-Paul Koch(quirksmode.org), Thomas Fuchs(mir.aculo.us), and others. -// -// -// ----------------------------------------------------------------------------------- -/* - - Table of Contents - ----------------- - Configuration - Global Variables - - Extending Built-in Objects - - Object.extend(Element) - - Array.prototype.removeDuplicates() - - Array.prototype.empty() - - Lightbox Class Declaration - - initialize() - - start() - - changeImage() - - resizeImageContainer() - - showImage() - - updateDetails() - - updateNav() - - enableKeyboardNav() - - disableKeyboardNav() - - keyboardAction() - - preloadNeighborImages() - - end() - - Miscellaneous Functions - - getPageScroll() - - getPageSize() - - getKey() - - listenKey() - - showSelectBoxes() - - hideSelectBoxes() - - pause() - - initLightbox() - - Function Calls - - addLoadEvent(initLightbox) - -*/ -// ----------------------------------------------------------------------------------- - -// -// Configuration -// -var fileLoadingImage = "images/loading.gif"; -var fileBottomNavCloseImage = "images/closelabel.gif"; - -var resizeSpeed = 7; // controls the speed of the image resizing (1=slowest and 10=fastest) - -var borderSize = 10; //if you adjust the padding in the CSS, you will need to update this variable - -// ----------------------------------------------------------------------------------- - -// -// Global Variables -// -var imageArray = new Array; -var activeImage; - -if(resizeSpeed > 10){ resizeSpeed = 10;} -if(resizeSpeed < 1){ resizeSpeed = 1;} -resizeDuration = (11 - resizeSpeed) * 0.15; - -// ----------------------------------------------------------------------------------- - -// -// Additional methods for Element added by SU, Couloir -// - further additions by Lokesh Dhakar (huddletogether.com) -// -Object.extend(Element, { - getWidth: function(element) { - element = $(element); - return element.offsetWidth; - }, - setWidth: function(element,w) { - element = $(element); - element.style.width = w +"px"; - }, - setHeight: function(element,h) { - element = $(element); - element.style.height = h +"px"; - }, - setTop: function(element,t) { - element = $(element); - element.style.top = t +"px"; - }, - setSrc: function(element,src) { - element = $(element); - element.src = src; - }, - setHref: function(element,href) { - element = $(element); - element.href = href; - }, - setInnerHTML: function(element,content) { - element = $(element); - element.innerHTML = content; - } -}); - -// ----------------------------------------------------------------------------------- - -// -// Extending built-in Array object -// - array.removeDuplicates() -// - array.empty() -// -Array.prototype.removeDuplicates = function () { - for(i = 1; i < this.length; i++){ - if(this[i][0] == this[i-1][0]){ - this.splice(i,1); - } - } -} - -// ----------------------------------------------------------------------------------- - -Array.prototype.empty = function () { - for(i = 0; i <= this.length; i++){ - this.shift(); - } -} - -// ----------------------------------------------------------------------------------- - -// -// Lightbox Class Declaration -// - initialize() -// - start() -// - changeImage() -// - resizeImageContainer() -// - showImage() -// - updateDetails() -// - updateNav() -// - enableKeyboardNav() -// - disableKeyboardNav() -// - keyboardNavAction() -// - preloadNeighborImages() -// - end() -// -// Structuring of code inspired by Scott Upton (http://www.uptonic.com/) -// -var Lightbox = Class.create(); - -Lightbox.prototype = { - - // initialize() - // Constructor runs on completion of the DOM loading. Loops through anchor tags looking for - // 'lightbox' references and applies onclick events to appropriate links. The 2nd section of - // the function inserts html at the bottom of the page which is used to display the shadow - // overlay and the image container. - // - initialize: function() { - if (!document.getElementsByTagName){ return; } - var anchors = document.getElementsByTagName('a'); - - // loop through all anchor tags - for (var i=0; i
- // - - - var objBody = document.getElementsByTagName("body").item(0); - - var objOverlay = document.createElement("div"); - objOverlay.setAttribute('id','overlay'); - objOverlay.style.display = 'none'; - objOverlay.onclick = function() { myLightbox.end(); return false; } - objBody.appendChild(objOverlay); - - var objLightbox = document.createElement("div"); - objLightbox.setAttribute('id','lightbox'); - objLightbox.style.display = 'none'; - objBody.appendChild(objLightbox); - - var objOuterImageContainer = document.createElement("div"); - objOuterImageContainer.setAttribute('id','outerImageContainer'); - objLightbox.appendChild(objOuterImageContainer); - - var objImageContainer = document.createElement("div"); - objImageContainer.setAttribute('id','imageContainer'); - objOuterImageContainer.appendChild(objImageContainer); - - var objLightboxImage = document.createElement("img"); - objLightboxImage.setAttribute('id','lightboxImage'); - objImageContainer.appendChild(objLightboxImage); - - var objHoverNav = document.createElement("div"); - objHoverNav.setAttribute('id','hoverNav'); - objImageContainer.appendChild(objHoverNav); - - var objPrevLink = document.createElement("a"); - objPrevLink.setAttribute('id','prevLink'); - objPrevLink.setAttribute('href','#'); - objHoverNav.appendChild(objPrevLink); - - var objNextLink = document.createElement("a"); - objNextLink.setAttribute('id','nextLink'); - objNextLink.setAttribute('href','#'); - objHoverNav.appendChild(objNextLink); - - var objLoading = document.createElement("div"); - objLoading.setAttribute('id','loading'); - objImageContainer.appendChild(objLoading); - - var objLoadingLink = document.createElement("a"); - objLoadingLink.setAttribute('id','loadingLink'); - objLoadingLink.setAttribute('href','#'); - objLoadingLink.onclick = function() { myLightbox.end(); return false; } - objLoading.appendChild(objLoadingLink); - - var objLoadingImage = document.createElement("img"); - objLoadingImage.setAttribute('src', fileLoadingImage); - objLoadingLink.appendChild(objLoadingImage); - - var objImageDataContainer = document.createElement("div"); - objImageDataContainer.setAttribute('id','imageDataContainer'); - objImageDataContainer.className = 'clearfix'; - objLightbox.appendChild(objImageDataContainer); - - var objImageData = document.createElement("div"); - objImageData.setAttribute('id','imageData'); - objImageDataContainer.appendChild(objImageData); - - var objImageDetails = document.createElement("div"); - objImageDetails.setAttribute('id','imageDetails'); - objImageData.appendChild(objImageDetails); - - var objCaption = document.createElement("span"); - objCaption.setAttribute('id','caption'); - objImageDetails.appendChild(objCaption); - - var objNumberDisplay = document.createElement("span"); - objNumberDisplay.setAttribute('id','numberDisplay'); - objImageDetails.appendChild(objNumberDisplay); - - var objBottomNav = document.createElement("div"); - objBottomNav.setAttribute('id','bottomNav'); - objImageData.appendChild(objBottomNav); - - var objBottomNavCloseLink = document.createElement("a"); - objBottomNavCloseLink.setAttribute('id','bottomNavClose'); - objBottomNavCloseLink.setAttribute('href','#'); - objBottomNavCloseLink.onclick = function() { myLightbox.end(); return false; } - objBottomNav.appendChild(objBottomNavCloseLink); - - var objBottomNavCloseImage = document.createElement("img"); - objBottomNavCloseImage.setAttribute('src', fileBottomNavCloseImage); - objBottomNavCloseLink.appendChild(objBottomNavCloseImage); - }, - - // - // start() - // Display overlay and lightbox. If image is part of a set, add siblings to imageArray. - // - start: function(imageLink) { - - hideSelectBoxes(); - - // stretch overlay to fill page and fade in - var arrayPageSize = getPageSize(); - Element.setHeight('overlay', arrayPageSize[1]); - new Effect.Appear('overlay', { duration: 0.2, from: 0.0, to: 0.8 }); - - imageArray = []; - imageNum = 0; - - if (!document.getElementsByTagName){ return; } - var anchors = document.getElementsByTagName('a'); - - // if image is NOT part of a set.. - if((imageLink.getAttribute('rel') == 'lightbox')){ - // add single image to imageArray - imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title'))); - } else { - // if image is part of a set.. - - // loop through anchors, find other images in set, and add them to imageArray - for (var i=0; i 1){ - Element.show('numberDisplay'); - Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length); - } - - new Effect.Parallel( - [ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: resizeDuration + 0.25, from: 0.0, to: 1.0 }), - new Effect.Appear('imageDataContainer', { sync: true, duration: 1.0 }) ], - { duration: 0.65, afterFinish: function() { myLightbox.updateNav();} } - ); - }, - - // - // updateNav() - // Display appropriate previous and next hover navigation. - // - updateNav: function() { - - Element.show('hoverNav'); - - // if not first image in set, display prev image button - if(activeImage != 0){ - Element.show('prevLink'); - document.getElementById('prevLink').onclick = function() { - myLightbox.changeImage(activeImage - 1); return false; - } - } - - // if not last image in set, display next image button - if(activeImage != (imageArray.length - 1)){ - Element.show('nextLink'); - document.getElementById('nextLink').onclick = function() { - myLightbox.changeImage(activeImage + 1); return false; - } - } - - this.enableKeyboardNav(); - }, - - // - // enableKeyboardNav() - // - enableKeyboardNav: function() { - document.onkeydown = this.keyboardAction; - }, - - // - // disableKeyboardNav() - // - disableKeyboardNav: function() { - document.onkeydown = ''; - }, - - // - // keyboardAction() - // - keyboardAction: function(e) { - if (e == null) { // ie - keycode = event.keyCode; - } else { // mozilla - keycode = e.which; - } - - key = String.fromCharCode(keycode).toLowerCase(); - - if((key == 'x') || (key == 'o') || (key == 'c')){ // close lightbox - myLightbox.end(); - } else if(key == 'p'){ // display previous image - if(activeImage != 0){ - myLightbox.disableKeyboardNav(); - myLightbox.changeImage(activeImage - 1); - } - } else if(key == 'n'){ // display next image - if(activeImage != (imageArray.length - 1)){ - myLightbox.disableKeyboardNav(); - myLightbox.changeImage(activeImage + 1); - } - } - - - }, - - // - // preloadNeighborImages() - // Preload previous and next images. - // - preloadNeighborImages: function(){ - - if((imageArray.length - 1) > activeImage){ - preloadNextImage = new Image(); - preloadNextImage.src = imageArray[activeImage + 1][0]; - } - if(activeImage > 0){ - preloadPrevImage = new Image(); - preloadPrevImage.src = imageArray[activeImage - 1][0]; - } - - }, - - // - // end() - // - end: function() { - this.disableKeyboardNav(); - Element.hide('lightbox'); - new Effect.Fade('overlay', { duration: 0.2}); - showSelectBoxes(); - } -} - -// ----------------------------------------------------------------------------------- - -// -// getPageScroll() -// Returns array with x,y page scroll values. -// Core code from - quirksmode.org -// -function getPageScroll(){ - - var yScroll; - - if (self.pageYOffset) { - yScroll = self.pageYOffset; - } else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict - yScroll = document.documentElement.scrollTop; - } else if (document.body) {// all other Explorers - yScroll = document.body.scrollTop; - } - - arrayPageScroll = new Array('',yScroll) - return arrayPageScroll; -} - -// ----------------------------------------------------------------------------------- - -// -// getPageSize() -// Returns array with page width, height and window width, height -// Core code from - quirksmode.org -// Edit for Firefox by pHaez -// -function getPageSize(){ - - var xScroll, yScroll; - - if (window.innerHeight && window.scrollMaxY) { - xScroll = document.body.scrollWidth; - yScroll = window.innerHeight + window.scrollMaxY; - } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac - xScroll = document.body.scrollWidth; - yScroll = document.body.scrollHeight; - } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari - xScroll = document.body.offsetWidth; - yScroll = document.body.offsetHeight; - } - - var windowWidth, windowHeight; - if (self.innerHeight) { // all except Explorer - windowWidth = self.innerWidth; - windowHeight = self.innerHeight; - } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode - windowWidth = document.documentElement.clientWidth; - windowHeight = document.documentElement.clientHeight; - } else if (document.body) { // other Explorers - windowWidth = document.body.clientWidth; - windowHeight = document.body.clientHeight; - } - - // for small pages with total height less then height of the viewport - if(yScroll < windowHeight){ - pageHeight = windowHeight; - } else { - pageHeight = yScroll; - } - - // for small pages with total width less then width of the viewport - if(xScroll < windowWidth){ - pageWidth = windowWidth; - } else { - pageWidth = xScroll; - } - - - arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) - return arrayPageSize; -} - -// ----------------------------------------------------------------------------------- - -// -// getKey(key) -// Gets keycode. If 'x' is pressed then it hides the lightbox. -// -function getKey(e){ - if (e == null) { // ie - keycode = event.keyCode; - } else { // mozilla - keycode = e.which; - } - key = String.fromCharCode(keycode).toLowerCase(); - - if(key == 'x'){ - } -} - -// ----------------------------------------------------------------------------------- - -// -// listenKey() -// -function listenKey () { document.onkeypress = getKey; } - -// --------------------------------------------------- - -function showSelectBoxes(){ - selects = document.getElementsByTagName("select"); - for (i = 0; i != selects.length; i++) { - selects[i].style.visibility = "visible"; - } -} - -// --------------------------------------------------- - -function hideSelectBoxes(){ - selects = document.getElementsByTagName("select"); - for (i = 0; i != selects.length; i++) { - selects[i].style.visibility = "hidden"; - } -} - -// --------------------------------------------------- - -// -// pause(numberMillis) -// Pauses code execution for specified time. Uses busy code, not good. -// Code from http://www.faqts.com/knowledge_base/view.phtml/aid/1602 -// -function pause(numberMillis) { - var now = new Date(); - var exitTime = now.getTime() + numberMillis; - while (true) { - now = new Date(); - if (now.getTime() > exitTime) - return; - } -} - -// --------------------------------------------------- - - - -function initLightbox() { myLightbox = new Lightbox(); } +// ----------------------------------------------------------------------------------- +// +// Lightbox v2.01 +// by Lokesh Dhakar - http://www.huddletogether.com +// 3/31/06 +// +// For more information on this script, visit: +// http://huddletogether.com/projects/lightbox2/ +// +// Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/ +// +// Credit also due to those who have helped, inspired, and made their code available to the public. +// Including: Scott Upton(uptonic.com), Peter-Paul Koch(quirksmode.org), Thomas Fuchs(mir.aculo.us), and others. +// +// +// ----------------------------------------------------------------------------------- +/* + + Table of Contents + ----------------- + Configuration + Global Variables + + Extending Built-in Objects + - Object.extend(Element) + - Array.prototype.removeDuplicates() + - Array.prototype.empty() + + Lightbox Class Declaration + - initialize() + - start() + - changeImage() + - resizeImageContainer() + - showImage() + - updateDetails() + - updateNav() + - enableKeyboardNav() + - disableKeyboardNav() + - keyboardAction() + - preloadNeighborImages() + - end() + + Miscellaneous Functions + - getPageScroll() + - getPageSize() + - getKey() + - listenKey() + - showSelectBoxes() + - hideSelectBoxes() + - pause() + - initLightbox() + + Function Calls + - addLoadEvent(initLightbox) + +*/ +// ----------------------------------------------------------------------------------- + +// +// Configuration +// +var fileLoadingImage = "images/loading.gif"; +var fileBottomNavCloseImage = "images/closelabel.gif"; + +var resizeSpeed = 7; // controls the speed of the image resizing (1=slowest and 10=fastest) + +var borderSize = 10; //if you adjust the padding in the CSS, you will need to update this variable + +// ----------------------------------------------------------------------------------- + +// +// Global Variables +// +var imageArray = new Array; +var activeImage; + +if(resizeSpeed > 10){ resizeSpeed = 10;} +if(resizeSpeed < 1){ resizeSpeed = 1;} +resizeDuration = (11 - resizeSpeed) * 0.15; + +// ----------------------------------------------------------------------------------- + +// +// Additional methods for Element added by SU, Couloir +// - further additions by Lokesh Dhakar (huddletogether.com) +// +Object.extend(Element, { + getWidth: function(element) { + element = $(element); + return element.offsetWidth; + }, + setWidth: function(element,w) { + element = $(element); + element.style.width = w +"px"; + }, + setHeight: function(element,h) { + element = $(element); + element.style.height = h +"px"; + }, + setTop: function(element,t) { + element = $(element); + element.style.top = t +"px"; + }, + setSrc: function(element,src) { + element = $(element); + element.src = src; + }, + setHref: function(element,href) { + element = $(element); + element.href = href; + }, + setInnerHTML: function(element,content) { + element = $(element); + element.innerHTML = content; + } +}); + +// ----------------------------------------------------------------------------------- + +// +// Extending built-in Array object +// - array.removeDuplicates() +// - array.empty() +// +Array.prototype.removeDuplicates = function () { + for(i = 1; i < this.length; i++){ + if(this[i][0] == this[i-1][0]){ + this.splice(i,1); + } + } +} + +// ----------------------------------------------------------------------------------- + +Array.prototype.empty = function () { + for(i = 0; i <= this.length; i++){ + this.shift(); + } +} + +// ----------------------------------------------------------------------------------- + +// +// Lightbox Class Declaration +// - initialize() +// - start() +// - changeImage() +// - resizeImageContainer() +// - showImage() +// - updateDetails() +// - updateNav() +// - enableKeyboardNav() +// - disableKeyboardNav() +// - keyboardNavAction() +// - preloadNeighborImages() +// - end() +// +// Structuring of code inspired by Scott Upton (http://www.uptonic.com/) +// +var Lightbox = Class.create(); + +Lightbox.prototype = { + + // initialize() + // Constructor runs on completion of the DOM loading. Loops through anchor tags looking for + // 'lightbox' references and applies onclick events to appropriate links. The 2nd section of + // the function inserts html at the bottom of the page which is used to display the shadow + // overlay and the image container. + // + initialize: function() { + if (!document.getElementsByTagName){ return; } + var anchors = document.getElementsByTagName('a'); + + // loop through all anchor tags + for (var i=0; i
+ // + + + var objBody = document.getElementsByTagName("body").item(0); + + var objOverlay = document.createElement("div"); + objOverlay.setAttribute('id','overlay'); + objOverlay.style.display = 'none'; + objOverlay.onclick = function() { myLightbox.end(); return false; } + objBody.appendChild(objOverlay); + + var objLightbox = document.createElement("div"); + objLightbox.setAttribute('id','lightbox'); + objLightbox.style.display = 'none'; + objBody.appendChild(objLightbox); + + var objOuterImageContainer = document.createElement("div"); + objOuterImageContainer.setAttribute('id','outerImageContainer'); + objLightbox.appendChild(objOuterImageContainer); + + var objImageContainer = document.createElement("div"); + objImageContainer.setAttribute('id','imageContainer'); + objOuterImageContainer.appendChild(objImageContainer); + + var objLightboxImage = document.createElement("img"); + objLightboxImage.setAttribute('id','lightboxImage'); + objImageContainer.appendChild(objLightboxImage); + + var objHoverNav = document.createElement("div"); + objHoverNav.setAttribute('id','hoverNav'); + objImageContainer.appendChild(objHoverNav); + + var objPrevLink = document.createElement("a"); + objPrevLink.setAttribute('id','prevLink'); + objPrevLink.setAttribute('href','#'); + objHoverNav.appendChild(objPrevLink); + + var objNextLink = document.createElement("a"); + objNextLink.setAttribute('id','nextLink'); + objNextLink.setAttribute('href','#'); + objHoverNav.appendChild(objNextLink); + + var objLoading = document.createElement("div"); + objLoading.setAttribute('id','loading'); + objImageContainer.appendChild(objLoading); + + var objLoadingLink = document.createElement("a"); + objLoadingLink.setAttribute('id','loadingLink'); + objLoadingLink.setAttribute('href','#'); + objLoadingLink.onclick = function() { myLightbox.end(); return false; } + objLoading.appendChild(objLoadingLink); + + var objLoadingImage = document.createElement("img"); + objLoadingImage.setAttribute('src', fileLoadingImage); + objLoadingLink.appendChild(objLoadingImage); + + var objImageDataContainer = document.createElement("div"); + objImageDataContainer.setAttribute('id','imageDataContainer'); + objImageDataContainer.className = 'clearfix'; + objLightbox.appendChild(objImageDataContainer); + + var objImageData = document.createElement("div"); + objImageData.setAttribute('id','imageData'); + objImageDataContainer.appendChild(objImageData); + + var objImageDetails = document.createElement("div"); + objImageDetails.setAttribute('id','imageDetails'); + objImageData.appendChild(objImageDetails); + + var objCaption = document.createElement("span"); + objCaption.setAttribute('id','caption'); + objImageDetails.appendChild(objCaption); + + var objNumberDisplay = document.createElement("span"); + objNumberDisplay.setAttribute('id','numberDisplay'); + objImageDetails.appendChild(objNumberDisplay); + + var objBottomNav = document.createElement("div"); + objBottomNav.setAttribute('id','bottomNav'); + objImageData.appendChild(objBottomNav); + + var objBottomNavCloseLink = document.createElement("a"); + objBottomNavCloseLink.setAttribute('id','bottomNavClose'); + objBottomNavCloseLink.setAttribute('href','#'); + objBottomNavCloseLink.onclick = function() { myLightbox.end(); return false; } + objBottomNav.appendChild(objBottomNavCloseLink); + + var objBottomNavCloseImage = document.createElement("img"); + objBottomNavCloseImage.setAttribute('src', fileBottomNavCloseImage); + objBottomNavCloseLink.appendChild(objBottomNavCloseImage); + }, + + // + // start() + // Display overlay and lightbox. If image is part of a set, add siblings to imageArray. + // + start: function(imageLink) { + + hideSelectBoxes(); + + // stretch overlay to fill page and fade in + var arrayPageSize = getPageSize(); + Element.setHeight('overlay', arrayPageSize[1]); + new Effect.Appear('overlay', { duration: 0.2, from: 0.0, to: 0.8 }); + + imageArray = []; + imageNum = 0; + + if (!document.getElementsByTagName){ return; } + var anchors = document.getElementsByTagName('a'); + + // if image is NOT part of a set.. + if((imageLink.getAttribute('rel') == 'lightbox')){ + // add single image to imageArray + imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title'))); + } else { + // if image is part of a set.. + + // loop through anchors, find other images in set, and add them to imageArray + for (var i=0; i 1){ + Element.show('numberDisplay'); + Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length); + } + + new Effect.Parallel( + [ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: resizeDuration + 0.25, from: 0.0, to: 1.0 }), + new Effect.Appear('imageDataContainer', { sync: true, duration: 1.0 }) ], + { duration: 0.65, afterFinish: function() { myLightbox.updateNav();} } + ); + }, + + // + // updateNav() + // Display appropriate previous and next hover navigation. + // + updateNav: function() { + + Element.show('hoverNav'); + + // if not first image in set, display prev image button + if(activeImage != 0){ + Element.show('prevLink'); + document.getElementById('prevLink').onclick = function() { + myLightbox.changeImage(activeImage - 1); return false; + } + } + + // if not last image in set, display next image button + if(activeImage != (imageArray.length - 1)){ + Element.show('nextLink'); + document.getElementById('nextLink').onclick = function() { + myLightbox.changeImage(activeImage + 1); return false; + } + } + + this.enableKeyboardNav(); + }, + + // + // enableKeyboardNav() + // + enableKeyboardNav: function() { + document.onkeydown = this.keyboardAction; + }, + + // + // disableKeyboardNav() + // + disableKeyboardNav: function() { + document.onkeydown = ''; + }, + + // + // keyboardAction() + // + keyboardAction: function(e) { + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + + key = String.fromCharCode(keycode).toLowerCase(); + + if((key == 'x') || (key == 'o') || (key == 'c')){ // close lightbox + myLightbox.end(); + } else if(key == 'p'){ // display previous image + if(activeImage != 0){ + myLightbox.disableKeyboardNav(); + myLightbox.changeImage(activeImage - 1); + } + } else if(key == 'n'){ // display next image + if(activeImage != (imageArray.length - 1)){ + myLightbox.disableKeyboardNav(); + myLightbox.changeImage(activeImage + 1); + } + } + + + }, + + // + // preloadNeighborImages() + // Preload previous and next images. + // + preloadNeighborImages: function(){ + + if((imageArray.length - 1) > activeImage){ + preloadNextImage = new Image(); + preloadNextImage.src = imageArray[activeImage + 1][0]; + } + if(activeImage > 0){ + preloadPrevImage = new Image(); + preloadPrevImage.src = imageArray[activeImage - 1][0]; + } + + }, + + // + // end() + // + end: function() { + this.disableKeyboardNav(); + Element.hide('lightbox'); + new Effect.Fade('overlay', { duration: 0.2}); + showSelectBoxes(); + } +} + +// ----------------------------------------------------------------------------------- + +// +// getPageScroll() +// Returns array with x,y page scroll values. +// Core code from - quirksmode.org +// +function getPageScroll(){ + + var yScroll; + + if (self.pageYOffset) { + yScroll = self.pageYOffset; + } else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict + yScroll = document.documentElement.scrollTop; + } else if (document.body) {// all other Explorers + yScroll = document.body.scrollTop; + } + + arrayPageScroll = new Array('',yScroll) + return arrayPageScroll; +} + +// ----------------------------------------------------------------------------------- + +// +// getPageSize() +// Returns array with page width, height and window width, height +// Core code from - quirksmode.org +// Edit for Firefox by pHaez +// +function getPageSize(){ + + var xScroll, yScroll; + + if (window.innerHeight && window.scrollMaxY) { + xScroll = document.body.scrollWidth; + yScroll = window.innerHeight + window.scrollMaxY; + } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac + xScroll = document.body.scrollWidth; + yScroll = document.body.scrollHeight; + } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari + xScroll = document.body.offsetWidth; + yScroll = document.body.offsetHeight; + } + + var windowWidth, windowHeight; + if (self.innerHeight) { // all except Explorer + windowWidth = self.innerWidth; + windowHeight = self.innerHeight; + } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode + windowWidth = document.documentElement.clientWidth; + windowHeight = document.documentElement.clientHeight; + } else if (document.body) { // other Explorers + windowWidth = document.body.clientWidth; + windowHeight = document.body.clientHeight; + } + + // for small pages with total height less then height of the viewport + if(yScroll < windowHeight){ + pageHeight = windowHeight; + } else { + pageHeight = yScroll; + } + + // for small pages with total width less then width of the viewport + if(xScroll < windowWidth){ + pageWidth = windowWidth; + } else { + pageWidth = xScroll; + } + + + arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) + return arrayPageSize; +} + +// ----------------------------------------------------------------------------------- + +// +// getKey(key) +// Gets keycode. If 'x' is pressed then it hides the lightbox. +// +function getKey(e){ + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + key = String.fromCharCode(keycode).toLowerCase(); + + if(key == 'x'){ + } +} + +// ----------------------------------------------------------------------------------- + +// +// listenKey() +// +function listenKey () { document.onkeypress = getKey; } + +// --------------------------------------------------- + +function showSelectBoxes(){ + selects = document.getElementsByTagName("select"); + for (i = 0; i != selects.length; i++) { + selects[i].style.visibility = "visible"; + } +} + +// --------------------------------------------------- + +function hideSelectBoxes(){ + selects = document.getElementsByTagName("select"); + for (i = 0; i != selects.length; i++) { + selects[i].style.visibility = "hidden"; + } +} + +// --------------------------------------------------- + +// +// pause(numberMillis) +// Pauses code execution for specified time. Uses busy code, not good. +// Code from http://www.faqts.com/knowledge_base/view.phtml/aid/1602 +// +function pause(numberMillis) { + var now = new Date(); + var exitTime = now.getTime() + numberMillis; + while (true) { + now = new Date(); + if (now.getTime() > exitTime) + return; + } +} + +// --------------------------------------------------- + + + +function initLightbox() { myLightbox = new Lightbox(); } Event.observe(window, 'load', initLightbox, false); \ No newline at end of file diff --git a/src/loading.gif b/src/loading.gif new file mode 100644 index 0000000..f864d5f Binary files /dev/null and b/src/loading.gif differ diff --git a/src/mesas-sillas.html b/src/mesas-sillas.html index 2bed516..6c4f347 100644 --- a/src/mesas-sillas.html +++ b/src/mesas-sillas.html @@ -1,65 +1,60 @@ - - - - - - - - Estudio Miguelo en Rivas, Madrid - Mesas y sillas para la cocina - Mobiliario de cocina - - - - - - + + + + + +Estudio Miguelo en Rivas, Madrid - Mesas y sillas para la cocina - Mobiliario de cocina + + + + + -
- -
-

MESAS Y SILLAS.
 

-

 

- -

 

- -

 

- -

 

- -

 

- -

 

-

 

- -

 

-

 

- -

 

-

 

- -

 

-
-
+ +
+
+

MESAS Y SILLAS.
+  

+

 

+ + +

 

+ +

 

+ +

 

+ +

 

+
+
diff --git a/src/mesas/Mesa10.jpg b/src/mesas/Mesa10.jpg new file mode 100644 index 0000000..bf35576 Binary files /dev/null and b/src/mesas/Mesa10.jpg differ diff --git a/src/mesas/Mesa10p.jpg b/src/mesas/Mesa10p.jpg new file mode 100644 index 0000000..db9d254 Binary files /dev/null and b/src/mesas/Mesa10p.jpg differ diff --git a/src/mesas/Mesa11.jpg b/src/mesas/Mesa11.jpg new file mode 100644 index 0000000..763a8c6 Binary files /dev/null and b/src/mesas/Mesa11.jpg differ diff --git a/src/mesas/Mesa11p.jpg b/src/mesas/Mesa11p.jpg new file mode 100644 index 0000000..261b87b Binary files /dev/null and b/src/mesas/Mesa11p.jpg differ diff --git a/src/mesas/Mesa8.jpg b/src/mesas/Mesa8.jpg new file mode 100644 index 0000000..11b9a8c Binary files /dev/null and b/src/mesas/Mesa8.jpg differ diff --git a/src/mesas/Mesa8p.jpg b/src/mesas/Mesa8p.jpg new file mode 100644 index 0000000..58a158f Binary files /dev/null and b/src/mesas/Mesa8p.jpg differ diff --git a/src/mesas/Mesa9.jpg b/src/mesas/Mesa9.jpg new file mode 100644 index 0000000..3ba455d Binary files /dev/null and b/src/mesas/Mesa9.jpg differ diff --git a/src/mesas/Mesa9p.jpg b/src/mesas/Mesa9p.jpg new file mode 100644 index 0000000..cd4c6af Binary files /dev/null and b/src/mesas/Mesa9p.jpg differ diff --git a/src/mobiliario-banos.html b/src/mobiliario-banos.html new file mode 100644 index 0000000..14ae2a3 --- /dev/null +++ b/src/mobiliario-banos.html @@ -0,0 +1,95 @@ + + + + + + + + +Mobiliario de baño y sanitarios - Estudio Miguelo en Rivas, Madrid + + + + + + + +
+ +
+
+

MOBILIARIO DE BAÑO

+

 

+ +

 

+ +

 

+

Encimera Blanco Zeus y Magenta

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+

Encimera y revestimiento Gris Expo

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+

Encimera cristal rosa

+ +

 

+

DETALLES Y COMPLEMENTOS

+

 

+ + +

 

+ +

 

+ +

 

+

Revestimiento Naranja Cool

+ +

 

+
+
+
+ + + + diff --git a/src/productos.html b/src/productos.html index 337a98a..1bf97bf 100644 --- a/src/productos.html +++ b/src/productos.html @@ -1,81 +1,72 @@ - - - - - - - Estudio Miguelo - diseño y decoración en Rivas, Madrid - + + + + + +Estudio Miguelo - diseño y decoración en Rivas, Madrid + -
- - -
-

 

-

- - - - - - - -

-
+ +
+

 

+

+ + + + + + + +

+
- - - - - -
- -
-

PROMOCIÓN ARMARIOS VÁLIDA OCTUBRE Y NOVIEMBRE

-

-
- * Descuento corresponde a frentes rechapados o lacados, resto de materiales consultar

-

- - -

-
-
- - + + + + + + + + + + Estudio Miguelo en Rivas, Madrid - Promociones de armarios, vestidores, frentes e interiores de armario + + + + + + + + +
+ +
+

PROMOCIÓN ARMARIOS VÁLIDA OCTUBRE Y NOVIEMBRE

+

+
+ * Descuento corresponde a frentes rechapados o lacados, resto de materiales consultar

+

+ + +

+
+
+ + diff --git a/src/promociones-cocinas-emv.html b/src/promociones-cocinas-emv.html index db05062..055e9a1 100644 --- a/src/promociones-cocinas-emv.html +++ b/src/promociones-cocinas-emv.html @@ -1,59 +1,59 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - - -
- -
-

PROMOCIÓN COCINAS E.M.V: ENCIMERA ESTRATIFICADA DE REGALO*

-

C/ DALIA, C/ SIGRID (RIVAS)....

-

C/ EMBALSE DE VALMAYOR, C/ PEÑARANDA DE BRACAMONTE (ENSANCHE DE VALLECAS)....

- -
  • Mobiliario de cocina estratificado, COLOR A ELEGIR
  • -
  • Transporte e instalación incluido
  • -
  • TU COCINA POR 1.999€

  • -
- -
-

-(*) Encimera estratificada, color a elegir, hasta 3,60 mtrs. -
-

- -
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

PROMOCIÓN COCINAS E.M.V: ENCIMERA ESTRATIFICADA DE REGALO*

+

C/ DALIA, C/ SIGRID (RIVAS)....

+

C/ EMBALSE DE VALMAYOR, C/ PEÑARANDA DE BRACAMONTE (ENSANCHE DE VALLECAS)....

+ +
  • Mobiliario de cocina estratificado, COLOR A ELEGIR
  • +
  • Transporte e instalación incluido
  • +
  • TU COCINA POR 1.999€

  • +
+ +
+

+(*) Encimera estratificada, color a elegir, hasta 3,60 mtrs. +
+

+ +
+
+ + + + diff --git a/src/promociones-cocinas-italianas.html b/src/promociones-cocinas-italianas.html index 1a4c1cf..67160e3 100644 --- a/src/promociones-cocinas-italianas.html +++ b/src/promociones-cocinas-italianas.html @@ -1,53 +1,53 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - - -
- -
-

PROMOCIÓN - COCINAS

-
  • Descuentos en Mobiliario Italiano.
  • -
  • Aprovéchate de nuestra calidad a un precio como nunca habías visto.
  • -
  • Acoplamos a tu espacio, la comodidad que necesitas para tu día a día.
  • -
-

-

-

"UNA COCINA PARA MEJORAR TU CALIDAD DE VIDA"

-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

PROMOCIÓN - COCINAS

+
  • Descuentos en Mobiliario Italiano.
  • +
  • Aprovéchate de nuestra calidad a un precio como nunca habías visto.
  • +
  • Acoplamos a tu espacio, la comodidad que necesitas para tu día a día.
  • +
+

+

+

"UNA COCINA PARA MEJORAR TU CALIDAD DE VIDA"

+
+
+
+ + + + diff --git a/src/promociones-cocinas-nacionales.html b/src/promociones-cocinas-nacionales.html index 1525209..2c70fef 100644 --- a/src/promociones-cocinas-nacionales.html +++ b/src/promociones-cocinas-nacionales.html @@ -1,52 +1,52 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - - -
- -
-

PROMOCIÓN - COCINAS NACIONALES

-
  • Aprovéchate de nuestra calidad a un precio como nunca habías visto.
  • -
  • Acoplamos a tu espacio, la comodidad que necesitas para tu día a día.
  • -
-

-

-

"UNA COCINA PARA MEJORAR TU CALIDAD DE VIDA"

-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

PROMOCIÓN - COCINAS NACIONALES

+
  • Aprovéchate de nuestra calidad a un precio como nunca habías visto.
  • +
  • Acoplamos a tu espacio, la comodidad que necesitas para tu día a día.
  • +
+

+

+

"UNA COCINA PARA MEJORAR TU CALIDAD DE VIDA"

+
+
+
+ + + + diff --git a/src/promociones-cocinas.html b/src/promociones-cocinas.html index c294222..d1a00fb 100644 --- a/src/promociones-cocinas.html +++ b/src/promociones-cocinas.html @@ -1,50 +1,50 @@ - - - - - - - - - - Estudio Miguelo en Rivas, Madrid - Promociones en mobiliario de cocina y accesorios - - - - - - - - -
- -
-

PROMOCIÓN ENERO 2008 - COCINAS

-
  • Descuentos en Mobiliario Nacional e Italiano.
  • -
  • Aprovéchate de nuestra calidad a un precio como nunca habías visto.
  • -
  • Acoplamos a tu espacio, la comodidad que necesitas para tu día a día.
  • -
-

-

-

"UNA COCINA PARA MEJORAR TU CALIDAD DE VIDA"

-
-
-
- - - - + + + + + + + + + + Estudio Miguelo en Rivas, Madrid - Promociones en mobiliario de cocina y accesorios + + + + + + + + +
+ +
+

PROMOCIÓN ENERO 2008 - COCINAS

+
  • Descuentos en Mobiliario Nacional e Italiano.
  • +
  • Aprovéchate de nuestra calidad a un precio como nunca habías visto.
  • +
  • Acoplamos a tu espacio, la comodidad que necesitas para tu día a día.
  • +
+

+

+

"UNA COCINA PARA MEJORAR TU CALIDAD DE VIDA"

+
+
+
+ + + + diff --git a/src/promociones-electrodomesticos.html b/src/promociones-electrodomesticos.html index f0691a4..4fe1c00 100644 --- a/src/promociones-electrodomesticos.html +++ b/src/promociones-electrodomesticos.html @@ -1,50 +1,111 @@ + + + + + + Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
-

OCTUBRE, MES DEL ELECTRODOMÉSTICO

-
  • LAS FACILIDADES DE LAS NUEVAS TECNOLOGÍAS A MEJOR PRECIO.
  • -

-
- * Oferta válida para modelos concretos

-

+ +

OFERTAS EN ELECTRODOMÉSTICOS

+ + + + + + + + + + +
+ + Horno Ariston Modelo FB 89 GP.1IX/HA
+ Pirolítico - Clase A - 8 Multifunciones
+ Precio: 478 € OFERTA: 334 € +
+ + Inducción 3 fuegos Ariston Modelo KIC 631 T B/HA
+ Triple zona Booster - Cristal biselado
+ Precio: 548 € OFERTA: 392 € +
+
+
+ + + + + diff --git a/src/promociones-jardin.html b/src/promociones-jardin.html index e0b62fe..207cd13 100644 --- a/src/promociones-jardin.html +++ b/src/promociones-jardin.html @@ -1,52 +1,52 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - - -
- -
-

PROMOCIÓN - JARDÍN

-
  • Materiales en fibra de vidrio completamente resistentes al frío, al calor, a la humedad. Despreocúpate de tu mueble de jardín y disfruta de tu tiempo libre.
  • -
  • Visita nuestra exposición, tenemos lo que te gusta.
- -

-

-

"TENEMOS UN 40 % DE DESCUENTO EN LAS LIQUIDACIONES DE EXPOSICIÓN"

-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

PROMOCIÓN - JARDÍN

+
  • Materiales en fibra de vidrio completamente resistentes al frío, al calor, a la humedad. Despreocúpate de tu mueble de jardín y disfruta de tu tiempo libre.
  • +
  • Visita nuestra exposición, tenemos lo que te gusta.
+ +

+

+

"TENEMOS UN 40 % DE DESCUENTO EN LAS LIQUIDACIONES DE EXPOSICIÓN"

+
+
+
+ + + + diff --git a/src/promociones-mesas-sillas.html b/src/promociones-mesas-sillas.html index deba30d..09ed357 100644 --- a/src/promociones-mesas-sillas.html +++ b/src/promociones-mesas-sillas.html @@ -1,142 +1,142 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - - -
- -
-

PROMOCIÓN - SILLAS Y MESAS

 

- - -

Mesa Máxima

-
  • Mesa Máxima. Encimera De Melamina (Naranja, Haya, Cerezo y Blanco).
  • -
  • Extensiones de Melamina del color de la encimera.
  • -
-

-

- - - - - - - - - - - - - - - - - - - - - - -
Mesa Maggie (100 x 60)   + 2 Sillas

   = 278 €

   + 2 Sillas y 2 Taburetes

   = 351 €

   + 4 Sillas

   = 386 €

(Otras medidas consultar precio)
-

- - -

Mesa Máxima Cristal

-
  • Mesa Máxima Cristal. Encimera De Cristal (Blanco, Gris, Verde, Naranja, Rojo).
  • -
  • Extensiones de Melamina, Color Plata.
  • -
-

-

- - - - - - - - - - - - - - - - - - - - - - -
Mesa cristal (100 x 50)   + 2 Sillas

   = 523 €

   + 2 Sillas y 2 Taburetes

   = 605 €

   + 4 Sillas

   = 663 €

(Otras medidas consultar precio)
-

- - -

Mesa Máxima cristal

-
  • Estructura Plata Mate.
  • -
  • Cristal Brillo (Gris, Blanco, Pistacho, Rojo y Naranja).
  • -
-

-

- - - - - - - - - - - - - - - - - - - - - - -
Mesa Cristal (100 x 60)   + 2 Sillas

   = 504 €

   + 2 Sillas y 2 Taburetes

   = 614 €

   + 4 Sillas

   = 684 €

(Otras medidas consultar precio)
-

- -
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

PROMOCIÓN - SILLAS Y MESAS

 

+ + +

Mesa Máxima

+
  • Mesa Máxima. Encimera De Melamina (Naranja, Haya, Cerezo y Blanco).
  • +
  • Extensiones de Melamina del color de la encimera.
  • +
+

+

+ + + + + + + + + + + + + + + + + + + + + + +
Mesa Maggie (100 x 60)   + 2 Sillas

   = 278 €

   + 2 Sillas y 2 Taburetes

   = 351 €

   + 4 Sillas

   = 386 €

(Otras medidas consultar precio)
+

+ + +

Mesa Máxima Cristal

+
  • Mesa Máxima Cristal. Encimera De Cristal (Blanco, Gris, Verde, Naranja, Rojo).
  • +
  • Extensiones de Melamina, Color Plata.
  • +
+

+

+ + + + + + + + + + + + + + + + + + + + + + +
Mesa cristal (100 x 50)   + 2 Sillas

   = 523 €

   + 2 Sillas y 2 Taburetes

   = 605 €

   + 4 Sillas

   = 663 €

(Otras medidas consultar precio)
+

+ + +

Mesa Máxima cristal

+
  • Estructura Plata Mate.
  • +
  • Cristal Brillo (Gris, Blanco, Pistacho, Rojo y Naranja).
  • +
+

+

+ + + + + + + + + + + + + + + + + + + + + + +
Mesa Cristal (100 x 60)   + 2 Sillas

   = 504 €

   + 2 Sillas y 2 Taburetes

   = 614 €

   + 4 Sillas

   = 684 €

(Otras medidas consultar precio)
+

+ +
+
+ + + + diff --git a/src/promociones-sillas.html b/src/promociones-sillas.html new file mode 100644 index 0000000..abf9035 --- /dev/null +++ b/src/promociones-sillas.html @@ -0,0 +1,142 @@ + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

PROMOCIÓN - SILLAS Y MESAS

 

+ + +

Mesa Máxima

+
  • Mesa Máxima. Encimera De Melamina (Naranja, Haya, Cerezo y Blanco).
  • +
  • Extensiones de Melamina del color de la encimera.
  • +
+

+

+ + + + + + + + + + + + + + + + + + + + + + +
Mesa Maggie (100 x 60)   + 2 Sillas

   = 278 €

   + 2 Sillas y 2 Taburetes

   = 351 €

   + 4 Sillas

   = 386 €

(Otras medidas consultar precio)
+

+ + +

Mesa Máxima Cristal

+
  • Mesa Máxima Cristal. Encimera De Cristal (Blanco, Gris, Verde, Naranja, Rojo).
  • +
  • Extensiones de Melamina, Color Plata.
  • +
+

+

+ + + + + + + + + + + + + + + + + + + + + + +
Mesa cristal (100 x 50)   + 2 Sillas

   = 523 €

   + 2 Sillas y 2 Taburetes

   = 605 €

   + 4 Sillas

   = 663 €

(Otras medidas consultar precio)
+

+ + +

Mesa Máxima cristal

+
  • Estructura Plata Mate.
  • +
  • Cristal Brillo (Gris, Blanco, Pistacho, Rojo y Naranja).
  • +
+

+

+ + + + + + + + + + + + + + + + + + + + + + +
Mesa Cristal (100 x 60)   + 2 Sillas

   = 504 €

   + 2 Sillas y 2 Taburetes

   = 614 €

   + 4 Sillas

   = 684 €

(Otras medidas consultar precio)
+

+ +
+
+ + + + diff --git a/src/promociones-techos.html b/src/promociones-techos.html index 3f449d4..1ebe020 100644 --- a/src/promociones-techos.html +++ b/src/promociones-techos.html @@ -1,49 +1,49 @@ - - - - - - - - - - Estudio Miguelo en Rivas, Madrid - Promociones en techos de aluminio para cocinas, baños y locales - - - - - - - - -
- -
-

PROMOCIÓN - TECHOS ALUMINIO

-
  • Descuentos en techos de aluminio.
  • -
  • Con la compra de su cocina llévese nuestro exclusivo techo de aluminio de regalo*
  • -
  • Iluminación no incluída.
  • -

-

-

* Se regala el material pero se cobrará la instalación

-
-
-
- - - - + + + + + + + + + + Estudio Miguelo en Rivas, Madrid - Promociones en techos de aluminio para cocinas, baños y locales + + + + + + + + +
+ +
+

PROMOCIÓN - TECHOS ALUMINIO

+
  • Descuentos en techos de aluminio.
  • +
  • Con la compra de su cocina llévese nuestro exclusivo techo de aluminio de regalo*
  • +
  • Iluminación no incluída.
  • +

+

+

* Se regala el material pero se cobrará la instalación

+
+
+
+ + + + diff --git a/src/promociones.html b/src/promociones.html index 9894bf9..372d4a7 100644 --- a/src/promociones.html +++ b/src/promociones.html @@ -65,16 +65,9 @@ return

 

 

- - - - - -

diff --git a/src/prototype.js b/src/prototype.js index 8256e92..8da0d16 100644 --- a/src/prototype.js +++ b/src/prototype.js @@ -1,1785 +1,1785 @@ -/* Prototype JavaScript framework, version 1.4.0 - * (c) 2005 Sam Stephenson - * - * THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff - * against the source tree, available from the Prototype darcs repository. - * - * Prototype is freely distributable under the terms of an MIT-style license. - * - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.4.0', - ScriptFragment: '(?:)((\n|\r|.)*?)(?:<\/script>)', - - emptyFunction: function() {}, - K: function(x) {return x} -} - -var Class = { - create: function() { - return function() { - this.initialize.apply(this, arguments); - } - } -} - -var Abstract = new Object(); - -Object.extend = function(destination, source) { - for (property in source) { - destination[property] = source[property]; - } - return destination; -} - -Object.inspect = function(object) { - try { - if (object == undefined) return 'undefined'; - if (object == null) return 'null'; - return object.inspect ? object.inspect() : object.toString(); - } catch (e) { - if (e instanceof RangeError) return '...'; - throw e; - } -} - -Function.prototype.bind = function() { - var __method = this, args = $A(arguments), object = args.shift(); - return function() { - return __method.apply(object, args.concat($A(arguments))); - } -} - -Function.prototype.bindAsEventListener = function(object) { - var __method = this; - return function(event) { - return __method.call(object, event || window.event); - } -} - -Object.extend(Number.prototype, { - toColorPart: function() { - var digits = this.toString(16); - if (this < 16) return '0' + digits; - return digits; - }, - - succ: function() { - return this + 1; - }, - - times: function(iterator) { - $R(0, this, true).each(iterator); - return this; - } -}); - -var Try = { - these: function() { - var returnValue; - - for (var i = 0; i < arguments.length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) {} - } - - return returnValue; - } -} - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create(); -PeriodicalExecuter.prototype = { - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.callback(); - } finally { - this.currentlyExecuting = false; - } - } - } -} - -/*--------------------------------------------------------------------------*/ - -function $() { - var elements = new Array(); - - for (var i = 0; i < arguments.length; i++) { - var element = arguments[i]; - if (typeof element == 'string') - element = document.getElementById(element); - - if (arguments.length == 1) - return element; - - elements.push(element); - } - - return elements; -} -Object.extend(String.prototype, { - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - stripScripts: function() { - return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); - }, - - extractScripts: function() { - var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); - var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); - return (this.match(matchAll) || []).map(function(scriptTag) { - return (scriptTag.match(matchOne) || ['', ''])[1]; - }); - }, - - evalScripts: function() { - return this.extractScripts().map(eval); - }, - - escapeHTML: function() { - var div = document.createElement('div'); - var text = document.createTextNode(this); - div.appendChild(text); - return div.innerHTML; - }, - - unescapeHTML: function() { - var div = document.createElement('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0] ? div.childNodes[0].nodeValue : ''; - }, - - toQueryParams: function() { - var pairs = this.match(/^\??(.*)$/)[1].split('&'); - return pairs.inject({}, function(params, pairString) { - var pair = pairString.split('='); - params[pair[0]] = pair[1]; - return params; - }); - }, - - toArray: function() { - return this.split(''); - }, - - camelize: function() { - var oStringList = this.split('-'); - if (oStringList.length == 1) return oStringList[0]; - - var camelizedString = this.indexOf('-') == 0 - ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1) - : oStringList[0]; - - for (var i = 1, len = oStringList.length; i < len; i++) { - var s = oStringList[i]; - camelizedString += s.charAt(0).toUpperCase() + s.substring(1); - } - - return camelizedString; - }, - - inspect: function() { - return "'" + this.replace('\\', '\\\\').replace("'", '\\\'') + "'"; - } -}); - -String.prototype.parseQuery = String.prototype.toQueryParams; - -var $break = new Object(); -var $continue = new Object(); - -var Enumerable = { - each: function(iterator) { - var index = 0; - try { - this._each(function(value) { - try { - iterator(value, index++); - } catch (e) { - if (e != $continue) throw e; - } - }); - } catch (e) { - if (e != $break) throw e; - } - }, - - all: function(iterator) { - var result = true; - this.each(function(value, index) { - result = result && !!(iterator || Prototype.K)(value, index); - if (!result) throw $break; - }); - return result; - }, - - any: function(iterator) { - var result = true; - this.each(function(value, index) { - if (result = !!(iterator || Prototype.K)(value, index)) - throw $break; - }); - return result; - }, - - collect: function(iterator) { - var results = []; - this.each(function(value, index) { - results.push(iterator(value, index)); - }); - return results; - }, - - detect: function (iterator) { - var result; - this.each(function(value, index) { - if (iterator(value, index)) { - result = value; - throw $break; - } - }); - return result; - }, - - findAll: function(iterator) { - var results = []; - this.each(function(value, index) { - if (iterator(value, index)) - results.push(value); - }); - return results; - }, - - grep: function(pattern, iterator) { - var results = []; - this.each(function(value, index) { - var stringValue = value.toString(); - if (stringValue.match(pattern)) - results.push((iterator || Prototype.K)(value, index)); - }) - return results; - }, - - include: function(object) { - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw $break; - } - }); - return found; - }, - - inject: function(memo, iterator) { - this.each(function(value, index) { - memo = iterator(memo, value, index); - }); - return memo; - }, - - invoke: function(method) { - var args = $A(arguments).slice(1); - return this.collect(function(value) { - return value[method].apply(value, args); - }); - }, - - max: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value >= (result || value)) - result = value; - }); - return result; - }, - - min: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value <= (result || value)) - result = value; - }); - return result; - }, - - partition: function(iterator) { - var trues = [], falses = []; - this.each(function(value, index) { - ((iterator || Prototype.K)(value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - }, - - pluck: function(property) { - var results = []; - this.each(function(value, index) { - results.push(value[property]); - }); - return results; - }, - - reject: function(iterator) { - var results = []; - this.each(function(value, index) { - if (!iterator(value, index)) - results.push(value); - }); - return results; - }, - - sortBy: function(iterator) { - return this.collect(function(value, index) { - return {value: value, criteria: iterator(value, index)}; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - }, - - toArray: function() { - return this.collect(Prototype.K); - }, - - zip: function() { - var iterator = Prototype.K, args = $A(arguments); - if (typeof args.last() == 'function') - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - iterator(value = collections.pluck(index)); - return value; - }); - }, - - inspect: function() { - return '#'; - } -} - -Object.extend(Enumerable, { - map: Enumerable.collect, - find: Enumerable.detect, - select: Enumerable.findAll, - member: Enumerable.include, - entries: Enumerable.toArray -}); -var $A = Array.from = function(iterable) { - if (!iterable) return []; - if (iterable.toArray) { - return iterable.toArray(); - } else { - var results = []; - for (var i = 0; i < iterable.length; i++) - results.push(iterable[i]); - return results; - } -} - -Object.extend(Array.prototype, Enumerable); - -Array.prototype._reverse = Array.prototype.reverse; - -Object.extend(Array.prototype, { - _each: function(iterator) { - for (var i = 0; i < this.length; i++) - iterator(this[i]); - }, - - clear: function() { - this.length = 0; - return this; - }, - - first: function() { - return this[0]; - }, - - last: function() { - return this[this.length - 1]; - }, - - compact: function() { - return this.select(function(value) { - return value != undefined || value != null; - }); - }, - - flatten: function() { - return this.inject([], function(array, value) { - return array.concat(value.constructor == Array ? - value.flatten() : [value]); - }); - }, - - without: function() { - var values = $A(arguments); - return this.select(function(value) { - return !values.include(value); - }); - }, - - indexOf: function(object) { - for (var i = 0; i < this.length; i++) - if (this[i] == object) return i; - return -1; - }, - - reverse: function(inline) { - return (inline !== false ? this : this.toArray())._reverse(); - }, - - shift: function() { - var result = this[0]; - for (var i = 0; i < this.length - 1; i++) - this[i] = this[i + 1]; - this.length--; - return result; - }, - - inspect: function() { - return '[' + this.map(Object.inspect).join(', ') + ']'; - } -}); -var Hash = { - _each: function(iterator) { - for (key in this) { - var value = this[key]; - if (typeof value == 'function') continue; - - var pair = [key, value]; - pair.key = key; - pair.value = value; - iterator(pair); - } - }, - - keys: function() { - return this.pluck('key'); - }, - - values: function() { - return this.pluck('value'); - }, - - merge: function(hash) { - return $H(hash).inject($H(this), function(mergedHash, pair) { - mergedHash[pair.key] = pair.value; - return mergedHash; - }); - }, - - toQueryString: function() { - return this.map(function(pair) { - return pair.map(encodeURIComponent).join('='); - }).join('&'); - }, - - inspect: function() { - return '#'; - } -} - -function $H(object) { - var hash = Object.extend({}, object || {}); - Object.extend(hash, Enumerable); - Object.extend(hash, Hash); - return hash; -} -ObjectRange = Class.create(); -Object.extend(ObjectRange.prototype, Enumerable); -Object.extend(ObjectRange.prototype, { - initialize: function(start, end, exclusive) { - this.start = start; - this.end = end; - this.exclusive = exclusive; - }, - - _each: function(iterator) { - var value = this.start; - do { - iterator(value); - value = value.succ(); - } while (this.include(value)); - }, - - include: function(value) { - if (value < this.start) - return false; - if (this.exclusive) - return value < this.end; - return value <= this.end; - } -}); - -var $R = function(start, end, exclusive) { - return new ObjectRange(start, end, exclusive); -} - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')}, - function() {return new XMLHttpRequest()} - ) || false; - }, - - activeRequestCount: 0 -} - -Ajax.Responders = { - responders: [], - - _each: function(iterator) { - this.responders._each(iterator); - }, - - register: function(responderToAdd) { - if (!this.include(responderToAdd)) - this.responders.push(responderToAdd); - }, - - unregister: function(responderToRemove) { - this.responders = this.responders.without(responderToRemove); - }, - - dispatch: function(callback, request, transport, json) { - this.each(function(responder) { - if (responder[callback] && typeof responder[callback] == 'function') { - try { - responder[callback].apply(responder, [request, transport, json]); - } catch (e) {} - } - }); - } -}; - -Object.extend(Ajax.Responders, Enumerable); - -Ajax.Responders.register({ - onCreate: function() { - Ajax.activeRequestCount++; - }, - - onComplete: function() { - Ajax.activeRequestCount--; - } -}); - -Ajax.Base = function() {}; -Ajax.Base.prototype = { - setOptions: function(options) { - this.options = { - method: 'post', - asynchronous: true, - parameters: '' - } - Object.extend(this.options, options || {}); - }, - - responseIsSuccess: function() { - return this.transport.status == undefined - || this.transport.status == 0 - || (this.transport.status >= 200 && this.transport.status < 300); - }, - - responseIsFailure: function() { - return !this.responseIsSuccess(); - } -} - -Ajax.Request = Class.create(); -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Request.prototype = Object.extend(new Ajax.Base(), { - initialize: function(url, options) { - this.transport = Ajax.getTransport(); - this.setOptions(options); - this.request(url); - }, - - request: function(url) { - var parameters = this.options.parameters || ''; - if (parameters.length > 0) parameters += '&_='; - - try { - this.url = url; - if (this.options.method == 'get' && parameters.length > 0) - this.url += (this.url.match(/\?/) ? '&' : '?') + parameters; - - Ajax.Responders.dispatch('onCreate', this, this.transport); - - this.transport.open(this.options.method, this.url, - this.options.asynchronous); - - if (this.options.asynchronous) { - this.transport.onreadystatechange = this.onStateChange.bind(this); - setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); - } - - this.setRequestHeaders(); - - var body = this.options.postBody ? this.options.postBody : parameters; - this.transport.send(this.options.method == 'post' ? body : null); - - } catch (e) { - this.dispatchException(e); - } - }, - - setRequestHeaders: function() { - var requestHeaders = - ['X-Requested-With', 'XMLHttpRequest', - 'X-Prototype-Version', Prototype.Version]; - - if (this.options.method == 'post') { - requestHeaders.push('Content-type', - 'application/x-www-form-urlencoded'); - - /* Force "Connection: close" for Mozilla browsers to work around - * a bug where XMLHttpReqeuest sends an incorrect Content-length - * header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType) - requestHeaders.push('Connection', 'close'); - } - - if (this.options.requestHeaders) - requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); - - for (var i = 0; i < requestHeaders.length; i += 2) - this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState != 1) - this.respondToReadyState(this.transport.readyState); - }, - - header: function(name) { - try { - return this.transport.getResponseHeader(name); - } catch (e) {} - }, - - evalJSON: function() { - try { - return eval(this.header('X-JSON')); - } catch (e) {} - }, - - evalResponse: function() { - try { - return eval(this.transport.responseText); - } catch (e) { - this.dispatchException(e); - } - }, - - respondToReadyState: function(readyState) { - var event = Ajax.Request.Events[readyState]; - var transport = this.transport, json = this.evalJSON(); - - if (event == 'Complete') { - try { - (this.options['on' + this.transport.status] - || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(transport, json); - } catch (e) { - this.dispatchException(e); - } - - if ((this.header('Content-type') || '').match(/^text\/javascript/i)) - this.evalResponse(); - } - - try { - (this.options['on' + event] || Prototype.emptyFunction)(transport, json); - Ajax.Responders.dispatch('on' + event, this, transport, json); - } catch (e) { - this.dispatchException(e); - } - - /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ - if (event == 'Complete') - this.transport.onreadystatechange = Prototype.emptyFunction; - }, - - dispatchException: function(exception) { - (this.options.onException || Prototype.emptyFunction)(this, exception); - Ajax.Responders.dispatch('onException', this, exception); - } -}); - -Ajax.Updater = Class.create(); - -Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { - initialize: function(container, url, options) { - this.containers = { - success: container.success ? $(container.success) : $(container), - failure: container.failure ? $(container.failure) : - (container.success ? null : $(container)) - } - - this.transport = Ajax.getTransport(); - this.setOptions(options); - - var onComplete = this.options.onComplete || Prototype.emptyFunction; - this.options.onComplete = (function(transport, object) { - this.updateContent(); - onComplete(transport, object); - }).bind(this); - - this.request(url); - }, - - updateContent: function() { - var receiver = this.responseIsSuccess() ? - this.containers.success : this.containers.failure; - var response = this.transport.responseText; - - if (!this.options.evalScripts) - response = response.stripScripts(); - - if (receiver) { - if (this.options.insertion) { - new this.options.insertion(receiver, response); - } else { - Element.update(receiver, response); - } - } - - if (this.responseIsSuccess()) { - if (this.onComplete) - setTimeout(this.onComplete.bind(this), 10); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(); -Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { - initialize: function(container, url, options) { - this.setOptions(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = (this.options.decay || 1); - - this.updater = {}; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Prototype.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(request) { - if (this.options.decay) { - this.decay = (request.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = request.responseText; - } - this.timer = setTimeout(this.onTimerEvent.bind(this), - this.decay * this.frequency * 1000); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); -document.getElementsByClassName = function(className, parentElement) { - var children = ($(parentElement) || document.body).getElementsByTagName('*'); - return $A(children).inject([], function(elements, child) { - if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) - elements.push(child); - return elements; - }); -} - -/*--------------------------------------------------------------------------*/ - -if (!window.Element) { - var Element = new Object(); -} - -Object.extend(Element, { - visible: function(element) { - return $(element).style.display != 'none'; - }, - - toggle: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - Element[Element.visible(element) ? 'hide' : 'show'](element); - } - }, - - hide: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = 'none'; - } - }, - - show: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = ''; - } - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - }, - - update: function(element, html) { - $(element).innerHTML = html.stripScripts(); - setTimeout(function() {html.evalScripts()}, 10); - }, - - getHeight: function(element) { - element = $(element); - return element.offsetHeight; - }, - - classNames: function(element) { - return new Element.ClassNames(element); - }, - - hasClassName: function(element, className) { - if (!(element = $(element))) return; - return Element.classNames(element).include(className); - }, - - addClassName: function(element, className) { - if (!(element = $(element))) return; - return Element.classNames(element).add(className); - }, - - removeClassName: function(element, className) { - if (!(element = $(element))) return; - return Element.classNames(element).remove(className); - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - element = $(element); - for (var i = 0; i < element.childNodes.length; i++) { - var node = element.childNodes[i]; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - Element.remove(node); - } - }, - - empty: function(element) { - return $(element).innerHTML.match(/^\s*$/); - }, - - scrollTo: function(element) { - element = $(element); - var x = element.x ? element.x : element.offsetLeft, - y = element.y ? element.y : element.offsetTop; - window.scrollTo(x, y); - }, - - getStyle: function(element, style) { - element = $(element); - var value = element.style[style.camelize()]; - if (!value) { - if (document.defaultView && document.defaultView.getComputedStyle) { - var css = document.defaultView.getComputedStyle(element, null); - value = css ? css.getPropertyValue(style) : null; - } else if (element.currentStyle) { - value = element.currentStyle[style.camelize()]; - } - } - - if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) - if (Element.getStyle(element, 'position') == 'static') value = 'auto'; - - return value == 'auto' ? null : value; - }, - - setStyle: function(element, style) { - element = $(element); - for (name in style) - element.style[name.camelize()] = style[name]; - }, - - getDimensions: function(element) { - element = $(element); - if (Element.getStyle(element, 'display') != 'none') - return {width: element.offsetWidth, height: element.offsetHeight}; - - // All *Width and *Height properties give 0 on elements with display none, - // so enable the element temporarily - var els = element.style; - var originalVisibility = els.visibility; - var originalPosition = els.position; - els.visibility = 'hidden'; - els.position = 'absolute'; - els.display = ''; - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - els.display = 'none'; - els.position = originalPosition; - els.visibility = originalVisibility; - return {width: originalWidth, height: originalHeight}; - }, - - makePositioned: function(element) { - element = $(element); - var pos = Element.getStyle(element, 'position'); - if (pos == 'static' || !pos) { - element._madePositioned = true; - element.style.position = 'relative'; - // Opera returns the offset relative to the positioning context, when an - // element is position relative but top and left have not been defined - if (window.opera) { - element.style.top = 0; - element.style.left = 0; - } - } - }, - - undoPositioned: function(element) { - element = $(element); - if (element._madePositioned) { - element._madePositioned = undefined; - element.style.position = - element.style.top = - element.style.left = - element.style.bottom = - element.style.right = ''; - } - }, - - makeClipping: function(element) { - element = $(element); - if (element._overflow) return; - element._overflow = element.style.overflow; - if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') - element.style.overflow = 'hidden'; - }, - - undoClipping: function(element) { - element = $(element); - if (element._overflow) return; - element.style.overflow = element._overflow; - element._overflow = undefined; - } -}); - -var Toggle = new Object(); -Toggle.display = Element.toggle; - -/*--------------------------------------------------------------------------*/ - -Abstract.Insertion = function(adjacency) { - this.adjacency = adjacency; -} - -Abstract.Insertion.prototype = { - initialize: function(element, content) { - this.element = $(element); - this.content = content.stripScripts(); - - if (this.adjacency && this.element.insertAdjacentHTML) { - try { - this.element.insertAdjacentHTML(this.adjacency, this.content); - } catch (e) { - if (this.element.tagName.toLowerCase() == 'tbody') { - this.insertContent(this.contentFromAnonymousTable()); - } else { - throw e; - } - } - } else { - this.range = this.element.ownerDocument.createRange(); - if (this.initializeRange) this.initializeRange(); - this.insertContent([this.range.createContextualFragment(this.content)]); - } - - setTimeout(function() {content.evalScripts()}, 10); - }, - - contentFromAnonymousTable: function() { - var div = document.createElement('div'); - div.innerHTML = '' + this.content + '
'; - return $A(div.childNodes[0].childNodes[0].childNodes); - } -} - -var Insertion = new Object(); - -Insertion.Before = Class.create(); -Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { - initializeRange: function() { - this.range.setStartBefore(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.parentNode.insertBefore(fragment, this.element); - }).bind(this)); - } -}); - -Insertion.Top = Class.create(); -Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(true); - }, - - insertContent: function(fragments) { - fragments.reverse(false).each((function(fragment) { - this.element.insertBefore(fragment, this.element.firstChild); - }).bind(this)); - } -}); - -Insertion.Bottom = Class.create(); -Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.appendChild(fragment); - }).bind(this)); - } -}); - -Insertion.After = Class.create(); -Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { - initializeRange: function() { - this.range.setStartAfter(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.parentNode.insertBefore(fragment, - this.element.nextSibling); - }).bind(this)); - } -}); - -/*--------------------------------------------------------------------------*/ - -Element.ClassNames = Class.create(); -Element.ClassNames.prototype = { - initialize: function(element) { - this.element = $(element); - }, - - _each: function(iterator) { - this.element.className.split(/\s+/).select(function(name) { - return name.length > 0; - })._each(iterator); - }, - - set: function(className) { - this.element.className = className; - }, - - add: function(classNameToAdd) { - if (this.include(classNameToAdd)) return; - this.set(this.toArray().concat(classNameToAdd).join(' ')); - }, - - remove: function(classNameToRemove) { - if (!this.include(classNameToRemove)) return; - this.set(this.select(function(className) { - return className != classNameToRemove; - }).join(' ')); - }, - - toString: function() { - return this.toArray().join(' '); - } -} - -Object.extend(Element.ClassNames.prototype, Enumerable); -var Field = { - clear: function() { - for (var i = 0; i < arguments.length; i++) - $(arguments[i]).value = ''; - }, - - focus: function(element) { - $(element).focus(); - }, - - present: function() { - for (var i = 0; i < arguments.length; i++) - if ($(arguments[i]).value == '') return false; - return true; - }, - - select: function(element) { - $(element).select(); - }, - - activate: function(element) { - element = $(element); - element.focus(); - if (element.select) - element.select(); - } -} - -/*--------------------------------------------------------------------------*/ - -var Form = { - serialize: function(form) { - var elements = Form.getElements($(form)); - var queryComponents = new Array(); - - for (var i = 0; i < elements.length; i++) { - var queryComponent = Form.Element.serialize(elements[i]); - if (queryComponent) - queryComponents.push(queryComponent); - } - - return queryComponents.join('&'); - }, - - getElements: function(form) { - form = $(form); - var elements = new Array(); - - for (tagName in Form.Element.Serializers) { - var tagElements = form.getElementsByTagName(tagName); - for (var j = 0; j < tagElements.length; j++) - elements.push(tagElements[j]); - } - return elements; - }, - - getInputs: function(form, typeName, name) { - form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) - return inputs; - - var matchingInputs = new Array(); - for (var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || - (name && input.name != name)) - continue; - matchingInputs.push(input); - } - - return matchingInputs; - }, - - disable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.blur(); - element.disabled = 'true'; - } - }, - - enable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.disabled = ''; - } - }, - - findFirstElement: function(form) { - return Form.getElements(form).find(function(element) { - return element.type != 'hidden' && !element.disabled && - ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); - }); - }, - - focusFirstElement: function(form) { - Field.activate(Form.findFirstElement(form)); - }, - - reset: function(form) { - $(form).reset(); - } -} - -Form.Element = { - serialize: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) { - var key = encodeURIComponent(parameter[0]); - if (key.length == 0) return; - - if (parameter[1].constructor != Array) - parameter[1] = [parameter[1]]; - - return parameter[1].map(function(value) { - return key + '=' + encodeURIComponent(value); - }).join('&'); - } - }, - - getValue: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return parameter[1]; - } -} - -Form.Element.Serializers = { - input: function(element) { - switch (element.type.toLowerCase()) { - case 'submit': - case 'hidden': - case 'password': - case 'text': - return Form.Element.Serializers.textarea(element); - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element); - } - return false; - }, - - inputSelector: function(element) { - if (element.checked) - return [element.name, element.value]; - }, - - textarea: function(element) { - return [element.name, element.value]; - }, - - select: function(element) { - return Form.Element.Serializers[element.type == 'select-one' ? - 'selectOne' : 'selectMany'](element); - }, - - selectOne: function(element) { - var value = '', opt, index = element.selectedIndex; - if (index >= 0) { - opt = element.options[index]; - value = opt.value; - if (!value && !('value' in opt)) - value = opt.text; - } - return [element.name, value]; - }, - - selectMany: function(element) { - var value = new Array(); - for (var i = 0; i < element.length; i++) { - var opt = element.options[i]; - if (opt.selected) { - var optValue = opt.value; - if (!optValue && !('value' in opt)) - optValue = opt.text; - value.push(optValue); - } - } - return [element.name, value]; - } -} - -/*--------------------------------------------------------------------------*/ - -var $F = Form.Element.getValue; - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = function() {} -Abstract.TimedObserver.prototype = { - initialize: function(element, frequency, callback) { - this.frequency = frequency; - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - } -} - -Form.Element.Observer = Class.create(); -Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(); -Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = function() {} -Abstract.EventObserver.prototype = { - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - var elements = Form.getElements(this.element); - for (var i = 0; i < elements.length; i++) - this.registerCallback(elements[i]); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - Event.observe(element, 'click', this.onElementEvent.bind(this)); - break; - case 'password': - case 'text': - case 'textarea': - case 'select-one': - case 'select-multiple': - Event.observe(element, 'change', this.onElementEvent.bind(this)); - break; - } - } - } -} - -Form.Element.EventObserver = Class.create(); -Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(); -Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); -if (!window.Event) { - var Event = new Object(); -} - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - - element: function(event) { - return event.target || event.srcElement; - }, - - isLeftClick: function(event) { - return (((event.which) && (event.which == 1)) || - ((event.button) && (event.button == 1))); - }, - - pointerX: function(event) { - return event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)); - }, - - pointerY: function(event) { - return event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)); - }, - - stop: function(event) { - if (event.preventDefault) { - event.preventDefault(); - event.stopPropagation(); - } else { - event.returnValue = false; - event.cancelBubble = true; - } - }, - - // find the first node with the given tagName, starting from the - // node the event was triggered on; traverses the DOM upwards - findElement: function(event, tagName) { - var element = Event.element(event); - while (element.parentNode && (!element.tagName || - (element.tagName.toUpperCase() != tagName.toUpperCase()))) - element = element.parentNode; - return element; - }, - - observers: false, - - _observeAndCache: function(element, name, observer, useCapture) { - if (!this.observers) this.observers = []; - if (element.addEventListener) { - this.observers.push([element, name, observer, useCapture]); - element.addEventListener(name, observer, useCapture); - } else if (element.attachEvent) { - this.observers.push([element, name, observer, useCapture]); - element.attachEvent('on' + name, observer); - } - }, - - unloadCache: function() { - if (!Event.observers) return; - for (var i = 0; i < Event.observers.length; i++) { - Event.stopObserving.apply(this, Event.observers[i]); - Event.observers[i][0] = null; - } - Event.observers = false; - }, - - observe: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - (navigator.appVersion.match(/Konqueror|Safari|KHTML/) - || element.attachEvent)) - name = 'keydown'; - - this._observeAndCache(element, name, observer, useCapture); - }, - - stopObserving: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - (navigator.appVersion.match(/Konqueror|Safari|KHTML/) - || element.detachEvent)) - name = 'keydown'; - - if (element.removeEventListener) { - element.removeEventListener(name, observer, useCapture); - } else if (element.detachEvent) { - element.detachEvent('on' + name, observer); - } - } -}); - -/* prevent memory leaks in IE */ -Event.observe(window, 'unload', Event.unloadCache, false); -var Position = { - // set to true if needed, warning: firefox performance problems - // NOT neeeded for page scrolling, only if draggable contained in - // scrollable elements - includeScrollOffsets: false, - - // must be called before calling withinIncludingScrolloffset, every time the - // page is scrolled - prepare: function() { - this.deltaX = window.pageXOffset - || document.documentElement.scrollLeft - || document.body.scrollLeft - || 0; - this.deltaY = window.pageYOffset - || document.documentElement.scrollTop - || document.body.scrollTop - || 0; - }, - - realOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return [valueL, valueT]; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return [valueL, valueT]; - }, - - positionedOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - if (element) { - p = Element.getStyle(element, 'position'); - if (p == 'relative' || p == 'absolute') break; - } - } while (element); - return [valueL, valueT]; - }, - - offsetParent: function(element) { - if (element.offsetParent) return element.offsetParent; - if (element == document.body) return element; - - while ((element = element.parentNode) && element != document.body) - if (Element.getStyle(element, 'position') != 'static') - return element; - - return document.body; - }, - - // caches x/y coordinate pair to use with overlap - within: function(element, x, y) { - if (this.includeScrollOffsets) - return this.withinIncludingScrolloffsets(element, x, y); - this.xcomp = x; - this.ycomp = y; - this.offset = this.cumulativeOffset(element); - - return (y >= this.offset[1] && - y < this.offset[1] + element.offsetHeight && - x >= this.offset[0] && - x < this.offset[0] + element.offsetWidth); - }, - - withinIncludingScrolloffsets: function(element, x, y) { - var offsetcache = this.realOffset(element); - - this.xcomp = x + offsetcache[0] - this.deltaX; - this.ycomp = y + offsetcache[1] - this.deltaY; - this.offset = this.cumulativeOffset(element); - - return (this.ycomp >= this.offset[1] && - this.ycomp < this.offset[1] + element.offsetHeight && - this.xcomp >= this.offset[0] && - this.xcomp < this.offset[0] + element.offsetWidth); - }, - - // within must be called directly before - overlap: function(mode, element) { - if (!mode) return 0; - if (mode == 'vertical') - return ((this.offset[1] + element.offsetHeight) - this.ycomp) / - element.offsetHeight; - if (mode == 'horizontal') - return ((this.offset[0] + element.offsetWidth) - this.xcomp) / - element.offsetWidth; - }, - - clone: function(source, target) { - source = $(source); - target = $(target); - target.style.position = 'absolute'; - var offsets = this.cumulativeOffset(source); - target.style.top = offsets[1] + 'px'; - target.style.left = offsets[0] + 'px'; - target.style.width = source.offsetWidth + 'px'; - target.style.height = source.offsetHeight + 'px'; - }, - - page: function(forElement) { - var valueT = 0, valueL = 0; - - var element = forElement; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - - // Safari fix - if (element.offsetParent==document.body) - if (Element.getStyle(element,'position')=='absolute') break; - - } while (element = element.offsetParent); - - element = forElement; - do { - valueT -= element.scrollTop || 0; - valueL -= element.scrollLeft || 0; - } while (element = element.parentNode); - - return [valueL, valueT]; - }, - - clone: function(source, target) { - var options = Object.extend({ - setLeft: true, - setTop: true, - setWidth: true, - setHeight: true, - offsetTop: 0, - offsetLeft: 0 - }, arguments[2] || {}) - - // find page position of source - source = $(source); - var p = Position.page(source); - - // find coordinate system to use - target = $(target); - var delta = [0, 0]; - var parent = null; - // delta [0,0] will do fine with position: fixed elements, - // position:absolute needs offsetParent deltas - if (Element.getStyle(target,'position') == 'absolute') { - parent = Position.offsetParent(target); - delta = Position.page(parent); - } - - // correct by body offsets (fixes Safari) - if (parent == document.body) { - delta[0] -= document.body.offsetLeft; - delta[1] -= document.body.offsetTop; - } - - // set position - if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; - if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; - if(options.setWidth) target.style.width = source.offsetWidth + 'px'; - if(options.setHeight) target.style.height = source.offsetHeight + 'px'; - }, - - absolutize: function(element) { - element = $(element); - if (element.style.position == 'absolute') return; - Position.prepare(); - - var offsets = Position.positionedOffset(element); - var top = offsets[1]; - var left = offsets[0]; - var width = element.clientWidth; - var height = element.clientHeight; - - element._originalLeft = left - parseFloat(element.style.left || 0); - element._originalTop = top - parseFloat(element.style.top || 0); - element._originalWidth = element.style.width; - element._originalHeight = element.style.height; - - element.style.position = 'absolute'; - element.style.top = top + 'px';; - element.style.left = left + 'px';; - element.style.width = width + 'px';; - element.style.height = height + 'px';; - }, - - relativize: function(element) { - element = $(element); - if (element.style.position == 'relative') return; - Position.prepare(); - - element.style.position = 'relative'; - var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); - var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); - - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.height = element._originalHeight; - element.style.width = element._originalWidth; - } -} - -// Safari returns margins on body which is incorrect if the child is absolutely -// positioned. For performance reasons, redefine Position.cumulativeOffset for -// KHTML/WebKit only. -if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { - Position.cumulativeOffset = function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - if (element.offsetParent == document.body) - if (Element.getStyle(element, 'position') == 'absolute') break; - - element = element.offsetParent; - } while (element); - - return [valueL, valueT]; - } +/* Prototype JavaScript framework, version 1.4.0 + * (c) 2005 Sam Stephenson + * + * THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff + * against the source tree, available from the Prototype darcs repository. + * + * Prototype is freely distributable under the terms of an MIT-style license. + * + * For details, see the Prototype web site: http://prototype.conio.net/ + * +/*--------------------------------------------------------------------------*/ + +var Prototype = { + Version: '1.4.0', + ScriptFragment: '(?:)((\n|\r|.)*?)(?:<\/script>)', + + emptyFunction: function() {}, + K: function(x) {return x} +} + +var Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + } + } +} + +var Abstract = new Object(); + +Object.extend = function(destination, source) { + for (property in source) { + destination[property] = source[property]; + } + return destination; +} + +Object.inspect = function(object) { + try { + if (object == undefined) return 'undefined'; + if (object == null) return 'null'; + return object.inspect ? object.inspect() : object.toString(); + } catch (e) { + if (e instanceof RangeError) return '...'; + throw e; + } +} + +Function.prototype.bind = function() { + var __method = this, args = $A(arguments), object = args.shift(); + return function() { + return __method.apply(object, args.concat($A(arguments))); + } +} + +Function.prototype.bindAsEventListener = function(object) { + var __method = this; + return function(event) { + return __method.call(object, event || window.event); + } +} + +Object.extend(Number.prototype, { + toColorPart: function() { + var digits = this.toString(16); + if (this < 16) return '0' + digits; + return digits; + }, + + succ: function() { + return this + 1; + }, + + times: function(iterator) { + $R(0, this, true).each(iterator); + return this; + } +}); + +var Try = { + these: function() { + var returnValue; + + for (var i = 0; i < arguments.length; i++) { + var lambda = arguments[i]; + try { + returnValue = lambda(); + break; + } catch (e) {} + } + + return returnValue; + } +} + +/*--------------------------------------------------------------------------*/ + +var PeriodicalExecuter = Class.create(); +PeriodicalExecuter.prototype = { + initialize: function(callback, frequency) { + this.callback = callback; + this.frequency = frequency; + this.currentlyExecuting = false; + + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + if (!this.currentlyExecuting) { + try { + this.currentlyExecuting = true; + this.callback(); + } finally { + this.currentlyExecuting = false; + } + } + } +} + +/*--------------------------------------------------------------------------*/ + +function $() { + var elements = new Array(); + + for (var i = 0; i < arguments.length; i++) { + var element = arguments[i]; + if (typeof element == 'string') + element = document.getElementById(element); + + if (arguments.length == 1) + return element; + + elements.push(element); + } + + return elements; +} +Object.extend(String.prototype, { + stripTags: function() { + return this.replace(/<\/?[^>]+>/gi, ''); + }, + + stripScripts: function() { + return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); + }, + + extractScripts: function() { + var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); + var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); + return (this.match(matchAll) || []).map(function(scriptTag) { + return (scriptTag.match(matchOne) || ['', ''])[1]; + }); + }, + + evalScripts: function() { + return this.extractScripts().map(eval); + }, + + escapeHTML: function() { + var div = document.createElement('div'); + var text = document.createTextNode(this); + div.appendChild(text); + return div.innerHTML; + }, + + unescapeHTML: function() { + var div = document.createElement('div'); + div.innerHTML = this.stripTags(); + return div.childNodes[0] ? div.childNodes[0].nodeValue : ''; + }, + + toQueryParams: function() { + var pairs = this.match(/^\??(.*)$/)[1].split('&'); + return pairs.inject({}, function(params, pairString) { + var pair = pairString.split('='); + params[pair[0]] = pair[1]; + return params; + }); + }, + + toArray: function() { + return this.split(''); + }, + + camelize: function() { + var oStringList = this.split('-'); + if (oStringList.length == 1) return oStringList[0]; + + var camelizedString = this.indexOf('-') == 0 + ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1) + : oStringList[0]; + + for (var i = 1, len = oStringList.length; i < len; i++) { + var s = oStringList[i]; + camelizedString += s.charAt(0).toUpperCase() + s.substring(1); + } + + return camelizedString; + }, + + inspect: function() { + return "'" + this.replace('\\', '\\\\').replace("'", '\\\'') + "'"; + } +}); + +String.prototype.parseQuery = String.prototype.toQueryParams; + +var $break = new Object(); +var $continue = new Object(); + +var Enumerable = { + each: function(iterator) { + var index = 0; + try { + this._each(function(value) { + try { + iterator(value, index++); + } catch (e) { + if (e != $continue) throw e; + } + }); + } catch (e) { + if (e != $break) throw e; + } + }, + + all: function(iterator) { + var result = true; + this.each(function(value, index) { + result = result && !!(iterator || Prototype.K)(value, index); + if (!result) throw $break; + }); + return result; + }, + + any: function(iterator) { + var result = true; + this.each(function(value, index) { + if (result = !!(iterator || Prototype.K)(value, index)) + throw $break; + }); + return result; + }, + + collect: function(iterator) { + var results = []; + this.each(function(value, index) { + results.push(iterator(value, index)); + }); + return results; + }, + + detect: function (iterator) { + var result; + this.each(function(value, index) { + if (iterator(value, index)) { + result = value; + throw $break; + } + }); + return result; + }, + + findAll: function(iterator) { + var results = []; + this.each(function(value, index) { + if (iterator(value, index)) + results.push(value); + }); + return results; + }, + + grep: function(pattern, iterator) { + var results = []; + this.each(function(value, index) { + var stringValue = value.toString(); + if (stringValue.match(pattern)) + results.push((iterator || Prototype.K)(value, index)); + }) + return results; + }, + + include: function(object) { + var found = false; + this.each(function(value) { + if (value == object) { + found = true; + throw $break; + } + }); + return found; + }, + + inject: function(memo, iterator) { + this.each(function(value, index) { + memo = iterator(memo, value, index); + }); + return memo; + }, + + invoke: function(method) { + var args = $A(arguments).slice(1); + return this.collect(function(value) { + return value[method].apply(value, args); + }); + }, + + max: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (value >= (result || value)) + result = value; + }); + return result; + }, + + min: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (value <= (result || value)) + result = value; + }); + return result; + }, + + partition: function(iterator) { + var trues = [], falses = []; + this.each(function(value, index) { + ((iterator || Prototype.K)(value, index) ? + trues : falses).push(value); + }); + return [trues, falses]; + }, + + pluck: function(property) { + var results = []; + this.each(function(value, index) { + results.push(value[property]); + }); + return results; + }, + + reject: function(iterator) { + var results = []; + this.each(function(value, index) { + if (!iterator(value, index)) + results.push(value); + }); + return results; + }, + + sortBy: function(iterator) { + return this.collect(function(value, index) { + return {value: value, criteria: iterator(value, index)}; + }).sort(function(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }).pluck('value'); + }, + + toArray: function() { + return this.collect(Prototype.K); + }, + + zip: function() { + var iterator = Prototype.K, args = $A(arguments); + if (typeof args.last() == 'function') + iterator = args.pop(); + + var collections = [this].concat(args).map($A); + return this.map(function(value, index) { + iterator(value = collections.pluck(index)); + return value; + }); + }, + + inspect: function() { + return '#'; + } +} + +Object.extend(Enumerable, { + map: Enumerable.collect, + find: Enumerable.detect, + select: Enumerable.findAll, + member: Enumerable.include, + entries: Enumerable.toArray +}); +var $A = Array.from = function(iterable) { + if (!iterable) return []; + if (iterable.toArray) { + return iterable.toArray(); + } else { + var results = []; + for (var i = 0; i < iterable.length; i++) + results.push(iterable[i]); + return results; + } +} + +Object.extend(Array.prototype, Enumerable); + +Array.prototype._reverse = Array.prototype.reverse; + +Object.extend(Array.prototype, { + _each: function(iterator) { + for (var i = 0; i < this.length; i++) + iterator(this[i]); + }, + + clear: function() { + this.length = 0; + return this; + }, + + first: function() { + return this[0]; + }, + + last: function() { + return this[this.length - 1]; + }, + + compact: function() { + return this.select(function(value) { + return value != undefined || value != null; + }); + }, + + flatten: function() { + return this.inject([], function(array, value) { + return array.concat(value.constructor == Array ? + value.flatten() : [value]); + }); + }, + + without: function() { + var values = $A(arguments); + return this.select(function(value) { + return !values.include(value); + }); + }, + + indexOf: function(object) { + for (var i = 0; i < this.length; i++) + if (this[i] == object) return i; + return -1; + }, + + reverse: function(inline) { + return (inline !== false ? this : this.toArray())._reverse(); + }, + + shift: function() { + var result = this[0]; + for (var i = 0; i < this.length - 1; i++) + this[i] = this[i + 1]; + this.length--; + return result; + }, + + inspect: function() { + return '[' + this.map(Object.inspect).join(', ') + ']'; + } +}); +var Hash = { + _each: function(iterator) { + for (key in this) { + var value = this[key]; + if (typeof value == 'function') continue; + + var pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } + }, + + keys: function() { + return this.pluck('key'); + }, + + values: function() { + return this.pluck('value'); + }, + + merge: function(hash) { + return $H(hash).inject($H(this), function(mergedHash, pair) { + mergedHash[pair.key] = pair.value; + return mergedHash; + }); + }, + + toQueryString: function() { + return this.map(function(pair) { + return pair.map(encodeURIComponent).join('='); + }).join('&'); + }, + + inspect: function() { + return '#'; + } +} + +function $H(object) { + var hash = Object.extend({}, object || {}); + Object.extend(hash, Enumerable); + Object.extend(hash, Hash); + return hash; +} +ObjectRange = Class.create(); +Object.extend(ObjectRange.prototype, Enumerable); +Object.extend(ObjectRange.prototype, { + initialize: function(start, end, exclusive) { + this.start = start; + this.end = end; + this.exclusive = exclusive; + }, + + _each: function(iterator) { + var value = this.start; + do { + iterator(value); + value = value.succ(); + } while (this.include(value)); + }, + + include: function(value) { + if (value < this.start) + return false; + if (this.exclusive) + return value < this.end; + return value <= this.end; + } +}); + +var $R = function(start, end, exclusive) { + return new ObjectRange(start, end, exclusive); +} + +var Ajax = { + getTransport: function() { + return Try.these( + function() {return new ActiveXObject('Msxml2.XMLHTTP')}, + function() {return new ActiveXObject('Microsoft.XMLHTTP')}, + function() {return new XMLHttpRequest()} + ) || false; + }, + + activeRequestCount: 0 +} + +Ajax.Responders = { + responders: [], + + _each: function(iterator) { + this.responders._each(iterator); + }, + + register: function(responderToAdd) { + if (!this.include(responderToAdd)) + this.responders.push(responderToAdd); + }, + + unregister: function(responderToRemove) { + this.responders = this.responders.without(responderToRemove); + }, + + dispatch: function(callback, request, transport, json) { + this.each(function(responder) { + if (responder[callback] && typeof responder[callback] == 'function') { + try { + responder[callback].apply(responder, [request, transport, json]); + } catch (e) {} + } + }); + } +}; + +Object.extend(Ajax.Responders, Enumerable); + +Ajax.Responders.register({ + onCreate: function() { + Ajax.activeRequestCount++; + }, + + onComplete: function() { + Ajax.activeRequestCount--; + } +}); + +Ajax.Base = function() {}; +Ajax.Base.prototype = { + setOptions: function(options) { + this.options = { + method: 'post', + asynchronous: true, + parameters: '' + } + Object.extend(this.options, options || {}); + }, + + responseIsSuccess: function() { + return this.transport.status == undefined + || this.transport.status == 0 + || (this.transport.status >= 200 && this.transport.status < 300); + }, + + responseIsFailure: function() { + return !this.responseIsSuccess(); + } +} + +Ajax.Request = Class.create(); +Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + +Ajax.Request.prototype = Object.extend(new Ajax.Base(), { + initialize: function(url, options) { + this.transport = Ajax.getTransport(); + this.setOptions(options); + this.request(url); + }, + + request: function(url) { + var parameters = this.options.parameters || ''; + if (parameters.length > 0) parameters += '&_='; + + try { + this.url = url; + if (this.options.method == 'get' && parameters.length > 0) + this.url += (this.url.match(/\?/) ? '&' : '?') + parameters; + + Ajax.Responders.dispatch('onCreate', this, this.transport); + + this.transport.open(this.options.method, this.url, + this.options.asynchronous); + + if (this.options.asynchronous) { + this.transport.onreadystatechange = this.onStateChange.bind(this); + setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); + } + + this.setRequestHeaders(); + + var body = this.options.postBody ? this.options.postBody : parameters; + this.transport.send(this.options.method == 'post' ? body : null); + + } catch (e) { + this.dispatchException(e); + } + }, + + setRequestHeaders: function() { + var requestHeaders = + ['X-Requested-With', 'XMLHttpRequest', + 'X-Prototype-Version', Prototype.Version]; + + if (this.options.method == 'post') { + requestHeaders.push('Content-type', + 'application/x-www-form-urlencoded'); + + /* Force "Connection: close" for Mozilla browsers to work around + * a bug where XMLHttpReqeuest sends an incorrect Content-length + * header. See Mozilla Bugzilla #246651. + */ + if (this.transport.overrideMimeType) + requestHeaders.push('Connection', 'close'); + } + + if (this.options.requestHeaders) + requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); + + for (var i = 0; i < requestHeaders.length; i += 2) + this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); + }, + + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState != 1) + this.respondToReadyState(this.transport.readyState); + }, + + header: function(name) { + try { + return this.transport.getResponseHeader(name); + } catch (e) {} + }, + + evalJSON: function() { + try { + return eval(this.header('X-JSON')); + } catch (e) {} + }, + + evalResponse: function() { + try { + return eval(this.transport.responseText); + } catch (e) { + this.dispatchException(e); + } + }, + + respondToReadyState: function(readyState) { + var event = Ajax.Request.Events[readyState]; + var transport = this.transport, json = this.evalJSON(); + + if (event == 'Complete') { + try { + (this.options['on' + this.transport.status] + || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] + || Prototype.emptyFunction)(transport, json); + } catch (e) { + this.dispatchException(e); + } + + if ((this.header('Content-type') || '').match(/^text\/javascript/i)) + this.evalResponse(); + } + + try { + (this.options['on' + event] || Prototype.emptyFunction)(transport, json); + Ajax.Responders.dispatch('on' + event, this, transport, json); + } catch (e) { + this.dispatchException(e); + } + + /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ + if (event == 'Complete') + this.transport.onreadystatechange = Prototype.emptyFunction; + }, + + dispatchException: function(exception) { + (this.options.onException || Prototype.emptyFunction)(this, exception); + Ajax.Responders.dispatch('onException', this, exception); + } +}); + +Ajax.Updater = Class.create(); + +Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { + initialize: function(container, url, options) { + this.containers = { + success: container.success ? $(container.success) : $(container), + failure: container.failure ? $(container.failure) : + (container.success ? null : $(container)) + } + + this.transport = Ajax.getTransport(); + this.setOptions(options); + + var onComplete = this.options.onComplete || Prototype.emptyFunction; + this.options.onComplete = (function(transport, object) { + this.updateContent(); + onComplete(transport, object); + }).bind(this); + + this.request(url); + }, + + updateContent: function() { + var receiver = this.responseIsSuccess() ? + this.containers.success : this.containers.failure; + var response = this.transport.responseText; + + if (!this.options.evalScripts) + response = response.stripScripts(); + + if (receiver) { + if (this.options.insertion) { + new this.options.insertion(receiver, response); + } else { + Element.update(receiver, response); + } + } + + if (this.responseIsSuccess()) { + if (this.onComplete) + setTimeout(this.onComplete.bind(this), 10); + } + } +}); + +Ajax.PeriodicalUpdater = Class.create(); +Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { + initialize: function(container, url, options) { + this.setOptions(options); + this.onComplete = this.options.onComplete; + + this.frequency = (this.options.frequency || 2); + this.decay = (this.options.decay || 1); + + this.updater = {}; + this.container = container; + this.url = url; + + this.start(); + }, + + start: function() { + this.options.onComplete = this.updateComplete.bind(this); + this.onTimerEvent(); + }, + + stop: function() { + this.updater.onComplete = undefined; + clearTimeout(this.timer); + (this.onComplete || Prototype.emptyFunction).apply(this, arguments); + }, + + updateComplete: function(request) { + if (this.options.decay) { + this.decay = (request.responseText == this.lastText ? + this.decay * this.options.decay : 1); + + this.lastText = request.responseText; + } + this.timer = setTimeout(this.onTimerEvent.bind(this), + this.decay * this.frequency * 1000); + }, + + onTimerEvent: function() { + this.updater = new Ajax.Updater(this.container, this.url, this.options); + } +}); +document.getElementsByClassName = function(className, parentElement) { + var children = ($(parentElement) || document.body).getElementsByTagName('*'); + return $A(children).inject([], function(elements, child) { + if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) + elements.push(child); + return elements; + }); +} + +/*--------------------------------------------------------------------------*/ + +if (!window.Element) { + var Element = new Object(); +} + +Object.extend(Element, { + visible: function(element) { + return $(element).style.display != 'none'; + }, + + toggle: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + Element[Element.visible(element) ? 'hide' : 'show'](element); + } + }, + + hide: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = 'none'; + } + }, + + show: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = ''; + } + }, + + remove: function(element) { + element = $(element); + element.parentNode.removeChild(element); + }, + + update: function(element, html) { + $(element).innerHTML = html.stripScripts(); + setTimeout(function() {html.evalScripts()}, 10); + }, + + getHeight: function(element) { + element = $(element); + return element.offsetHeight; + }, + + classNames: function(element) { + return new Element.ClassNames(element); + }, + + hasClassName: function(element, className) { + if (!(element = $(element))) return; + return Element.classNames(element).include(className); + }, + + addClassName: function(element, className) { + if (!(element = $(element))) return; + return Element.classNames(element).add(className); + }, + + removeClassName: function(element, className) { + if (!(element = $(element))) return; + return Element.classNames(element).remove(className); + }, + + // removes whitespace-only text node children + cleanWhitespace: function(element) { + element = $(element); + for (var i = 0; i < element.childNodes.length; i++) { + var node = element.childNodes[i]; + if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) + Element.remove(node); + } + }, + + empty: function(element) { + return $(element).innerHTML.match(/^\s*$/); + }, + + scrollTo: function(element) { + element = $(element); + var x = element.x ? element.x : element.offsetLeft, + y = element.y ? element.y : element.offsetTop; + window.scrollTo(x, y); + }, + + getStyle: function(element, style) { + element = $(element); + var value = element.style[style.camelize()]; + if (!value) { + if (document.defaultView && document.defaultView.getComputedStyle) { + var css = document.defaultView.getComputedStyle(element, null); + value = css ? css.getPropertyValue(style) : null; + } else if (element.currentStyle) { + value = element.currentStyle[style.camelize()]; + } + } + + if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) + if (Element.getStyle(element, 'position') == 'static') value = 'auto'; + + return value == 'auto' ? null : value; + }, + + setStyle: function(element, style) { + element = $(element); + for (name in style) + element.style[name.camelize()] = style[name]; + }, + + getDimensions: function(element) { + element = $(element); + if (Element.getStyle(element, 'display') != 'none') + return {width: element.offsetWidth, height: element.offsetHeight}; + + // All *Width and *Height properties give 0 on elements with display none, + // so enable the element temporarily + var els = element.style; + var originalVisibility = els.visibility; + var originalPosition = els.position; + els.visibility = 'hidden'; + els.position = 'absolute'; + els.display = ''; + var originalWidth = element.clientWidth; + var originalHeight = element.clientHeight; + els.display = 'none'; + els.position = originalPosition; + els.visibility = originalVisibility; + return {width: originalWidth, height: originalHeight}; + }, + + makePositioned: function(element) { + element = $(element); + var pos = Element.getStyle(element, 'position'); + if (pos == 'static' || !pos) { + element._madePositioned = true; + element.style.position = 'relative'; + // Opera returns the offset relative to the positioning context, when an + // element is position relative but top and left have not been defined + if (window.opera) { + element.style.top = 0; + element.style.left = 0; + } + } + }, + + undoPositioned: function(element) { + element = $(element); + if (element._madePositioned) { + element._madePositioned = undefined; + element.style.position = + element.style.top = + element.style.left = + element.style.bottom = + element.style.right = ''; + } + }, + + makeClipping: function(element) { + element = $(element); + if (element._overflow) return; + element._overflow = element.style.overflow; + if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') + element.style.overflow = 'hidden'; + }, + + undoClipping: function(element) { + element = $(element); + if (element._overflow) return; + element.style.overflow = element._overflow; + element._overflow = undefined; + } +}); + +var Toggle = new Object(); +Toggle.display = Element.toggle; + +/*--------------------------------------------------------------------------*/ + +Abstract.Insertion = function(adjacency) { + this.adjacency = adjacency; +} + +Abstract.Insertion.prototype = { + initialize: function(element, content) { + this.element = $(element); + this.content = content.stripScripts(); + + if (this.adjacency && this.element.insertAdjacentHTML) { + try { + this.element.insertAdjacentHTML(this.adjacency, this.content); + } catch (e) { + if (this.element.tagName.toLowerCase() == 'tbody') { + this.insertContent(this.contentFromAnonymousTable()); + } else { + throw e; + } + } + } else { + this.range = this.element.ownerDocument.createRange(); + if (this.initializeRange) this.initializeRange(); + this.insertContent([this.range.createContextualFragment(this.content)]); + } + + setTimeout(function() {content.evalScripts()}, 10); + }, + + contentFromAnonymousTable: function() { + var div = document.createElement('div'); + div.innerHTML = '' + this.content + '
'; + return $A(div.childNodes[0].childNodes[0].childNodes); + } +} + +var Insertion = new Object(); + +Insertion.Before = Class.create(); +Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { + initializeRange: function() { + this.range.setStartBefore(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, this.element); + }).bind(this)); + } +}); + +Insertion.Top = Class.create(); +Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(true); + }, + + insertContent: function(fragments) { + fragments.reverse(false).each((function(fragment) { + this.element.insertBefore(fragment, this.element.firstChild); + }).bind(this)); + } +}); + +Insertion.Bottom = Class.create(); +Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.appendChild(fragment); + }).bind(this)); + } +}); + +Insertion.After = Class.create(); +Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { + initializeRange: function() { + this.range.setStartAfter(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, + this.element.nextSibling); + }).bind(this)); + } +}); + +/*--------------------------------------------------------------------------*/ + +Element.ClassNames = Class.create(); +Element.ClassNames.prototype = { + initialize: function(element) { + this.element = $(element); + }, + + _each: function(iterator) { + this.element.className.split(/\s+/).select(function(name) { + return name.length > 0; + })._each(iterator); + }, + + set: function(className) { + this.element.className = className; + }, + + add: function(classNameToAdd) { + if (this.include(classNameToAdd)) return; + this.set(this.toArray().concat(classNameToAdd).join(' ')); + }, + + remove: function(classNameToRemove) { + if (!this.include(classNameToRemove)) return; + this.set(this.select(function(className) { + return className != classNameToRemove; + }).join(' ')); + }, + + toString: function() { + return this.toArray().join(' '); + } +} + +Object.extend(Element.ClassNames.prototype, Enumerable); +var Field = { + clear: function() { + for (var i = 0; i < arguments.length; i++) + $(arguments[i]).value = ''; + }, + + focus: function(element) { + $(element).focus(); + }, + + present: function() { + for (var i = 0; i < arguments.length; i++) + if ($(arguments[i]).value == '') return false; + return true; + }, + + select: function(element) { + $(element).select(); + }, + + activate: function(element) { + element = $(element); + element.focus(); + if (element.select) + element.select(); + } +} + +/*--------------------------------------------------------------------------*/ + +var Form = { + serialize: function(form) { + var elements = Form.getElements($(form)); + var queryComponents = new Array(); + + for (var i = 0; i < elements.length; i++) { + var queryComponent = Form.Element.serialize(elements[i]); + if (queryComponent) + queryComponents.push(queryComponent); + } + + return queryComponents.join('&'); + }, + + getElements: function(form) { + form = $(form); + var elements = new Array(); + + for (tagName in Form.Element.Serializers) { + var tagElements = form.getElementsByTagName(tagName); + for (var j = 0; j < tagElements.length; j++) + elements.push(tagElements[j]); + } + return elements; + }, + + getInputs: function(form, typeName, name) { + form = $(form); + var inputs = form.getElementsByTagName('input'); + + if (!typeName && !name) + return inputs; + + var matchingInputs = new Array(); + for (var i = 0; i < inputs.length; i++) { + var input = inputs[i]; + if ((typeName && input.type != typeName) || + (name && input.name != name)) + continue; + matchingInputs.push(input); + } + + return matchingInputs; + }, + + disable: function(form) { + var elements = Form.getElements(form); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + element.blur(); + element.disabled = 'true'; + } + }, + + enable: function(form) { + var elements = Form.getElements(form); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + element.disabled = ''; + } + }, + + findFirstElement: function(form) { + return Form.getElements(form).find(function(element) { + return element.type != 'hidden' && !element.disabled && + ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); + }); + }, + + focusFirstElement: function(form) { + Field.activate(Form.findFirstElement(form)); + }, + + reset: function(form) { + $(form).reset(); + } +} + +Form.Element = { + serialize: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + var parameter = Form.Element.Serializers[method](element); + + if (parameter) { + var key = encodeURIComponent(parameter[0]); + if (key.length == 0) return; + + if (parameter[1].constructor != Array) + parameter[1] = [parameter[1]]; + + return parameter[1].map(function(value) { + return key + '=' + encodeURIComponent(value); + }).join('&'); + } + }, + + getValue: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + var parameter = Form.Element.Serializers[method](element); + + if (parameter) + return parameter[1]; + } +} + +Form.Element.Serializers = { + input: function(element) { + switch (element.type.toLowerCase()) { + case 'submit': + case 'hidden': + case 'password': + case 'text': + return Form.Element.Serializers.textarea(element); + case 'checkbox': + case 'radio': + return Form.Element.Serializers.inputSelector(element); + } + return false; + }, + + inputSelector: function(element) { + if (element.checked) + return [element.name, element.value]; + }, + + textarea: function(element) { + return [element.name, element.value]; + }, + + select: function(element) { + return Form.Element.Serializers[element.type == 'select-one' ? + 'selectOne' : 'selectMany'](element); + }, + + selectOne: function(element) { + var value = '', opt, index = element.selectedIndex; + if (index >= 0) { + opt = element.options[index]; + value = opt.value; + if (!value && !('value' in opt)) + value = opt.text; + } + return [element.name, value]; + }, + + selectMany: function(element) { + var value = new Array(); + for (var i = 0; i < element.length; i++) { + var opt = element.options[i]; + if (opt.selected) { + var optValue = opt.value; + if (!optValue && !('value' in opt)) + optValue = opt.text; + value.push(optValue); + } + } + return [element.name, value]; + } +} + +/*--------------------------------------------------------------------------*/ + +var $F = Form.Element.getValue; + +/*--------------------------------------------------------------------------*/ + +Abstract.TimedObserver = function() {} +Abstract.TimedObserver.prototype = { + initialize: function(element, frequency, callback) { + this.frequency = frequency; + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + } +} + +Form.Element.Observer = Class.create(); +Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.Observer = Class.create(); +Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); + +/*--------------------------------------------------------------------------*/ + +Abstract.EventObserver = function() {} +Abstract.EventObserver.prototype = { + initialize: function(element, callback) { + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + if (this.element.tagName.toLowerCase() == 'form') + this.registerFormCallbacks(); + else + this.registerCallback(this.element); + }, + + onElementEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + }, + + registerFormCallbacks: function() { + var elements = Form.getElements(this.element); + for (var i = 0; i < elements.length; i++) + this.registerCallback(elements[i]); + }, + + registerCallback: function(element) { + if (element.type) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + Event.observe(element, 'click', this.onElementEvent.bind(this)); + break; + case 'password': + case 'text': + case 'textarea': + case 'select-one': + case 'select-multiple': + Event.observe(element, 'change', this.onElementEvent.bind(this)); + break; + } + } + } +} + +Form.Element.EventObserver = Class.create(); +Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.EventObserver = Class.create(); +Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); +if (!window.Event) { + var Event = new Object(); +} + +Object.extend(Event, { + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + + element: function(event) { + return event.target || event.srcElement; + }, + + isLeftClick: function(event) { + return (((event.which) && (event.which == 1)) || + ((event.button) && (event.button == 1))); + }, + + pointerX: function(event) { + return event.pageX || (event.clientX + + (document.documentElement.scrollLeft || document.body.scrollLeft)); + }, + + pointerY: function(event) { + return event.pageY || (event.clientY + + (document.documentElement.scrollTop || document.body.scrollTop)); + }, + + stop: function(event) { + if (event.preventDefault) { + event.preventDefault(); + event.stopPropagation(); + } else { + event.returnValue = false; + event.cancelBubble = true; + } + }, + + // find the first node with the given tagName, starting from the + // node the event was triggered on; traverses the DOM upwards + findElement: function(event, tagName) { + var element = Event.element(event); + while (element.parentNode && (!element.tagName || + (element.tagName.toUpperCase() != tagName.toUpperCase()))) + element = element.parentNode; + return element; + }, + + observers: false, + + _observeAndCache: function(element, name, observer, useCapture) { + if (!this.observers) this.observers = []; + if (element.addEventListener) { + this.observers.push([element, name, observer, useCapture]); + element.addEventListener(name, observer, useCapture); + } else if (element.attachEvent) { + this.observers.push([element, name, observer, useCapture]); + element.attachEvent('on' + name, observer); + } + }, + + unloadCache: function() { + if (!Event.observers) return; + for (var i = 0; i < Event.observers.length; i++) { + Event.stopObserving.apply(this, Event.observers[i]); + Event.observers[i][0] = null; + } + Event.observers = false; + }, + + observe: function(element, name, observer, useCapture) { + var element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.attachEvent)) + name = 'keydown'; + + this._observeAndCache(element, name, observer, useCapture); + }, + + stopObserving: function(element, name, observer, useCapture) { + var element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.detachEvent)) + name = 'keydown'; + + if (element.removeEventListener) { + element.removeEventListener(name, observer, useCapture); + } else if (element.detachEvent) { + element.detachEvent('on' + name, observer); + } + } +}); + +/* prevent memory leaks in IE */ +Event.observe(window, 'unload', Event.unloadCache, false); +var Position = { + // set to true if needed, warning: firefox performance problems + // NOT neeeded for page scrolling, only if draggable contained in + // scrollable elements + includeScrollOffsets: false, + + // must be called before calling withinIncludingScrolloffset, every time the + // page is scrolled + prepare: function() { + this.deltaX = window.pageXOffset + || document.documentElement.scrollLeft + || document.body.scrollLeft + || 0; + this.deltaY = window.pageYOffset + || document.documentElement.scrollTop + || document.body.scrollTop + || 0; + }, + + realOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.scrollTop || 0; + valueL += element.scrollLeft || 0; + element = element.parentNode; + } while (element); + return [valueL, valueT]; + }, + + cumulativeOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return [valueL, valueT]; + }, + + positionedOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + p = Element.getStyle(element, 'position'); + if (p == 'relative' || p == 'absolute') break; + } + } while (element); + return [valueL, valueT]; + }, + + offsetParent: function(element) { + if (element.offsetParent) return element.offsetParent; + if (element == document.body) return element; + + while ((element = element.parentNode) && element != document.body) + if (Element.getStyle(element, 'position') != 'static') + return element; + + return document.body; + }, + + // caches x/y coordinate pair to use with overlap + within: function(element, x, y) { + if (this.includeScrollOffsets) + return this.withinIncludingScrolloffsets(element, x, y); + this.xcomp = x; + this.ycomp = y; + this.offset = this.cumulativeOffset(element); + + return (y >= this.offset[1] && + y < this.offset[1] + element.offsetHeight && + x >= this.offset[0] && + x < this.offset[0] + element.offsetWidth); + }, + + withinIncludingScrolloffsets: function(element, x, y) { + var offsetcache = this.realOffset(element); + + this.xcomp = x + offsetcache[0] - this.deltaX; + this.ycomp = y + offsetcache[1] - this.deltaY; + this.offset = this.cumulativeOffset(element); + + return (this.ycomp >= this.offset[1] && + this.ycomp < this.offset[1] + element.offsetHeight && + this.xcomp >= this.offset[0] && + this.xcomp < this.offset[0] + element.offsetWidth); + }, + + // within must be called directly before + overlap: function(mode, element) { + if (!mode) return 0; + if (mode == 'vertical') + return ((this.offset[1] + element.offsetHeight) - this.ycomp) / + element.offsetHeight; + if (mode == 'horizontal') + return ((this.offset[0] + element.offsetWidth) - this.xcomp) / + element.offsetWidth; + }, + + clone: function(source, target) { + source = $(source); + target = $(target); + target.style.position = 'absolute'; + var offsets = this.cumulativeOffset(source); + target.style.top = offsets[1] + 'px'; + target.style.left = offsets[0] + 'px'; + target.style.width = source.offsetWidth + 'px'; + target.style.height = source.offsetHeight + 'px'; + }, + + page: function(forElement) { + var valueT = 0, valueL = 0; + + var element = forElement; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + + // Safari fix + if (element.offsetParent==document.body) + if (Element.getStyle(element,'position')=='absolute') break; + + } while (element = element.offsetParent); + + element = forElement; + do { + valueT -= element.scrollTop || 0; + valueL -= element.scrollLeft || 0; + } while (element = element.parentNode); + + return [valueL, valueT]; + }, + + clone: function(source, target) { + var options = Object.extend({ + setLeft: true, + setTop: true, + setWidth: true, + setHeight: true, + offsetTop: 0, + offsetLeft: 0 + }, arguments[2] || {}) + + // find page position of source + source = $(source); + var p = Position.page(source); + + // find coordinate system to use + target = $(target); + var delta = [0, 0]; + var parent = null; + // delta [0,0] will do fine with position: fixed elements, + // position:absolute needs offsetParent deltas + if (Element.getStyle(target,'position') == 'absolute') { + parent = Position.offsetParent(target); + delta = Position.page(parent); + } + + // correct by body offsets (fixes Safari) + if (parent == document.body) { + delta[0] -= document.body.offsetLeft; + delta[1] -= document.body.offsetTop; + } + + // set position + if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; + if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; + if(options.setWidth) target.style.width = source.offsetWidth + 'px'; + if(options.setHeight) target.style.height = source.offsetHeight + 'px'; + }, + + absolutize: function(element) { + element = $(element); + if (element.style.position == 'absolute') return; + Position.prepare(); + + var offsets = Position.positionedOffset(element); + var top = offsets[1]; + var left = offsets[0]; + var width = element.clientWidth; + var height = element.clientHeight; + + element._originalLeft = left - parseFloat(element.style.left || 0); + element._originalTop = top - parseFloat(element.style.top || 0); + element._originalWidth = element.style.width; + element._originalHeight = element.style.height; + + element.style.position = 'absolute'; + element.style.top = top + 'px';; + element.style.left = left + 'px';; + element.style.width = width + 'px';; + element.style.height = height + 'px';; + }, + + relativize: function(element) { + element = $(element); + if (element.style.position == 'relative') return; + Position.prepare(); + + element.style.position = 'relative'; + var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); + var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); + + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.height = element._originalHeight; + element.style.width = element._originalWidth; + } +} + +// Safari returns margins on body which is incorrect if the child is absolutely +// positioned. For performance reasons, redefine Position.cumulativeOffset for +// KHTML/WebKit only. +if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { + Position.cumulativeOffset = function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + if (element.offsetParent == document.body) + if (Element.getStyle(element, 'position') == 'absolute') break; + + element = element.offsetParent; + } while (element); + + return [valueL, valueT]; + } } \ No newline at end of file diff --git a/src/reformas.html b/src/reformas.html index 7bf32bb..5078704 100644 --- a/src/reformas.html +++ b/src/reformas.html @@ -1,110 +1,110 @@ - - - - - - - - - -Estudio Miguelo en Rivas, Madrid - Obras y reformas de cocina, baño y jardín - - - - - - - - - - -
- -
-

REFORMAS
 

- -

 

-

Valla Aluminio Blanco

- -

 

-

Piscina de obra. Sistema Gunite (proyectada)

- -

 

-

Valla Aluminio Blanca con Iluminación Incorporada

- -

 

-

Piscina Proyectada, Piedra de Colmenar con Iluminación. Acabado Gresite

- -

 

-

Valla Aluminio Gris (Carta Ral)

- -

 

-

Fondo Piscina en Gresite

- -

 

-

Puerta y Valla en Aluminio Blanco

- -

 

-

Piscina de obra. Sistema Gunite (proyectada)

- -

 

-

Puerta Aluminio Blanca

- -

 

-

Piscina con Escalera Romana

- -

 

-

Valla Aluminio Blanco - Celosía en Aluminio Blanco

- -

 

-

Reforma Exterior; Solado

- -

 

-

Piscina de obra. Sistema Gunite (proyectada)

- -

 

-

Reforma Exterior; Construcción de "Casita Jardín"

- -

 

-

Piscina con decoración

- -

 

-

Obra Exterior; Barbacoa en piedra

- -

 

-

Obra Interior; Montaje de Sauna en Madera

- -

 

-

Piscina con Jacuzzi iluminado

- -

 

-

Obra Exterior; Construcción de Fachada en Piedra

- -

 

-

Detalle Jacuzzi

- -

 

-

Obra Exterior

- -

 

-
-
-
- - - - + + + + + + + + + +Estudio Miguelo en Rivas, Madrid - Obras y reformas de cocina, baño y jardín + + + + + + + + + + +
+ +
+

REFORMAS
 

+ +

 

+

Valla Aluminio Blanco

+ +

 

+

Piscina de obra. Sistema Gunite (proyectada)

+ +

 

+

Valla Aluminio Blanca con Iluminación Incorporada

+ +

 

+

Piscina Proyectada, Piedra de Colmenar con Iluminación. Acabado Gresite

+ +

 

+

Valla Aluminio Gris (Carta Ral)

+ +

 

+

Fondo Piscina en Gresite

+ +

 

+

Puerta y Valla en Aluminio Blanco

+ +

 

+

Piscina de obra. Sistema Gunite (proyectada)

+ +

 

+

Puerta Aluminio Blanca

+ +

 

+

Piscina con Escalera Romana

+ +

 

+

Valla Aluminio Blanco - Celosía en Aluminio Blanco

+ +

 

+

Reforma Exterior; Solado

+ +

 

+

Piscina de obra. Sistema Gunite (proyectada)

+ +

 

+

Reforma Exterior; Construcción de "Casita Jardín"

+ +

 

+

Piscina con decoración

+ +

 

+

Obra Exterior; Barbacoa en piedra

+ +

 

+

Obra Interior; Montaje de Sauna en Madera

+ +

 

+

Piscina con Jacuzzi iluminado

+ +

 

+

Obra Exterior; Construcción de Fachada en Piedra

+ +

 

+

Detalle Jacuzzi

+ +

 

+

Obra Exterior

+ +

 

+
+
+
+ + + + diff --git a/src/robots.txt b/src/robots.txt index bc11640..98186a7 100644 --- a/src/robots.txt +++ b/src/robots.txt @@ -1,3 +1,3 @@ -User-agent: * -Allow: / - +User-agent: * +Allow: / + diff --git a/src/scriptaculous.js b/src/scriptaculous.js index 008ca18..a68bc78 100644 --- a/src/scriptaculous.js +++ b/src/scriptaculous.js @@ -1,45 +1,45 @@ -// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Scriptaculous = { - Version: '1.5.1', - require: function(libraryName) { - // inserting via DOM fails in Safari 2.0, so brute force approach - document.write(''); - }, - load: function() { - if((typeof Prototype=='undefined') || - parseFloat(Prototype.Version.split(".")[0] + "." + - Prototype.Version.split(".")[1]) < 1.4) - throw("script.aculo.us requires the Prototype JavaScript framework >= 1.4.0"); - - $A(document.getElementsByTagName("script")).findAll( function(s) { - return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/)) - }).each( function(s) { - var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,''); - var includes = s.src.match(/\?.*load=([a-z,]*)/); - (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each( - function(include) { Scriptaculous.require(path+include+'.js') }); - }); - } -} - +// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +var Scriptaculous = { + Version: '1.5.1', + require: function(libraryName) { + // inserting via DOM fails in Safari 2.0, so brute force approach + document.write(''); + }, + load: function() { + if((typeof Prototype=='undefined') || + parseFloat(Prototype.Version.split(".")[0] + "." + + Prototype.Version.split(".")[1]) < 1.4) + throw("script.aculo.us requires the Prototype JavaScript framework >= 1.4.0"); + + $A(document.getElementsByTagName("script")).findAll( function(s) { + return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/)) + }).each( function(s) { + var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,''); + var includes = s.src.match(/\?.*load=([a-z,]*)/); + (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each( + function(include) { Scriptaculous.require(path+include+'.js') }); + }); + } +} + Scriptaculous.load(); \ No newline at end of file diff --git a/src/sitemap.xml b/src/sitemap.xml index 327ac9a..f66b4bb 100644 --- a/src/sitemap.xml +++ b/src/sitemap.xml @@ -1,37 +1,37 @@ - - -http://www.estudiomiguelo.com/ -http://www.estudiomiguelo.com/acerca-de.html -http://www.estudiomiguelo.com/productos.html -http://www.estudiomiguelo.com/promociones.html -http://www.estudiomiguelo.com/trabajos.html -http://www.estudiomiguelo.com/contacto.html -http://www.estudiomiguelo.com/default.htm -http://www.estudiomiguelo.com/cocinas.html -http://www.estudiomiguelo.com/armarios.html -http://www.estudiomiguelo.com/techos-aluminio.html -http://www.estudiomiguelo.com/mesas-sillas.html -http://www.estudiomiguelo.com/electrodomesticos.html -http://www.estudiomiguelo.com/reformas.html -http://www.estudiomiguelo.com/jardin.html -http://www.estudiomiguelo.com/promociones-armarios.html -http://www.estudiomiguelo.com/promociones-cocinas-nacionales.html -http://www.estudiomiguelo.com/promociones-electrodomesticos.html -http://www.estudiomiguelo.com/promociones-techos.html -http://www.estudiomiguelo.com/promociones-cocinas-emv.html -http://www.estudiomiguelo.com/promociones-jardin.html -http://www.estudiomiguelo.com/promociones-mesas-sillas.html -http://www.estudiomiguelo.com/trabajos/1-armarios-rivas/trabajo_armarios.htm -http://www.estudiomiguelo.com/trabajos/2-cocina-pau-vallecas/trabajo_cocina.htm -http://www.estudiomiguelo.com/trabajos/3-cocina-rivas/trabajo_cocina.htm -http://www.estudiomiguelo.com/trabajos/4-cocina-rivas/trabajo_cocina.htm -http://www.estudiomiguelo.com/trabajos/7-armario-pau-vallecas/trabajo_armarios.htm -http://www.estudiomiguelo.com/trabajos/6-cocina-rivas/trabajo_cocina.htm -http://www.estudiomiguelo.com/trabajos/5-cocina-mejorada-campo/trabajo_cocina.htm -http://www.estudiomiguelo.com/trabajos/8-cocina-rivas/trabajo_cocina.htm -http://www.estudiomiguelo.com/trabajos/9-cocina-rivas/trabajo_cocina.htm -http://www.estudiomiguelo.com/trabajos/10-cocina-san-fernando/trabajo_cocina.htm + + +http://www.estudiomiguelo.com/ +http://www.estudiomiguelo.com/acerca-de.html +http://www.estudiomiguelo.com/productos.html +http://www.estudiomiguelo.com/promociones.html +http://www.estudiomiguelo.com/trabajos.html +http://www.estudiomiguelo.com/contacto.html +http://www.estudiomiguelo.com/default.htm +http://www.estudiomiguelo.com/cocinas.html +http://www.estudiomiguelo.com/armarios.html +http://www.estudiomiguelo.com/techos-aluminio.html +http://www.estudiomiguelo.com/mesas-sillas.html +http://www.estudiomiguelo.com/electrodomesticos.html +http://www.estudiomiguelo.com/reformas.html +http://www.estudiomiguelo.com/jardin.html +http://www.estudiomiguelo.com/promociones-armarios.html +http://www.estudiomiguelo.com/promociones-cocinas-nacionales.html +http://www.estudiomiguelo.com/promociones-electrodomesticos.html +http://www.estudiomiguelo.com/promociones-techos.html +http://www.estudiomiguelo.com/promociones-cocinas-emv.html +http://www.estudiomiguelo.com/promociones-jardin.html +http://www.estudiomiguelo.com/promociones-mesas-sillas.html +http://www.estudiomiguelo.com/trabajos/1-armarios-rivas/trabajo_armarios.htm +http://www.estudiomiguelo.com/trabajos/2-cocina-pau-vallecas/trabajo_cocina.htm +http://www.estudiomiguelo.com/trabajos/3-cocina-rivas/trabajo_cocina.htm +http://www.estudiomiguelo.com/trabajos/4-cocina-rivas/trabajo_cocina.htm +http://www.estudiomiguelo.com/trabajos/7-armario-pau-vallecas/trabajo_armarios.htm +http://www.estudiomiguelo.com/trabajos/6-cocina-rivas/trabajo_cocina.htm +http://www.estudiomiguelo.com/trabajos/5-cocina-mejorada-campo/trabajo_cocina.htm +http://www.estudiomiguelo.com/trabajos/8-cocina-rivas/trabajo_cocina.htm +http://www.estudiomiguelo.com/trabajos/9-cocina-rivas/trabajo_cocina.htm +http://www.estudiomiguelo.com/trabajos/10-cocina-san-fernando/trabajo_cocina.htm \ No newline at end of file diff --git a/src/techos-aluminio.html b/src/techos-aluminio.html index c15f9f4..2e0ab97 100644 --- a/src/techos-aluminio.html +++ b/src/techos-aluminio.html @@ -1,74 +1,74 @@ - - - - - - - - - - Estudio Miguelo en Rivas, Madrid - Decoración e instalación de techos de aluminio para cocinas, baños y locales - - - - - - - - -
- -
-

TECHOS DE ALUMINIO
 

-

Conozca nuestros techos de aluminio pensado como complemento final de decoración y diseño para los ambientes más cuidados de su casa.

-

Fácil de limpiar, no necesita mantenimiento, totalmente desmontable, permite incorporar todo tipo de iluminación, crea una nueva dimensión de altura, tiene una gama amplia de posibilidades, selecciones de color y diferentes texturas aplicables a todo tipo de cocinas y baños.

-

Se instala en un día, sin obras.

-

 

-

Techo Aluminio Modelo V-200.Color Aluminio Natural

- -

 

-

Techo Aluminio Modelo V-200. Color Aluminio Naturla

-

 

-

 

-

Recubrimiento Pared. Acero Color Madera con Entrecalle Plateada

-

 

-

 

-

Recubrimiento Pared. Acero Color Madera con Entrecalle Dorada

- -

 

-

Techo Aluminio Modelo V-200. Color Madera combinado con Espejo Plata

- -

 

-

Recubrimiento Pared. Acero Color Madera con Entrecalle Plateada.

- -

 

-

Techo Aluminio Modelo V-200. Color Azul (Carta Ral)

- -

 

-

Techo Aluminio Modelo V-200.Color Aluminio Natural

- -

 

-

Techo Aluminio Modelo V-200. Color Pergamón

- -

 

-
-
-
- - - - + + + + + + + + + + Estudio Miguelo en Rivas, Madrid - Decoración e instalación de techos de aluminio para cocinas, baños y locales + + + + + + + + +
+ +
+

TECHOS DE ALUMINIO
 

+

Conozca nuestros techos de aluminio pensado como complemento final de decoración y diseño para los ambientes más cuidados de su casa.

+

Fácil de limpiar, no necesita mantenimiento, totalmente desmontable, permite incorporar todo tipo de iluminación, crea una nueva dimensión de altura, tiene una gama amplia de posibilidades, selecciones de color y diferentes texturas aplicables a todo tipo de cocinas y baños.

+

Se instala en un día, sin obras.

+

 

+

Techo Aluminio Modelo V-200.Color Aluminio Natural

+ +

 

+

Techo Aluminio Modelo V-200. Color Aluminio Naturla

+

 

+

 

+

Recubrimiento Pared. Acero Color Madera con Entrecalle Plateada

+

 

+

 

+

Recubrimiento Pared. Acero Color Madera con Entrecalle Dorada

+ +

 

+

Techo Aluminio Modelo V-200. Color Madera combinado con Espejo Plata

+ +

 

+

Recubrimiento Pared. Acero Color Madera con Entrecalle Plateada.

+ +

 

+

Techo Aluminio Modelo V-200. Color Azul (Carta Ral)

+ +

 

+

Techo Aluminio Modelo V-200.Color Aluminio Natural

+ +

 

+

Techo Aluminio Modelo V-200. Color Pergamón

+ +

 

+
+
+
+ + + + diff --git a/src/techos.html b/src/techos.html new file mode 100644 index 0000000..70c9e88 --- /dev/null +++ b/src/techos.html @@ -0,0 +1,77 @@ + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

TECHOS DE ALUMINIO
 

+

Conozca nuestros techos de aluminio pensado como complemento final de decoración y diseño para los ambientes más cuidados de su casa.

+

Fácil de limpiar, no necesita mantenimiento, totalmente desmontable, permite incorporar todo tipo de iluminación, crea una nueva dimensión de altura, tiene una gama amplia de posibilidades, selecciones de color y diferentes texturas aplicables a todo tipo de cocinas y baños.

+

Se instala en un día, sin obras.

+

 

+

Techo Aluminio Modelo V-200.Color Aluminio Natural

+ +

 

+

Techo Aluminio Modelo V-200. Color Aluminio Naturla

+

 

+

 

+

Recubrimiento Pared. Acero Color Madera con Entrecalle Plateada

+

 

+

 

+

Recubrimiento Pared. Acero Color Madera con Entrecalle Dorada

+ +

 

+

Techo Aluminio Modelo V-200. Color Madera combinado con Espejo Plata

+ +

 

+

Recubrimiento Pared. Acero Color Madera con Entrecalle Plateada.

+ +

 

+

Techo Aluminio Modelo V-200. Color Azul (Carta Ral)

+ +

 

+

Techo Aluminio Modelo V-200.Color Aluminio Natural

+ +

 

+

Techo Aluminio Modelo V-200. Color Pergamón

+ +

 

+
+
+
+ + + + diff --git a/src/trabajos.html b/src/trabajos.html index f0bf31c..0ac8ed3 100644 --- a/src/trabajos.html +++ b/src/trabajos.html @@ -1,106 +1,106 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - -
- - -
-

 

-

- - - - - -

- - - - - - - -

- - - - - - - -

- - - - -

- - - - -

-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + +
+ + +
+

 

+

+ + + + + +

+ + + + + + + +

+ + + + + + + +

+ + + + +

+ + + + +

+
+
+ + + + diff --git a/src/trabajos/1-armarios-rivas/trabajo_armarios.htm b/src/trabajos/1-armarios-rivas/trabajo_armarios.htm index 9d9d1d5..3befcdd 100644 --- a/src/trabajos/1-armarios-rivas/trabajo_armarios.htm +++ b/src/trabajos/1-armarios-rivas/trabajo_armarios.htm @@ -1,52 +1,52 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - -
- -
-

ARMARIOS

-

Armario Modelo Lira Lacado en color Hueso. Puertas combinadas con decoración en cristal transparente y aspas. Interior 19 mm color crema.

-

Estoy muy contenta tanto en el trato con la vendedora, como con los montadores que me escucharon en todo momento, e hicieron las variaciones que les dije sobre la marcha. Además no terminé de pagar hasta que no quedó todo como yo quería (muy bien). -

Raquel - Rivas

-

-
-

(Haz clic en las fotos para verlas en detalle)

-            - -


-            - -
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + +
+ +
+

ARMARIOS

+

Armario Modelo Lira Lacado en color Hueso. Puertas combinadas con decoración en cristal transparente y aspas. Interior 19 mm color crema.

+

Estoy muy contenta tanto en el trato con la vendedora, como con los montadores que me escucharon en todo momento, e hicieron las variaciones que les dije sobre la marcha. Además no terminé de pagar hasta que no quedó todo como yo quería (muy bien). +

Raquel - Rivas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            + +


+            + +
+
+
+ + + + diff --git a/src/trabajos/10-cocina-san-fernando/trabajo_cocina.htm b/src/trabajos/10-cocina-san-fernando/trabajo_cocina.htm index 0f65707..11df647 100644 --- a/src/trabajos/10-cocina-san-fernando/trabajo_cocina.htm +++ b/src/trabajos/10-cocina-san-fernando/trabajo_cocina.htm @@ -1,51 +1,51 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - -
- -
-

COCINA

-

-

Nuestra experiencia con la empresa Estudio Miguelo ha sido muy gratificante, comenzando por los comerciales que en todo momento han estado ayudanto en la confección de los diseños y aportando, como expertos que son, grandes ideas; luego el personal de montaje ha sido también muy efeciente y la calidad de los productos con los que trabajan son estúpendos. Nosotros estabamos tan contentos con el primer producto que contratamos que con ellos, que fue el frente de armario que cuando tuvimos que amueblar la cocina no tuvimos ninguna duda en contratarlo con ellos. -Es un auténtico placer trabajar con ellos, nosotros siempre lo recomendaremos

Vanesa - San Fernando

-

-
-

(Haz clic en las fotos para verlas en detalle)

-            -


-            -


-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + +
+ +
+

COCINA

+

+

Nuestra experiencia con la empresa Estudio Miguelo ha sido muy gratificante, comenzando por los comerciales que en todo momento han estado ayudanto en la confección de los diseños y aportando, como expertos que son, grandes ideas; luego el personal de montaje ha sido también muy efeciente y la calidad de los productos con los que trabajan son estúpendos. Nosotros estabamos tan contentos con el primer producto que contratamos que con ellos, que fue el frente de armario que cuando tuvimos que amueblar la cocina no tuvimos ninguna duda en contratarlo con ellos. +Es un auténtico placer trabajar con ellos, nosotros siempre lo recomendaremos

Vanesa - San Fernando

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            +


+            +


+
+
+
+ + + + diff --git a/src/trabajos/11-reforma-valdebernardo/trabajo_reforma.htm b/src/trabajos/11-reforma-valdebernardo/trabajo_reforma.htm index c7c5523..c5f2692 100644 --- a/src/trabajos/11-reforma-valdebernardo/trabajo_reforma.htm +++ b/src/trabajos/11-reforma-valdebernardo/trabajo_reforma.htm @@ -1,50 +1,50 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - -
- -
-

REFORMA, TECHOS ALUMINIO Y COCINA

-

-



Fátima - Valdebernardo

-

-
-

(Haz clic en las fotos para verlas en detalle)

-            -


-            -


-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + +
+ +
+

REFORMA, TECHOS ALUMINIO Y COCINA

+

+



Fátima - Valdebernardo

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            +


+            +


+
+
+
+ + + + diff --git a/src/trabajos/12-cocina-rivas/trabajo_cocina.htm b/src/trabajos/12-cocina-rivas/trabajo_cocina.htm index dcee206..5b13f71 100644 --- a/src/trabajos/12-cocina-rivas/trabajo_cocina.htm +++ b/src/trabajos/12-cocina-rivas/trabajo_cocina.htm @@ -1,48 +1,48 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - -
- -
-

COCINA

-

-

Es un servicio totalmente recomendable ya que te olvidas de todo. Únicamente tienes que preocuparte de elegir el diseño que más te gusta ya que del resto se encargan ellos. Agradables en trato y profesionales 100%. Si tuviera otra cocina, ¡¡repetiría!!

Luis - Rivas

-

-
-

(Haz clic en las fotos para verlas en detalle)

-            -


-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + +
+ +
+

COCINA

+

+

Es un servicio totalmente recomendable ya que te olvidas de todo. Únicamente tienes que preocuparte de elegir el diseño que más te gusta ya que del resto se encargan ellos. Agradables en trato y profesionales 100%. Si tuviera otra cocina, ¡¡repetiría!!

Luis - Rivas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            +


+
+
+
+ + + + diff --git a/src/trabajos/13-reforma-mejorada-campo/trabajo_cocina_bano_armario.html b/src/trabajos/13-reforma-mejorada-campo/trabajo_cocina_bano_armario.html index b91da7f..4da091e 100644 --- a/src/trabajos/13-reforma-mejorada-campo/trabajo_cocina_bano_armario.html +++ b/src/trabajos/13-reforma-mejorada-campo/trabajo_cocina_bano_armario.html @@ -1,53 +1,53 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - -
- -
-

COCINA, BAÑO Y ARMARIO

-

-

Estudio Miguelo se encargó de todo, reforma, cocina, baño, ... les expliqué qué es lo que quería y no tuve más que entregarles las llaves, ellos se ocuparon de todo. El resultado lo veis en las fotos. Pintura con decoraciones, detalles cómo la vitrina para la vajilla, techos de aluminio...
-Desde luego se nota cuando trabajas con profesionales. Mi experiencia fue estupenda.


Marta - Mejorada

-

-
-

(Haz clic en las fotos para verlas en detalle)

-            -


-            -


-            -


-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + +
+ +
+

COCINA, BAÑO Y ARMARIO

+

+

Estudio Miguelo se encargó de todo, reforma, cocina, baño, ... les expliqué qué es lo que quería y no tuve más que entregarles las llaves, ellos se ocuparon de todo. El resultado lo veis en las fotos. Pintura con decoraciones, detalles cómo la vitrina para la vajilla, techos de aluminio...
+Desde luego se nota cuando trabajas con profesionales. Mi experiencia fue estupenda.


Marta - Mejorada

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            +


+            +


+            +


+
+
+
+ + + + diff --git a/src/trabajos/14-bano-pau-vallecas/trabajo_bano.html b/src/trabajos/14-bano-pau-vallecas/trabajo_bano.html index 236d53c..cea1a66 100644 --- a/src/trabajos/14-bano-pau-vallecas/trabajo_bano.html +++ b/src/trabajos/14-bano-pau-vallecas/trabajo_bano.html @@ -1,48 +1,48 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - -
- -
-

COCINA Y REFORMA BAÑO

-

-

Nosotros no podemos tener ninguna queja contra Estudio Miguelo, todo lo contrario, nos atendistéis excelentemente desde el primer día y, fue por esa razón por la que nos decidimos por Estudio Miguelo. La postventa funciona mejor todavía, ya que, siempre que hemos necesitado algo nos lo habéis resuelto al momento.
-También queremos destacar el asesoramiento, ya que, no teníamos ni idea de cómo queríamos la cocina y gracias a vuestra paciencia y experiencia nos ha quedado una cocina que nos encanta por su aspecto y funcionabilidad.


Pablo - Ensanche de Vallecas

-

-
-

(Haz clic en las fotos para verlas en detalle)

-


-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + +
+ +
+

COCINA Y REFORMA BAÑO

+

+

Nosotros no podemos tener ninguna queja contra Estudio Miguelo, todo lo contrario, nos atendistéis excelentemente desde el primer día y, fue por esa razón por la que nos decidimos por Estudio Miguelo. La postventa funciona mejor todavía, ya que, siempre que hemos necesitado algo nos lo habéis resuelto al momento.
+También queremos destacar el asesoramiento, ya que, no teníamos ni idea de cómo queríamos la cocina y gracias a vuestra paciencia y experiencia nos ha quedado una cocina que nos encanta por su aspecto y funcionabilidad.


Pablo - Ensanche de Vallecas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+


+
+
+
+ + + + diff --git a/src/trabajos/2-cocina-pau-vallecas/trabajo_cocina.html b/src/trabajos/2-cocina-pau-vallecas/trabajo_cocina.html index f06f01f..00188c0 100644 --- a/src/trabajos/2-cocina-pau-vallecas/trabajo_cocina.html +++ b/src/trabajos/2-cocina-pau-vallecas/trabajo_cocina.html @@ -35,11 +35,11 @@

(Haz clic en las fotos para verlas en detalle)

-            - +            +


-            - +            +
diff --git a/src/trabajos/3-cocina-rivas/trabajo_cocina.htm b/src/trabajos/3-cocina-rivas/trabajo_cocina.htm new file mode 100644 index 0000000..6e512c3 --- /dev/null +++ b/src/trabajos/3-cocina-rivas/trabajo_cocina.htm @@ -0,0 +1,62 @@ + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

COCINA

+

Modelo Basik Estratificado alto brillo. Color burdeos con encimera en silestone Blanco Glaciar.

+

Queriamos agradecer la atención prestada a Estudio Miguelo por la cantidad +de presupuestos que hicisteis hasta dar con mi cocina ideal, por la +postventa que es algo que os diferencia del resto, cualquier problema que +hemos tenído nos lo habeís solucionado rapidamente y sin tirar balones +fuera, incluso casi dos años después. Si alguien está interesado en cambiar +su cocina no dudeís un segundo, son geniales, para cualquier consulta os +dejo mi mail por si quereis que os comente cosas "jabato24@telefonica.net".

Aída - Rivas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            + +


+ +


+
+
+
+ + + + diff --git a/src/trabajos/3-cocina-rivas/trabajo_cocina.html b/src/trabajos/3-cocina-rivas/trabajo_cocina.html index a0b9845..6e512c3 100644 --- a/src/trabajos/3-cocina-rivas/trabajo_cocina.html +++ b/src/trabajos/3-cocina-rivas/trabajo_cocina.html @@ -1,62 +1,62 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - - -
- -
-

COCINA

-

Modelo Basik Estratificado alto brillo. Color burdeos con encimera en silestone Blanco Glaciar.

-

Queriamos agradecer la atención prestada a Estudio Miguelo por la cantidad -de presupuestos que hicisteis hasta dar con mi cocina ideal, por la -postventa que es algo que os diferencia del resto, cualquier problema que -hemos tenído nos lo habeís solucionado rapidamente y sin tirar balones -fuera, incluso casi dos años después. Si alguien está interesado en cambiar -su cocina no dudeís un segundo, son geniales, para cualquier consulta os -dejo mi mail por si quereis que os comente cosas "jabato24@telefonica.net".

Aída - Rivas

-

-
-

(Haz clic en las fotos para verlas en detalle)

-            - -


- -


-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

COCINA

+

Modelo Basik Estratificado alto brillo. Color burdeos con encimera en silestone Blanco Glaciar.

+

Queriamos agradecer la atención prestada a Estudio Miguelo por la cantidad +de presupuestos que hicisteis hasta dar con mi cocina ideal, por la +postventa que es algo que os diferencia del resto, cualquier problema que +hemos tenído nos lo habeís solucionado rapidamente y sin tirar balones +fuera, incluso casi dos años después. Si alguien está interesado en cambiar +su cocina no dudeís un segundo, son geniales, para cualquier consulta os +dejo mi mail por si quereis que os comente cosas "jabato24@telefonica.net".

Aída - Rivas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            + +


+ +


+
+
+
+ + + + diff --git a/src/trabajos/4-cocina-rivas/trabajo_cocina.htm b/src/trabajos/4-cocina-rivas/trabajo_cocina.htm new file mode 100644 index 0000000..ac7fbd2 --- /dev/null +++ b/src/trabajos/4-cocina-rivas/trabajo_cocina.htm @@ -0,0 +1,56 @@ + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

COCINA

+

+



Efrain - Rivas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            + +


+ +


+
+
+
+ + + + diff --git a/src/trabajos/4-cocina-rivas/trabajo_cocina.html b/src/trabajos/4-cocina-rivas/trabajo_cocina.html index 7da4ef7..ac7fbd2 100644 --- a/src/trabajos/4-cocina-rivas/trabajo_cocina.html +++ b/src/trabajos/4-cocina-rivas/trabajo_cocina.html @@ -1,56 +1,56 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - - -
- -
-

COCINA

-

-



Efrain - Rivas

-

-
-

(Haz clic en las fotos para verlas en detalle)

-            - -


- -


-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

COCINA

+

+



Efrain - Rivas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            + +


+ +


+
+
+
+ + + + diff --git a/src/trabajos/5-cocina-mejorada-campo/trabajo_cocina.htm b/src/trabajos/5-cocina-mejorada-campo/trabajo_cocina.htm new file mode 100644 index 0000000..c33ada4 --- /dev/null +++ b/src/trabajos/5-cocina-mejorada-campo/trabajo_cocina.htm @@ -0,0 +1,54 @@ + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

COCINA

+

+



Eva - Mejorada del Campo

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            + +


+
+
+
+ + + + diff --git a/src/trabajos/5-cocina-mejorada-campo/trabajo_cocina.html b/src/trabajos/5-cocina-mejorada-campo/trabajo_cocina.html index e04a3ae..c33ada4 100644 --- a/src/trabajos/5-cocina-mejorada-campo/trabajo_cocina.html +++ b/src/trabajos/5-cocina-mejorada-campo/trabajo_cocina.html @@ -1,54 +1,54 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - - -
- -
-

COCINA

-

-



Eva - Mejorada del Campo

-

-
-

(Haz clic en las fotos para verlas en detalle)

-            - -


-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

COCINA

+

+



Eva - Mejorada del Campo

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            + +


+
+
+
+ + + + diff --git a/src/trabajos/6-cocina-rivas/trabajo_cocina.htm b/src/trabajos/6-cocina-rivas/trabajo_cocina.htm new file mode 100644 index 0000000..a1376e4 --- /dev/null +++ b/src/trabajos/6-cocina-rivas/trabajo_cocina.htm @@ -0,0 +1,54 @@ + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

COCINA

+

+



Cecilia - Rivas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            + +


+
+
+
+ + + + diff --git a/src/trabajos/6-cocina-rivas/trabajo_cocina.html b/src/trabajos/6-cocina-rivas/trabajo_cocina.html index 408bc53..a1376e4 100644 --- a/src/trabajos/6-cocina-rivas/trabajo_cocina.html +++ b/src/trabajos/6-cocina-rivas/trabajo_cocina.html @@ -1,54 +1,54 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - - -
- -
-

COCINA

-

-



Cecilia - Rivas

-

-
-

(Haz clic en las fotos para verlas en detalle)

-            - -


-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

COCINA

+

+



Cecilia - Rivas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            + +


+
+
+
+ + + + diff --git a/src/trabajos/7-armario-pau-vallecas/trabajo_armarios.htm b/src/trabajos/7-armario-pau-vallecas/trabajo_armarios.htm new file mode 100644 index 0000000..0172719 --- /dev/null +++ b/src/trabajos/7-armario-pau-vallecas/trabajo_armarios.htm @@ -0,0 +1,54 @@ + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

ARMARIO

+

+



Esther - Ensanche de Vallecas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            + +


+
+
+
+ + + + diff --git a/src/trabajos/7-armario-pau-vallecas/trabajo_armarios.html b/src/trabajos/7-armario-pau-vallecas/trabajo_armarios.html index 6d328c2..0172719 100644 --- a/src/trabajos/7-armario-pau-vallecas/trabajo_armarios.html +++ b/src/trabajos/7-armario-pau-vallecas/trabajo_armarios.html @@ -1,54 +1,54 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - - -
- -
-

ARMARIO

-

-



Esther - Ensanche de Vallecas

-

-
-

(Haz clic en las fotos para verlas en detalle)

-            - -


-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

ARMARIO

+

+



Esther - Ensanche de Vallecas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            + +


+
+
+
+ + + + diff --git a/src/trabajos/8-cocina-rivas/trabajo_cocina.htm b/src/trabajos/8-cocina-rivas/trabajo_cocina.htm new file mode 100644 index 0000000..e2ab911 --- /dev/null +++ b/src/trabajos/8-cocina-rivas/trabajo_cocina.htm @@ -0,0 +1,54 @@ + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

COCINA

+

+



Begoña - Rivas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            + +


+
+
+
+ + + + diff --git a/src/trabajos/8-cocina-rivas/trabajo_cocina.html b/src/trabajos/8-cocina-rivas/trabajo_cocina.html index ebb15f3..e36c40f 100644 --- a/src/trabajos/8-cocina-rivas/trabajo_cocina.html +++ b/src/trabajos/8-cocina-rivas/trabajo_cocina.html @@ -1,49 +1,49 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - -
- -
-

COCINA

-

-



Begoña - Rivas

-

-
-

(Haz clic en las fotos para verlas en detalle)

-            - -


-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + +
+ +
+

COCINA

+

+



Begoña - Rivas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            + +


+
+
+
+ + + + diff --git a/src/trabajos/9-cocina-rivas/trabajo_cocina.htm b/src/trabajos/9-cocina-rivas/trabajo_cocina.htm new file mode 100644 index 0000000..ed3de86 --- /dev/null +++ b/src/trabajos/9-cocina-rivas/trabajo_cocina.htm @@ -0,0 +1,55 @@ + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + + +
+ +
+

COCINA

+

+



Jesús - Rivas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            +


+ +


+
+
+
+ + + + diff --git a/src/trabajos/9-cocina-rivas/trabajo_cocina.html b/src/trabajos/9-cocina-rivas/trabajo_cocina.html index 914ae54..18fdf0b 100644 --- a/src/trabajos/9-cocina-rivas/trabajo_cocina.html +++ b/src/trabajos/9-cocina-rivas/trabajo_cocina.html @@ -1,50 +1,50 @@ - - - - - - -Estudio de diseño y decoración Miguelo. - - - - - - - - - -
- -
-

COCINA

-

-



Jesús - Rivas

-

-
-

(Haz clic en las fotos para verlas en detalle)

-            -


- -


-
-
-
- - - - + + + + + + +Estudio de diseño y decoración Miguelo. + + + + + + + + + +
+ +
+

COCINA

+

+



Jesús - Rivas

+

+
+

(Haz clic en las fotos para verlas en detalle)

+            +


+ +


+
+
+
+ + + + diff --git a/src/video/css/videobox.css b/src/video/css/videobox.css index 2b8d88c..14208d4 100644 --- a/src/video/css/videobox.css +++ b/src/video/css/videobox.css @@ -1,74 +1,74 @@ -body {margin: 0;} -#lbOverlay { - position: absolute; - left: 0; - width: 100%; - background-color: #000; - cursor: pointer; -} - -#lbCenter, #lbBottomContainer { - position: absolute; - left: 50%; - overflow: hidden; - background-color: #fff; text-align: center; padding: 5px; -} - -.lbLoading { - background: #fff url(loading.gif) no-repeat center; -} - -#lbImage { - border: 10px solid #fff; -} - -#lbPrevLink, #lbNextLink { - display: block; - position: absolute; - top: 0; - width: 50%; - outline: none; -} - -#lbPrevLink { - left: 0; -} - -#lbPrevLink:hover { - background: transparent url(prevlabel.gif) no-repeat 0% 15%; -} - -#lbNextLink { - right: 0; -} - -#lbNextLink:hover { - background: transparent url(nextlabel.gif) no-repeat 100% 15%; -} - -#lbBottom { - font-family: Verdana, Helvetica, sans-serif; - font-size: 10px; - color: #666; - line-height: 1.4em; - text-align: left; - border: 5px solid #fff; - border-top-style: none; -} - -#lbCloseLink { - display: block; - float: right; - width: 66px; - height: 22px; - background: transparent url(closelabel.gif) no-repeat center; - margin: 5px 0; -} - -#lbCaption, #lbNumber { - margin-right: 71px; -} - -#lbCaption { - font-weight: bold; -} +body {margin: 0;} +#lbOverlay { + position: absolute; + left: 0; + width: 100%; + background-color: #000; + cursor: pointer; +} + +#lbCenter, #lbBottomContainer { + position: absolute; + left: 50%; + overflow: hidden; + background-color: #fff; text-align: center; padding: 5px; +} + +.lbLoading { + background: #fff url(loading.gif) no-repeat center; +} + +#lbImage { + border: 10px solid #fff; +} + +#lbPrevLink, #lbNextLink { + display: block; + position: absolute; + top: 0; + width: 50%; + outline: none; +} + +#lbPrevLink { + left: 0; +} + +#lbPrevLink:hover { + background: transparent url(prevlabel.gif) no-repeat 0% 15%; +} + +#lbNextLink { + right: 0; +} + +#lbNextLink:hover { + background: transparent url(nextlabel.gif) no-repeat 100% 15%; +} + +#lbBottom { + font-family: Verdana, Helvetica, sans-serif; + font-size: 10px; + color: #666; + line-height: 1.4em; + text-align: left; + border: 5px solid #fff; + border-top-style: none; +} + +#lbCloseLink { + display: block; + float: right; + width: 66px; + height: 22px; + background: transparent url(closelabel.gif) no-repeat center; + margin: 5px 0; +} + +#lbCaption, #lbNumber { + margin-right: 71px; +} + +#lbCaption { + font-weight: bold; +} diff --git a/src/video/js/mootools.js b/src/video/js/mootools.js index 7f1d9d3..50295a3 100644 --- a/src/video/js/mootools.js +++ b/src/video/js/mootools.js @@ -1,3 +1,3 @@ -//MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006 Valerio Proietti, , MIT Style License. - -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('o ci={cj:\'1.11\'};k $77(N){m(N!=9N)};k $F(N){B(!$77(N))m O;B(N.5i)m\'G\';o F=7c N;B(F==\'2I\'&&N.ch){22(N.84){Y 1:m\'G\';Y 3:m(/\\S/).2v(N.ax)?\'cg\':\'cd\'}}B(F==\'2I\'||F==\'k\'){22(N.9C){Y 2t:m\'1z\';Y 7y:m\'5C\';Y 18:m\'4R\'}B(7c N.V==\'4M\'){B(N.3r)m\'ce\';B(N.8t)m\'1b\'}}m F};k $2a(){o 54={};M(o i=0;i<1b.V;i++){M(o K 1a 1b[i]){o ap=1b[i][K];o 6d=54[K];B(6d&&$F(ap)==\'2I\'&&$F(6d)==\'2I\')54[K]=$2a(6d,ap);14 54[K]=ap}}m 54};o $R=k(){o 1p=1b;B(!1p[1])1p=[c,1p[0]];M(o K 1a 1p[1])1p[0][K]=1p[1][K];m 1p[0]};o $5e=k(){M(o i=0,l=1b.V;i-1:c.3k(2z)>-1},b5:k(){m c.3g(/([.*+?^${}()|[\\]\\/\\\\])/g,\'\\\\$1\')}});2t.R({5E:k(1z){B(c.V<3)m O;B(c.V==4&&c[3]==0&&!1z)m\'c2\';o 3C=[];M(o i=0;i<3;i++){o 5d=(c[i]-0).4l(16);3C.1k((5d.V==1)?\'0\'+5d:5d)}m 1z?3C:\'#\'+3C.2c(\'\')},5G:k(1z){B(c.V!=3)m O;o 1s=[];M(o i=0;i<3;i++){1s.1k(5O((c[i].V==1)?c[i]+c[i]:c[i],16))}m 1z?1s:\'1s(\'+1s.2c(\',\')+\')\'}});7Z.R({3a:k(C){o fn=c;C=$2a({\'W\':fn,\'I\':O,\'1b\':1n,\'2g\':O,\'4f\':O,\'6f\':O},C);B($2A(C.1b)&&$F(C.1b)!=\'1z\')C.1b=[C.1b];m k(I){o 1p;B(C.I){I=I||U.I;1p=[(C.I===1e)?I:L C.I(I)];B(C.1b)1p.R(C.1b)}14 1p=C.1b||1b;o 3N=k(){m fn.4j($4T(C.W,fn),1p)};B(C.2g)m 9M(3N,C.2g);B(C.4f)m c3(3N,C.4f);B(C.6f)5j{m 3N()}5c(c9){m O};m 3N()}},bT:k(1p,W){m c.3a({\'1b\':1p,\'W\':W})},6f:k(1p,W){m c.3a({\'1b\':1p,\'W\':W,\'6f\':1e})()},W:k(W,1p){m c.3a({\'W\':W,\'1b\':1p})},c8:k(W,1p){m c.3a({\'W\':W,\'I\':1e,\'1b\':1p})},2g:k(2g,W,1p){m c.3a({\'2g\':2g,\'W\':W,\'1b\':1p})()},4f:k(aV,W,1p){m c.3a({\'4f\':aV,\'W\':W,\'1b\':1p})()}});aN.R({3d:k(){m 5O(c)},aH:k(){m 66(c)},1F:k(3s,1D){m 1c.3s(1D,1c.1D(3s,c))},2q:k(5Y){5Y=1c.3w(10,5Y||0);m 1c.2q(c*5Y)/5Y},c7:k(fn){M(o i=0;i\'}el=Q.aJ(el)}el=$(el);m(!1U||!el)?el:el.2j(1U)}});o 26=L 18({1i:k(T){m(T)?$R(T,c):c}});26.R=k(1U){M(o 1V 1a 1U){c.1L[1V]=1U[1V];c[1V]=$5e.6x(1V)}};k $(el){B(!el)m 1n;B(el.5i)m 2F.52(el);B([U,Q].1j(el))m el;o F=$F(el);B(F==\'2z\'){el=Q.6W(el);F=(el)?\'G\':O}B(F!=\'G\')m 1n;B(el.5i)m 2F.52(el);B([\'2I\',\'c4\'].1j(el.6S.5L()))m el;$R(el,P.1L);el.5i=k(){};m 2F.52(el)};Q.6Y=Q.33;k $$(){o T=[];M(o i=0,j=1b.V;i0&&6Q<13)c.1t=\'f\'+6Q}c.1t=c.1t||6i.bA(c.6O).5L()}14 B(c.F.2v(/(6h|3m|bw)/)){c.1Y={\'x\':I.8E||I.9f+Q.2Z.5V,\'y\':I.8w||I.at+Q.2Z.63};c.9B={\'x\':I.8E?I.8E-U.99:I.9f,\'y\':I.8w?I.8w-U.9i:I.at};c.bR=(I.9K==3)||(I.bv==2);22(c.F){Y\'90\':c.2o=I.2o||I.ca;1C;Y\'8Y\':c.2o=I.2o||I.8A}c.aU()}m c},1R:k(){m c.6U().6X()},6U:k(){B(c.I.6U)c.I.6U();14 c.I.db=1e;m c},6X:k(){B(c.I.6X)c.I.6X();14 c.I.eK=O;m c}});2X.6m={2o:k(){B(c.2o&&c.2o.84==3)c.2o=c.2o.3n},aD:k(){5j{2X.6m.2o.1X(c)}5c(e){c.2o=c.3v}}};2X.1L.aU=(U.8r)?2X.6m.aD:2X.6m.2o;2X.1O=L 3M({\'eL\':13,\'6P\':38,\'eJ\':40,\'1u\':37,\'4n\':39,\'eI\':27,\'eF\':32,\'eG\':8,\'eH\':9,\'57\':46});P.2H.2p={1B:k(F,fn){c.$19=c.$19||{};c.$19[F]=c.$19[F]||{\'1O\':[],\'1I\':[]};B(c.$19[F].1O.1j(fn))m c;c.$19[F].1O.1k(fn);o 76=F;o 2w=P.2p[F];B(2w){B(2w.7F)2w.7F.1X(c,fn);B(2w.2D)fn=2w.2D;B(2w.F)76=2w.F}B(!c.8j)fn=fn.3a({\'W\':c,\'I\':1e});c.$19[F].1I.1k(fn);m(P.8V.1j(76))?c.2C(76,fn):c},4C:k(F,fn){B(!c.$19||!c.$19[F])m c;o 1m=c.$19[F].1O.3k(fn);B(1m==-1)m c;o 1t=c.$19[F].1O.74(1m,1)[0];o J=c.$19[F].1I.74(1m,1)[0];o 2w=P.2p[F];B(2w){B(2w.2K)2w.2K.1X(c,fn);B(2w.F)F=2w.F}m(P.8V.1j(F))?c.3h(F,J):c},6j:k(1Z){m P.72(c,\'1B\',1Z)},78:k(F){B(!c.$19)m c;B(!F){M(o 6g 1a c.$19)c.78(6g);c.$19=1n}14 B(c.$19[F]){c.$19[F].1O.1q(k(fn){c.4C(F,fn)},c);c.$19[F]=1n}m c},1h:k(F,1p,2g){B(c.$19&&c.$19[F]){c.$19[F].1O.1q(k(fn){fn.3a({\'W\':c,\'2g\':2g,\'1b\':1p})()},c)}m c},au:k(15,F){B(!15.$19)m c;B(!F){M(o 6g 1a 15.$19)c.au(15,6g)}14 B(15.$19[F]){15.$19[F].1O.1q(k(fn){c.1B(F,fn)},c)}m c}};U.R(P.2H.2p);Q.R(P.2H.2p);P.R(P.2H.2p);P.2p=L 3M({\'8N\':{F:\'90\',2D:k(I){I=L 2X(I);B(I.2o!=c&&!c.8o(I.2o))c.1h(\'8N\',I)}},\'8P\':{F:\'8Y\',2D:k(I){I=L 2X(I);B(I.2o!=c&&!c.8o(I.2o))c.1h(\'8P\',I)}},\'5a\':{F:(U.8r)?\'8b\':\'5a\'}});P.8V=[\'6h\',\'eM\',\'5z\',\'5n\',\'5a\',\'8b\',\'90\',\'8Y\',\'2M\',\'9X\',\'eN\',\'eS\',\'4e\',\'7v\',\'9t\',\'eT\',\'5o\',\'eR\',\'eQ\',\'3F\',\'eO\',\'eP\',\'48\',\'aE\',\'8s\',\'eE\',\'2G\'];7Z.R({3e:k(W,1p){m c.3a({\'W\':W,\'1b\':1p,\'I\':2X})}});26.R({eV:k(3q){m L 26(c.36(k(el){m(P.4D(el)==3q)}))},a8:k(1A,2J){o T=c.36(k(el){m(el.1A&&el.1A.1j(1A,\' \'))});m(2J)?T:L 26(T)},a2:k(4u,2J){o T=c.36(k(el){m(el.4u==4u)});m(2J)?T:L 26(T)},a9:k(1w,82,J,2J){o T=c.36(k(el){o 2i=P.5R(el,1w);B(!2i)m O;B(!82)m 1e;22(82){Y\'=\':m(2i==J);Y\'*=\':m(2i.1j(J));Y\'^=\':m(2i.6K(0,J.V)==J);Y\'$=\':m(2i.6K(2i.V-J.V)==J);Y\'!=\':m(2i!=J);Y\'~=\':m 2i.1j(J,\' \')}m O});m(2J)?T:L 26(T)}});k $E(1S,36){m($(36)||Q).9P(1S)};k $et(1S,36){m($(36)||Q).6Y(1S)};$$.3B={\'5C\':/^(\\w*|\\*)(?:#([\\w-]+)|\\.([\\w-]+))?(?:\\[(\\w+)(?:([!*^$]?=)["\']?([^"\'\\]]*)["\']?)?])?$/,\'4a\':{7L:k(1x,3b,1d,i){o 2r=[3b.eu?\'7N:\':\'\',1d[1]];B(1d[2])2r.1k(\'[@4u="\',1d[2],\'"]\');B(1d[3])2r.1k(\'[1j(7P(" ", @4R, " "), " \',1d[3],\' ")]\');B(1d[4]){B(1d[5]&&1d[6]){22(1d[5]){Y\'*=\':2r.1k(\'[1j(@\',1d[4],\', "\',1d[6],\'")]\');1C;Y\'^=\':2r.1k(\'[es-er(@\',1d[4],\', "\',1d[6],\'")]\');1C;Y\'$=\':2r.1k(\'[eo(@\',1d[4],\', 2z-V(@\',1d[4],\') - \',1d[6].V,\' + 1) = "\',1d[6],\'"]\');1C;Y\'=\':2r.1k(\'[@\',1d[4],\'="\',1d[6],\'"]\');1C;Y\'!=\':2r.1k(\'[@\',1d[4],\'!="\',1d[6],\'"]\')}}14{2r.1k(\'[@\',1d[4],\']\')}}1x.1k(2r.2c(\'\'));m 1x},7O:k(1x,3b,2J){o T=[];o 4a=Q.5r(\'.//\'+1x.2c(\'//\'),3b,$$.3B.ac,ep.eq,1n);M(o i=0,j=4a.ev;i<\\/2s>\');$(\'7I\').7i=k(){B(c.5m==\'8p\')5X()}}}14{U.2C("4e",5X);Q.2C("fe",5X)}}};U.fm=k(fn){m c.1B(\'7S\',fn)};U.R({8m:k(){B(c.5x)m c.fl;B(c.9a)m Q.4B.9c;m Q.2Z.9c},8n:k(){B(c.5x)m c.fo;B(c.9a)m Q.4B.9d;m Q.2Z.9d},93:k(){B(c.2P)m 1c.1D(Q.2Z.4b,Q.2Z.71);B(c.4x)m Q.4B.71;m Q.2Z.71},92:k(){B(c.2P)m 1c.1D(Q.2Z.3R,Q.2Z.5P);B(c.4x)m Q.4B.5P;m Q.2Z.5P},8u:k(){m c.99||Q.2Z.5V},8v:k(){m c.9i||Q.2Z.63},7g:k(){m{\'3l\':{\'x\':c.8m(),\'y\':c.8n()},\'7h\':{\'x\':c.93(),\'y\':c.92()},\'2G\':{\'x\':c.8u(),\'y\':c.8v()}}},3p:k(){m{\'x\':0,\'y\':0}}});o 1f={};1f.2T=L 18({C:{3X:18.1l,1Q:18.1l,7w:18.1l,2f:k(p){m-(1c.av(1c.7W*p)-1)/2},49:fb,2x:\'4W\',3T:1e,98:50},1i:k(C){c.G=c.G||1n;c.2Y(C);B(c.C.1i)c.C.1i.1X(c)},2n:k(){o 3A=$3A();B(3A=(7-4*a)/11){J=-1c.3w((11-6*a-11*p)/4,2)+b*b;1C}}m J},ds:k(p,x){m 1c.3w(2,10*--p)*1c.av(20*p*1c.7W*(x[0]||1)/3)}});[\'dt\',\'dz\',\'dA\',\'dG\'].1q(k(2f,i){1f.3o[2f]=L 1f.7U(k(p){m 1c.3w(p,[i+2])});1f.3o.7X(2f)});o 4g={};4g.2T=L 18({C:{3J:O,2x:\'4W\',3X:18.1l,al:18.1l,1Q:18.1l,as:18.1l,8S:18.1l,1F:O,3E:{x:\'1u\',y:\'1o\'},4P:O,6M:6},1i:k(el,C){c.2Y(C);c.G=$(el);c.3J=$(c.C.3J)||c.G;c.3m={\'12\':{},\'1m\':{}};c.J={\'1g\':{},\'12\':{}};c.1G={\'1g\':c.1g.3e(c),\'4i\':c.4i.3e(c),\'3D\':c.3D.3e(c),\'1R\':c.1R.W(c)};c.6V();B(c.C.1i)c.C.1i.1X(c)},6V:k(){c.3J.1B(\'5n\',c.1G.1g);m c},9F:k(){c.3J.4C(\'5n\',c.1G.1g);m c},1g:k(I){c.1h(\'al\',c.G);c.3m.1g=I.1Y;o 1F=c.C.1F;c.1F={\'x\':[],\'y\':[]};M(o z 1a c.C.3E){B(!c.C.3E[z])6l;c.J.12[z]=c.G.2h(c.C.3E[z]).3d();c.3m.1m[z]=I.1Y[z]-c.J.12[z];B(1F&&1F[z]){M(o i=0;i<2;i++){B($2A(1F[z][i]))c.1F[z][i]=($F(1F[z][i])==\'k\')?1F[z][i]():1F[z][i]}}}B($F(c.C.4P)==\'4M\')c.C.4P={\'x\':c.C.4P,\'y\':c.C.4P};Q.2C(\'2M\',c.1G.4i);Q.2C(\'5z\',c.1G.1R);c.1h(\'3X\',c.G);I.1R()},4i:k(I){o ao=1c.2q(1c.dH(1c.3w(I.1Y.x-c.3m.1g.x,2)+1c.3w(I.1Y.y-c.3m.1g.y,2)));B(ao>c.C.6M){Q.3h(\'2M\',c.1G.4i);Q.2C(\'2M\',c.1G.3D);c.3D(I);c.1h(\'as\',c.G)}I.1R()},3D:k(I){c.69=O;c.3m.12=I.1Y;M(o z 1a c.C.3E){B(!c.C.3E[z])6l;c.J.12[z]=c.3m.12[z]-c.3m.1m[z];B(c.1F[z]){B($2A(c.1F[z][1])&&(c.J.12[z]>c.1F[z][1])){c.J.12[z]=c.1F[z][1];c.69=1e}14 B($2A(c.1F[z][0])&&(c.J.12[z]el.1u&&12.xel.1o)},1R:k(){B(c.3f&&!c.69)c.3f.1h(\'dC\',[c.G,c]);14 c.G.1h(\'dD\',c);c.1r();m c}});P.R({dq:k(C){m L 4g.aM(c,C)}});o 6n=L 18({C:{23:\'59\',be:1e,9g:18.1l,5h:18.1l,6w:18.1l,aG:1e,5J:\'dp-8\',aZ:O,4J:{}},7q:k(){c.2u=(U.6C)?L 6C():(U.2P?L 9o(\'en.dc\'):O);m c},1i:k(C){c.7q().2Y(C);c.C.5D=c.C.5D||c.5D;c.4J={};B(c.C.aG&&c.C.23==\'59\'){o 5J=(c.C.5J)?\'; dd=\'+c.C.5J:\'\';c.5l(\'9R-F\',\'9J/x-aS-da-d9\'+5J)}B(c.C.1i)c.C.1i.1X(c)},9s:k(){B(c.2u.5m!=4||!c.4Q)m;c.4Q=O;o 4I=0;5j{4I=c.2u.4I}5c(e){};B(c.C.5D.1X(c,4I))c.5h();14 c.6w();c.2u.7i=18.1l},5D:k(4I){m((4I>=d6)&&(4I]*>([\\s\\S]*?)<\\/2s>/dJ;6Z((2s=5C.e9(c.3L.1K)))3y.1k(2s[1]);3y=3y.2c(\'\\n\')}B(3y)(U.9O)?U.9O(3y):U.9M(3y,0)},af:k(1w){5j{m c.2u.ea(1w)}5c(e){};m 1n}});8X.5A=k(1Z){o 5f=[];M(o K 1a 1Z)5f.1k(7e(K)+\'=\'+7e(1Z[K]));m 5f.2c(\'&\')};P.R({6a:k(C){m L 9b(c.5R(\'eb\'),$2a({1T:c.5A()},C,{23:\'59\'})).9h()}});o 3H=L 3M({C:{7o:O,7k:O,49:O,5g:O},2j:k(1t,J,C){C=$2a(c.C,C);J=7e(J);B(C.7o)J+=\'; 7o=\'+C.7o;B(C.7k)J+=\'; 7k=\'+C.7k;B(C.49){o 6k=L 96();6k.e8(6k.9w()+C.49*24*60*60*bd);J+=\'; e7=\'+6k.e4()}B(C.5g)J+=\'; 5g\';Q.4K=1t+\'=\'+J;m $R(C,{\'1t\':1t,\'J\':J})},5q:k(1t){o J=Q.4K.31(\'(?:^|;)\\\\s*\'+1t.b5()+\'=([^;]*)\');m J?e5(J[1]):O},2K:k(4K,C){B($F(4K)==\'2I\')c.2j(4K.1t,\'\',$2a(4K,{49:-1}));14 c.2j(4K,\'\',$2a(C,{49:-1}))}});o 3I={4l:k(N){22($F(N)){Y\'2z\':m\'"\'+N.3g(/(["\\\\])/g,\'\\\\$1\')+\'"\';Y\'1z\':m\'[\'+N.2D(3I.4l).2c(\',\')+\']\';Y\'2I\':o 2z=[];M(o K 1a N)2z.1k(3I.4l(K)+\':\'+3I.4l(N[K]));m\'{\'+2z.2c(\',\')+\'}\';Y\'4M\':B(e6(N))1C;Y O:m\'1n\'}m 6i(N)},5r:k(4H,5g){m(($F(4H)!=\'2z\')||(5g&&!4H.2v(/^("(\\\\.|[^"\\\\\\n\\r])*?"|[,:{}\\[\\]0-9.\\-+ec-u \\n\\r\\t])+?$/)))?1n:ed(\'(\'+4H+\')\')}};3I.ej=6n.R({1i:k(2L,C){c.2L=2L;c.1B(\'5h\',c.1Q);c.1r(C);c.5l(\'X-ek\',\'ei\')},6a:k(N){m c.1r(c.2L,\'eh=\'+3I.4l(N))},1Q:k(){c.1h(\'1Q\',[3I.5r(c.3L.1K,c.C.5g)])}});o ar=L 3M({8q:k(1Z,1J){1J=$2a({\'5N\':18.1l},1J);o 2s=L P(\'2s\',{\'4s\':1Z}).6j({\'4e\':1J.5N,\'ee\':k(){B(c.5m==\'8p\')c.1h(\'4e\')}});57 1J.5N;m 2s.6o(1J).28(Q.6e)},1y:k(1Z,1J){m L P(\'4y\',$2a({\'a1\':\'ef\',\'eg\':\'e3\',\'F\':\'1K/1y\',\'4N\':1Z},1J)).28(Q.6e)},4S:k(1Z,1J){1J=$2a({\'5N\':18.1l,\'e2\':18.1l,\'dP\':18.1l},1J);o 4S=L dQ();4S.4s=1Z;o G=L P(\'8x\',{\'4s\':1Z});[\'4e\',\'8s\',\'aE\'].1q(k(F){o I=1J[\'67\'+F];57 1J[\'67\'+F];G.1B(F,k(){c.4C(F,1b.8t);I.1X(c)})});B(4S.2y&&4S.2N)G.1h(\'4e\',G,1);m G.6o(1J)},6s:k(58,C){C=$2a({1Q:18.1l,an:18.1l},C);B(!58.1k)58=[58];o 6s=[];o 6q=0;58.1q(k(1Z){o 8x=L ar.4S(1Z,{\'5N\':k(){C.an.1X(c,6q);6q++;B(6q==58.V)C.1Q()}});6s.1k(8x)});m L 26(6s)}});o 3O=L 18({V:0,1i:k(2I){c.N=2I||{};c.5K()},5q:k(1t){m(c.6t(1t))?c.N[1t]:1n},6t:k(1t){m(1t 1a c.N)},2j:k(1t,J){B(!c.6t(1t))c.V++;c.N[1t]=J;m c},5K:k(){c.V=0;M(o p 1a c.N)c.V++;m c},2K:k(1t){B(c.6t(1t)){57 c.N[1t];c.V--}m c},1q:k(fn,W){$1q(c.N,fn,W)},R:k(N){$R(c.N,N);m c.5K()},2a:k(){c.N=$2a.4j(1n,[c.N].R(1b));m c.5K()},1l:k(){c.N={};c.V=0;m c},1O:k(){o 1O=[];M(o K 1a c.N)1O.1k(K);m 1O},1I:k(){o 1I=[];M(o K 1a c.N)1I.1k(c.N[K]);m 1I}});k $H(N){m L 3O(N)};3O.3H=3O.R({1i:k(1w,C){c.1w=1w;c.C=$R({\'aw\':1e},C||{});c.4e()},aX:k(){B(c.V==0){3H.2K(c.1w,c.C);m 1e}o 4H=3I.4l(c.N);B(4H.V>dR)m O;3H.2j(c.1w,4H,c.C);m 1e},4e:k(){c.N=3I.5r(3H.5q(c.1w),1e)||{};c.5K()}});3O.3H.2H={};[\'R\',\'2j\',\'2a\',\'1l\',\'2K\'].1q(k(23){3O.3H.2H[23]=k(){3O.1L[23].4j(c,1b);B(c.C.aw)c.aX();m c}});3O.3H.3i(3O.3H.2H);o 2Q=L 18({1i:k(2E,F){F=F||(2E.1k?\'1s\':\'3C\');o 1s,2m;22(F){Y\'1s\':1s=2E;2m=1s.8h();1C;Y\'2m\':1s=2E.b9();2m=2E;1C;62:1s=2E.5G(1e);2m=1s.8h()}1s.2m=2m;1s.3C=1s.5E();m $R(1s,2Q.1L)},54:k(){o 5I=$A(1b);o 7d=($F(5I[5I.V-1])==\'4M\')?5I.dO():50;o 1s=c.8e();5I.1q(k(2E){2E=L 2Q(2E);M(o i=0;i<3;i++)1s[i]=1c.2q((1s[i]/ 35 * (35 - 7d)) + (2E[i] /35*7d))});m L 2Q(1s,\'1s\')},dN:k(){m L 2Q(c.2D(k(J){m 51-J}))},dK:k(J){m L 2Q([J,c.2m[1],c.2m[2]],\'2m\')},dL:k(7a){m L 2Q([c.2m[0],7a,c.2m[2]],\'2m\')},dM:k(7a){m L 2Q([c.2m[0],c.2m[1],7a],\'2m\')}});k $dS(r,g,b){m L 2Q([r,g,b],\'1s\')};k $dT(h,s,b){m L 2Q([h,s,b],\'2m\')};2t.R({8h:k(){o 5W=c[0],65=c[1],75=c[2];o 2W,6y,8k;o 1D=1c.1D(5W,65,75),3s=1c.3s(5W,65,75);o 4p=1D-3s;8k=1D/51;6y=(1D!=0)?4p/1D:0;B(6y==0){2W=0}14{o 8l=(1D-5W)/4p;o 8W=(1D-65)/4p;o br=(1D-75)/4p;B(5W==1D)2W=br-8W;14 B(65==1D)2W=2+8l-br;14 2W=4+8W-8l;2W/=6;B(2W<0)2W++}m[1c.2q(2W*bc),1c.2q(6y*35),1c.2q(8k*35)]},b9:k(){o br=1c.2q(c[2]/35*51);B(c[1]==0){m[br,br,br]}14{o 2W=c[0]%bc;o f=2W%60;o p=1c.2q((c[2]*(35-c[1]))/dZ*51);o q=1c.2q((c[2]*(b7-c[1]*f))/bm*51);o t=1c.2q((c[2]*(b7-c[1]*(60-f)))/bm*51);22(1c.9q(2W/60)){Y 0:m[br,t,p];Y 1:m[q,br,p];Y 2:m[p,br,t];Y 3:m[p,q,br];Y 4:m[t,p,br];Y 5:m[br,p,q]}}m O}});o 9x=L 18({C:{6b:20,8O:1,6F:k(x,y){c.G.3G(x,y)}},1i:k(G,C){c.2Y(C);c.G=$(G);c.8y=([U,Q].1j(G))?$(Q.4B):c.G},1g:k(){c.8z=c.9A.3e(c);c.8y.2C(\'2M\',c.8z)},1R:k(){c.8y.3h(\'2M\',c.8z);c.1H=$55(c.1H)},9A:k(I){c.1Y=(c.G==U)?I.9B:I.1Y;B(!c.1H)c.1H=c.2G.4f(50,c)},2G:k(){o el=c.G.7g();o 1m=c.G.3p();o 3F={\'x\':0,\'y\':0};M(o z 1a c.1Y){B(c.1Y[z]<(c.C.6b+1m[z])&&el.2G[z]!=0)3F[z]=(c.1Y[z]-c.C.6b-1m[z])*c.C.8O;14 B(c.1Y[z]+c.C.6b>(el.3l[z]+1m[z])&&el.2G[z]+el.3l[z]!=el.7h[z])3F[z]=(c.1Y[z]-el.3l[z]+c.C.6b-1m[z])*c.C.8O}B(3F.y||3F.x)c.1h(\'6F\',[el.2G.x+3F.x,el.2G.y+3F.y])}});9x.3i(L 2p,L 43);o 8B=L 18({C:{6F:18.1l,1Q:18.1l,8L:k(1m){c.4h.1P(c.p,1m)},2b:\'8M\',6E:35,1E:0},1i:k(el,4h,C){c.G=$(el);c.4h=$(4h);c.2Y(C);c.8K=-1;c.8D=-1;c.2n=-1;c.G.1B(\'5n\',c.9D.3e(c));o 6H,1E;22(c.C.2b){Y\'8M\':c.z=\'x\';c.p=\'1u\';6H={\'x\':\'1u\',\'y\':O};1E=\'4b\';1C;Y\'8Q\':c.z=\'y\';c.p=\'1o\';6H={\'x\':O,\'y\':\'1o\'};1E=\'3R\'}c.1D=c.G[1E]-c.4h[1E]+(c.C.1E*2);c.a5=c.4h[1E]/2;c.ai=c.G[\'5q\'+c.p.8R()].W(c.G);c.4h.1P(\'1v\',\'70\').1P(c.p,-c.C.1E);o 8U={};8U[c.z]=[-c.C.1E,c.1D-c.C.1E];c.3D=L 4g.2T(c.4h,{1F:8U,3E:6H,6M:0,3X:k(){c.6L()}.W(c),8S:k(){c.6L()}.W(c),1Q:k(){c.6L();c.29()}.W(c)});B(c.C.1i)c.C.1i.1X(c)},2j:k(2n){c.2n=2n.1F(0,c.C.6E);c.6G();c.29();c.1h(\'8L\',c.a0(c.2n));m c},9D:k(I){o 1v=I.1Y[c.z]-c.ai()-c.a5;1v=1v.1F(-c.C.1E,c.1D-c.C.1E);c.2n=c.8C(1v);c.6G();c.29();c.1h(\'8L\',1v)},6L:k(){c.2n=c.8C(c.3D.J.12[c.z]);c.6G()},6G:k(){B(c.8K!=c.2n){c.8K=c.2n;c.1h(\'6F\',c.2n)}},29:k(){B(c.8D!==c.2n){c.8D=c.2n;c.1h(\'1Q\',c.2n+\'\')}},8C:k(1v){m 1c.2q((1v+c.C.1E)/c.1D*c.C.6E)},a0:k(2n){m c.1D*2n/c.C.6E}});8B.3i(L 2p);8B.3i(L 43);o e0=1f.ah.R({1i:k(C){c.1r(U,C);c.5w=(c.C.5w)?$$(c.C.5w):$$(Q.5w);o 5k=U.5k.4N.31(/^[^#]*/)[0]+\'#\';c.5w.1q(k(4y){B(4y.4N.3k(5k)!=0)m;o 3K=4y.4N.6K(5k.V);B(3K&&$(3K))c.9L(4y,3K)},c);B(!U.5x)c.1B(\'1Q\',k(){U.5k.e1=c.3K})},9L:k(4y,3K){4y.1B(\'6h\',k(I){c.3K=3K;c.8A(3K);I.1R()}.3e(c))}});o 9S=L 18({C:{4L:O,3X:18.1l,1Q:18.1l,2S:1e,6M:3,9H:k(G,2S){2S.1P(\'21\',0.7);G.1P(\'21\',0.7)},9e:k(G,2S){G.1P(\'21\',1);2S.2K();c.3V.2K()}},1i:k(5p,C){c.2Y(C);c.5p=$(5p);c.T=c.5p.8H();c.4L=(c.C.4L)?$$(c.C.4L):c.T;c.1G={\'1g\':[],\'5y\':c.5y.3e(c)};M(o i=0,l=c.4L.V;i0);o 6T=c.4G.9W();o 3x=c.4G.8I();B(6T&&6P&&12<6T.4E().3P)c.4G.7Y(6T);B(3x&&!6P&&12>3x.4E().1o)c.4G.6v(3x);c.2l=12},dY:k(9Q){m c.5p.8H().2D(9Q||k(el){m c.T.3k(el)},c)},29:k(){c.2l=1n;Q.3h(\'2M\',c.1G.5o);Q.3h(\'5z\',c.1G.29);B(c.C.2S){Q.3h(\'2M\',c.1G.5y);c.1h(\'9e\',[c.4G,c.2S])}c.1h(\'1Q\',c.4G)}});9S.3i(L 2p,L 43);o aI=L 18({C:{aT:k(3W){3W.1P(\'4z\',\'8G\')},aW:k(3W){3W.1P(\'4z\',\'4O\')},8T:30,bp:35,bt:35,1A:\'dX\',5F:{\'x\':16,\'y\':16},4V:O},1i:k(T,C){c.2Y(C);c.45=L P(\'4Z\',{\'4R\':c.C.1A+\'-3W\',\'8J\':{\'1v\':\'3Y\',\'1o\':\'0\',\'1u\':\'0\',\'4z\':\'4O\'}}).28(Q.4B);c.3c=L P(\'4Z\').28(c.45);$$(T).1q(c.9I,c);B(c.C.1i)c.C.1i.1X(c)},9I:k(el){el.$1W.42=(el.4N&&el.4D()==\'a\')?el.4N.3g(\'9Y://\',\'\'):(el.a1||O);B(el.53){o 6z=el.53.68(\'::\');B(6z.V>1){el.$1W.42=6z[0].5T();el.$1W.5u=6z[1].5T()}14{el.$1W.5u=el.53}el.a7(\'53\')}14{el.$1W.5u=O}B(el.$1W.42&&el.$1W.42.V>c.C.8T)el.$1W.42=el.$1W.42.6K(0,c.C.8T-1)+"&dU;";el.1B(\'8N\',k(I){c.1g(el);B(!c.C.4V)c.8f(I);14 c.1v(el)}.W(c));B(!c.C.4V)el.1B(\'2M\',c.8f.3e(c));o 29=c.29.W(c);el.1B(\'8P\',29);el.1B(\'3V\',29)},1g:k(el){c.3c.1l();B(el.$1W.42){c.53=L P(\'b0\').28(L P(\'4Z\',{\'4R\':c.C.1A+\'-53\'}).28(c.3c)).5s(el.$1W.42)}B(el.$1W.5u){c.1K=L P(\'b0\').28(L P(\'4Z\',{\'4R\':c.C.1A+\'-1K\'}).28(c.3c)).5s(el.$1W.5u)}$55(c.1H);c.1H=c.4d.2g(c.C.bp,c)},29:k(I){$55(c.1H);c.1H=c.3Z.2g(c.C.bt,c)},1v:k(G){o 1m=G.3p();c.45.4A({\'1u\':1m.x+c.C.5F.x,\'1o\':1m.y+c.C.5F.y})},8f:k(I){o am={\'x\':U.8m(),\'y\':U.8n()};o 2G={\'x\':U.8u(),\'y\':U.8v()};o 3W={\'x\':c.45.4b,\'y\':c.45.3R};o 1V={\'x\':\'1u\',\'y\':\'1o\'};M(o z 1a 1V){o 1m=I.1Y[z]+c.C.5F[z];B((1m+3W[z]-2G[z])>am[z])1m=I.1Y[z]-c.C.5F[z]-3W[z];c.45.1P(1V[z],1m)}},4d:k(){B(c.C.aq)c.1H=c.3Z.2g(c.C.aq,c);c.1h(\'aT\',[c.45])},3Z:k(){c.1h(\'aW\',[c.45])}});aI.3i(L 2p,L 43);o dV=L 18({1i:k(){c.6D=$A(1b);c.19={};c.4U={}},1B:k(F,fn){c.4U[F]=c.4U[F]||{};c.19[F]=c.19[F]||[];B(c.19[F].1j(fn))m O;14 c.19[F].1k(fn);c.6D.1q(k(5v,i){5v.1B(F,c.4i.W(c,[F,5v,i]))},c);m c},4i:k(F,5v,i){c.4U[F][i]=1e;o 4F=c.6D.4F(k(2i,j){m c.4U[F][j]||O},c);B(!4F)m;c.4U[F]={};c.19[F].1q(k(I){I.1X(c,c.6D,5v)},c)}});o 7t=1f.26.R({C:{7K:18.1l,aa:18.1l,3Q:0,4d:O,2N:1e,2y:O,21:1e,7f:O,7n:O,3T:O,6I:O},1i:k(){o C,2B,T,2d;$1q(1b,k(4t,i){22($F(4t)){Y\'2I\':C=4t;1C;Y\'G\':2d=$(4t);1C;62:o 2r=$$(4t);B(!2B)2B=2r;14 T=2r}});c.2B=2B||[];c.T=T||[];c.2d=$(2d);c.2Y(C);c.2l=-1;B(c.C.6I)c.C.3T=1e;B($2A(c.C.4d)){c.C.3Q=O;c.2l=c.C.4d}B(c.C.1g){c.C.3Q=O;c.C.4d=O}c.3U={};B(c.C.21)c.3U.21=\'b8\';B(c.C.2y)c.3U.2y=c.C.7n?\'aj\':\'4b\';B(c.C.2N)c.3U.2N=c.C.7f?\'9n\':\'5P\';M(o i=0,l=c.2B.V;i0));c.1h(3Z?\'aa\':\'7K\',[c.2B[i],el]);M(o 2O 1a c.3U)N[i][2O]=3Z?0:el[c.3U[2O]]},c);m c.1g(N)},dW:k(25){m c.3Q(25)}});1f.7t=7t;',62,956,'||||||||||||this||||||||function||return||var|||||||||||||if|options|||type|element||event|value|property|new|for|obj|false|Element|document|extend||elements|window|length|bind||case||||now||else|from||to|Class|events|in|arguments|Math|param|true|Fx|start|fireEvent|initialize|contains|push|empty|pos|null|top|args|each|parent|rgb|key|left|position|name|items|css|array|className|addEvent|break|max|offset|limit|bound|timer|values|properties|text|prototype|result|style|keys|setStyle|onComplete|stop|selector|data|props|prop|tmp|call|page|source||opacity|switch|method||index|Elements||inject|end|merge|mode|join|container|parsed|transition|delay|getStyle|current|set|overflown|previous|hsb|step|relatedTarget|Events|round|temp|script|Array|transport|test|custom|unit|width|string|chk|togglers|addListener|map|color|Garbage|scroll|Methods|object|nocash|remove|url|mousemove|height|fx|ie|Color|border|ghost|Base|params|parse|hue|Event|setOptions|documentElement||match||getElementsByTagName|margin|100|filter||||create|context|wrapper|toInt|bindWithEvent|overed|replace|removeListener|implement|toggler|indexOf|size|mouse|parentNode|Transitions|getPosition|tag|item|min|CSS|iCss|target|pow|next|scripts|option|time|shared|hex|drag|modifiers|change|scrollTo|Cookie|Json|handle|anchor|response|Abstract|returns|Hash|bottom|display|offsetHeight|len|wait|effects|trash|tip|onStart|absolute|hide||iterable|myTitle|Options|getValue|toolTip||iTo|select|duration|xpath|offsetWidth|Styles|show|load|periodical|Drag|knob|check|apply|increase|toString|val|right|compute|delta|setNow|cont|src|argument|id|chains|padding|webkit|link|visibility|setStyles|body|removeEvent|getTag|getCoordinates|every|active|str|status|headers|cookie|handles|number|href|hidden|grid|running|class|image|pick|checker|fixed|px|open|results|div||255|collect|title|mix|clear|getNow|delete|sources|post|mousewheel|fromTo|catch|bit|native|queryString|secure|onSuccess|htmlElement|try|location|setHeader|readyState|mousedown|move|list|get|evaluate|setHTML|xml|myText|instance|links|webkit419|moveGhost|mouseup|toQueryString|HTMLElement|regexp|isSuccess|rgbToHex|offsets|hexToRgb|_method|colors|encoding|setLength|toLowerCase|unique|onload|parseInt|scrollHeight|iFrom|getProperty|include|trim|iNow|scrollLeft|red|domReady|precision|klass||walk|default|scrollTop|layout|green|parseFloat|on|split|out|send|area|droppables|mp|head|attempt|evType|click|String|addEvents|date|continue|fix|XHR|setProperties|currentStyle|counter|included|images|hasKey|brother|injectAfter|onFailure|generic|saturation|dual|Properties|loaded|XMLHttpRequest|instances|steps|onChange|checkStep|mod|alwaysHide|Listeners|substr|draggedKnob|snap|getElements|code|up|fKey|evalScripts|tagName|prev|stopPropagation|attach|getElementById|preventDefault|getElementsBySelector|while|relative|scrollWidth|setMany|Multi|splice|blue|realType|defined|removeEvents|regex|percent|forEach|typeof|alpha|encodeURIComponent|fixedHeight|getSize|scrollSize|onreadystatechange|none|path|setProperty|proto|fixedWidth|domain|evalResponse|setTransport|clean|hasClass|Accordion|Chain|unload|onCancel|update|RegExp|callChain|toUpperCase|transitions|qs|disabled|checked|add|pairs|getMany|ie_ready|multiple|onActive|getParam|found|xhtml|getItems|concat|selected|Dom|domready|Style|Transition|flag|PI|compat|injectBefore|Function|getLast|node|operator|innerText|nodeType|iProps|appendChild|cssText|firstChild|easeType|camelCase|DOMMouseScroll|random|charAt|copy|locate|newArray|rgbToHsb|merged|addEventListener|brightness|rr|getWidth|getHeight|hasChild|complete|javascript|gecko|abort|callee|getScrollLeft|getScrollTop|pageY|img|mousemover|coord|toElement|Slider|toStep|previousEnd|pageX|coordinates|visible|getChildren|getNext|styles|previousChange|onTick|horizontal|mouseenter|velocity|mouseleave|vertical|capitalize|onDrag|maxTitleChars|lim|NativeEvents|gr|Object|mouseout|first|mouseover|insertBefore|getScrollHeight|getScrollWidth|after|cancel|Date|borderShort|fps|pageXOffset|opera|Ajax|clientWidth|clientHeight|onDragComplete|clientX|onRequest|request|pageYOffset|Single|before|Merge|pp|fullHeight|ActiveXObject|wheelDelta|floor|wheelStops|onStateChange|beforeunload|iParsed|direction|getTime|Scroller|overflow|addClass|getCoords|client|constructor|clickedElement|removeClass|detach|clone|onDragStart|build|application|which|useLink|setTimeout|undefined|execScript|getElement|converter|Content|Sortables|normal|sel|contents|getPrevious|keydown|http|prefix|toPosition|rel|filterById|PropertiesIFlag|removeEventListener|half|Left|removeAttribute|filterByClass|filterByAttribute|onBackground|input|resolver|textarea|getFormElements|getHeader|ie6|Scroll|getPos|fullWidth|zoom|onBeforeStart|win|onProgress|distance||timeout|Asset|onSnap|clientY|cloneEvents|cos|autoSave|nodeValue|where|Bottom|idx|elementsProperty|childNodes|relatedTargetGecko|error|defaultView|urlEncoded|toFloat|Tips|createElement|shift|hyphenate|Move|Number|checkAgainst|getLeft|getTop|addSection|www|onShow|fixRelatedTarget|interval|onHide|save|picked|autoCancel|span|textContent|adopt|innerHTML|styleSheet|escapeRegExp|fixStyle|6000|fullOpacity|hsbToRgb|slideIn|slideOut|360|1000|async|Width|getStyles|slice|Top|sin|setOpacity|removeChild|600000|appendText|0px|showDelay|extended||Right|hideDelay|full|button|menu|shiftKey|metaKey|altKey|fromCharCode|frameborder|ctrlKey|attachEvent|detail|srcElement|control|CollectGarbage|readonly|frameBorder|alt|keyCode|111|readOnly|meta|detachEvent|120|rightClick|wheel|pass|some|associate|getRandom|clearChain|chain|DOMElement|execCommand|BackgroundImageCache|transparent|setInterval|embed|boolean|injectInside|times|bindAsEventListener|err|fromElement|iframe|khtml|whitespace|collection|clearTimeout|textnode|nodeName|MooTools|version|clearInterval|Window|taintEnabled|webkit420|getBoxObjectFor|navigator|all|Document|ie7|injectTop|cloneNode|borderStyle|borderColor|htmlFor|borderWidth|getText|getProperties|setAttribute|setText|colspan|colSpan|tabindex|tabIndex|maxlength|accessKey|accesskey|rowspan|rowSpan|removeProperty|attributes|float|styleFloat|cssFloat|toggleClass|createTextNode|replaceWith|replaceChild|zIndex|hasLayout|lastChild|getParent|getAttribute|getFirst|Sibling|getComputedStyle|getPropertyValue|maxLength|overrideMimeType|200|300|responseText|urlencoded|form|cancelBubble|XMLHTTP|charset|responseXML|Connection|Accept|html|ecma|With|Requested|close|setRequestHeader|postBody||utf|makeDraggable|Bounce|Elastic|Quad|618|Back|Circ|acos|Sine|Cubic|Quart|over|drop|emptydrop|leave|makeResizable|Quint|sqrt|java|gi|setHue|setSaturation|setBrightness|invert|pop|onerror|Image|4096|RGB|HSB|hellip|Group|showThisHideOpen|tool|serialize|10000|SmoothScroll|hash|onabort|screen|toGMTString|decodeURIComponent|isFinite|expires|setTime|exec|getResponseHeader|action|Eaeflnr|eval|readystatechange|stylesheet|media|json|JSON|Remote|Request||Expo|Microsoft|substring|XPathResult|UNORDERED_NODE_SNAPSHOT_TYPE|with|starts|ES|namespaceURI|snapshotLength|snapshotItem|checkbox|radio|getElementsByClassName|1999|w3|org|Pow|contextmenu|space|backspace|tab|esc|down|returnValue|enter|dblclick|keypress|submit|reset|blur|focus|keyup|resize|password|filterByTag|toLeft|toRight|Slide|toBottom|toTop|clearTimer|effect|toggle|easeIn|InOut|ease|Out|In|easeOut|easeInOut|500|linear|defer|DOMContentLoaded|protocol|write|offsetTop|https|offsetParent|void|innerWidth|onDomReady||innerHeight|offsetLeft'.split('|'),0,{})) +//MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006 Valerio Proietti, , MIT Style License. + +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('o ci={cj:\'1.11\'};k $77(N){m(N!=9N)};k $F(N){B(!$77(N))m O;B(N.5i)m\'G\';o F=7c N;B(F==\'2I\'&&N.ch){22(N.84){Y 1:m\'G\';Y 3:m(/\\S/).2v(N.ax)?\'cg\':\'cd\'}}B(F==\'2I\'||F==\'k\'){22(N.9C){Y 2t:m\'1z\';Y 7y:m\'5C\';Y 18:m\'4R\'}B(7c N.V==\'4M\'){B(N.3r)m\'ce\';B(N.8t)m\'1b\'}}m F};k $2a(){o 54={};M(o i=0;i<1b.V;i++){M(o K 1a 1b[i]){o ap=1b[i][K];o 6d=54[K];B(6d&&$F(ap)==\'2I\'&&$F(6d)==\'2I\')54[K]=$2a(6d,ap);14 54[K]=ap}}m 54};o $R=k(){o 1p=1b;B(!1p[1])1p=[c,1p[0]];M(o K 1a 1p[1])1p[0][K]=1p[1][K];m 1p[0]};o $5e=k(){M(o i=0,l=1b.V;i-1:c.3k(2z)>-1},b5:k(){m c.3g(/([.*+?^${}()|[\\]\\/\\\\])/g,\'\\\\$1\')}});2t.R({5E:k(1z){B(c.V<3)m O;B(c.V==4&&c[3]==0&&!1z)m\'c2\';o 3C=[];M(o i=0;i<3;i++){o 5d=(c[i]-0).4l(16);3C.1k((5d.V==1)?\'0\'+5d:5d)}m 1z?3C:\'#\'+3C.2c(\'\')},5G:k(1z){B(c.V!=3)m O;o 1s=[];M(o i=0;i<3;i++){1s.1k(5O((c[i].V==1)?c[i]+c[i]:c[i],16))}m 1z?1s:\'1s(\'+1s.2c(\',\')+\')\'}});7Z.R({3a:k(C){o fn=c;C=$2a({\'W\':fn,\'I\':O,\'1b\':1n,\'2g\':O,\'4f\':O,\'6f\':O},C);B($2A(C.1b)&&$F(C.1b)!=\'1z\')C.1b=[C.1b];m k(I){o 1p;B(C.I){I=I||U.I;1p=[(C.I===1e)?I:L C.I(I)];B(C.1b)1p.R(C.1b)}14 1p=C.1b||1b;o 3N=k(){m fn.4j($4T(C.W,fn),1p)};B(C.2g)m 9M(3N,C.2g);B(C.4f)m c3(3N,C.4f);B(C.6f)5j{m 3N()}5c(c9){m O};m 3N()}},bT:k(1p,W){m c.3a({\'1b\':1p,\'W\':W})},6f:k(1p,W){m c.3a({\'1b\':1p,\'W\':W,\'6f\':1e})()},W:k(W,1p){m c.3a({\'W\':W,\'1b\':1p})},c8:k(W,1p){m c.3a({\'W\':W,\'I\':1e,\'1b\':1p})},2g:k(2g,W,1p){m c.3a({\'2g\':2g,\'W\':W,\'1b\':1p})()},4f:k(aV,W,1p){m c.3a({\'4f\':aV,\'W\':W,\'1b\':1p})()}});aN.R({3d:k(){m 5O(c)},aH:k(){m 66(c)},1F:k(3s,1D){m 1c.3s(1D,1c.1D(3s,c))},2q:k(5Y){5Y=1c.3w(10,5Y||0);m 1c.2q(c*5Y)/5Y},c7:k(fn){M(o i=0;i\'}el=Q.aJ(el)}el=$(el);m(!1U||!el)?el:el.2j(1U)}});o 26=L 18({1i:k(T){m(T)?$R(T,c):c}});26.R=k(1U){M(o 1V 1a 1U){c.1L[1V]=1U[1V];c[1V]=$5e.6x(1V)}};k $(el){B(!el)m 1n;B(el.5i)m 2F.52(el);B([U,Q].1j(el))m el;o F=$F(el);B(F==\'2z\'){el=Q.6W(el);F=(el)?\'G\':O}B(F!=\'G\')m 1n;B(el.5i)m 2F.52(el);B([\'2I\',\'c4\'].1j(el.6S.5L()))m el;$R(el,P.1L);el.5i=k(){};m 2F.52(el)};Q.6Y=Q.33;k $$(){o T=[];M(o i=0,j=1b.V;i0&&6Q<13)c.1t=\'f\'+6Q}c.1t=c.1t||6i.bA(c.6O).5L()}14 B(c.F.2v(/(6h|3m|bw)/)){c.1Y={\'x\':I.8E||I.9f+Q.2Z.5V,\'y\':I.8w||I.at+Q.2Z.63};c.9B={\'x\':I.8E?I.8E-U.99:I.9f,\'y\':I.8w?I.8w-U.9i:I.at};c.bR=(I.9K==3)||(I.bv==2);22(c.F){Y\'90\':c.2o=I.2o||I.ca;1C;Y\'8Y\':c.2o=I.2o||I.8A}c.aU()}m c},1R:k(){m c.6U().6X()},6U:k(){B(c.I.6U)c.I.6U();14 c.I.db=1e;m c},6X:k(){B(c.I.6X)c.I.6X();14 c.I.eK=O;m c}});2X.6m={2o:k(){B(c.2o&&c.2o.84==3)c.2o=c.2o.3n},aD:k(){5j{2X.6m.2o.1X(c)}5c(e){c.2o=c.3v}}};2X.1L.aU=(U.8r)?2X.6m.aD:2X.6m.2o;2X.1O=L 3M({\'eL\':13,\'6P\':38,\'eJ\':40,\'1u\':37,\'4n\':39,\'eI\':27,\'eF\':32,\'eG\':8,\'eH\':9,\'57\':46});P.2H.2p={1B:k(F,fn){c.$19=c.$19||{};c.$19[F]=c.$19[F]||{\'1O\':[],\'1I\':[]};B(c.$19[F].1O.1j(fn))m c;c.$19[F].1O.1k(fn);o 76=F;o 2w=P.2p[F];B(2w){B(2w.7F)2w.7F.1X(c,fn);B(2w.2D)fn=2w.2D;B(2w.F)76=2w.F}B(!c.8j)fn=fn.3a({\'W\':c,\'I\':1e});c.$19[F].1I.1k(fn);m(P.8V.1j(76))?c.2C(76,fn):c},4C:k(F,fn){B(!c.$19||!c.$19[F])m c;o 1m=c.$19[F].1O.3k(fn);B(1m==-1)m c;o 1t=c.$19[F].1O.74(1m,1)[0];o J=c.$19[F].1I.74(1m,1)[0];o 2w=P.2p[F];B(2w){B(2w.2K)2w.2K.1X(c,fn);B(2w.F)F=2w.F}m(P.8V.1j(F))?c.3h(F,J):c},6j:k(1Z){m P.72(c,\'1B\',1Z)},78:k(F){B(!c.$19)m c;B(!F){M(o 6g 1a c.$19)c.78(6g);c.$19=1n}14 B(c.$19[F]){c.$19[F].1O.1q(k(fn){c.4C(F,fn)},c);c.$19[F]=1n}m c},1h:k(F,1p,2g){B(c.$19&&c.$19[F]){c.$19[F].1O.1q(k(fn){fn.3a({\'W\':c,\'2g\':2g,\'1b\':1p})()},c)}m c},au:k(15,F){B(!15.$19)m c;B(!F){M(o 6g 1a 15.$19)c.au(15,6g)}14 B(15.$19[F]){15.$19[F].1O.1q(k(fn){c.1B(F,fn)},c)}m c}};U.R(P.2H.2p);Q.R(P.2H.2p);P.R(P.2H.2p);P.2p=L 3M({\'8N\':{F:\'90\',2D:k(I){I=L 2X(I);B(I.2o!=c&&!c.8o(I.2o))c.1h(\'8N\',I)}},\'8P\':{F:\'8Y\',2D:k(I){I=L 2X(I);B(I.2o!=c&&!c.8o(I.2o))c.1h(\'8P\',I)}},\'5a\':{F:(U.8r)?\'8b\':\'5a\'}});P.8V=[\'6h\',\'eM\',\'5z\',\'5n\',\'5a\',\'8b\',\'90\',\'8Y\',\'2M\',\'9X\',\'eN\',\'eS\',\'4e\',\'7v\',\'9t\',\'eT\',\'5o\',\'eR\',\'eQ\',\'3F\',\'eO\',\'eP\',\'48\',\'aE\',\'8s\',\'eE\',\'2G\'];7Z.R({3e:k(W,1p){m c.3a({\'W\':W,\'1b\':1p,\'I\':2X})}});26.R({eV:k(3q){m L 26(c.36(k(el){m(P.4D(el)==3q)}))},a8:k(1A,2J){o T=c.36(k(el){m(el.1A&&el.1A.1j(1A,\' \'))});m(2J)?T:L 26(T)},a2:k(4u,2J){o T=c.36(k(el){m(el.4u==4u)});m(2J)?T:L 26(T)},a9:k(1w,82,J,2J){o T=c.36(k(el){o 2i=P.5R(el,1w);B(!2i)m O;B(!82)m 1e;22(82){Y\'=\':m(2i==J);Y\'*=\':m(2i.1j(J));Y\'^=\':m(2i.6K(0,J.V)==J);Y\'$=\':m(2i.6K(2i.V-J.V)==J);Y\'!=\':m(2i!=J);Y\'~=\':m 2i.1j(J,\' \')}m O});m(2J)?T:L 26(T)}});k $E(1S,36){m($(36)||Q).9P(1S)};k $et(1S,36){m($(36)||Q).6Y(1S)};$$.3B={\'5C\':/^(\\w*|\\*)(?:#([\\w-]+)|\\.([\\w-]+))?(?:\\[(\\w+)(?:([!*^$]?=)["\']?([^"\'\\]]*)["\']?)?])?$/,\'4a\':{7L:k(1x,3b,1d,i){o 2r=[3b.eu?\'7N:\':\'\',1d[1]];B(1d[2])2r.1k(\'[@4u="\',1d[2],\'"]\');B(1d[3])2r.1k(\'[1j(7P(" ", @4R, " "), " \',1d[3],\' ")]\');B(1d[4]){B(1d[5]&&1d[6]){22(1d[5]){Y\'*=\':2r.1k(\'[1j(@\',1d[4],\', "\',1d[6],\'")]\');1C;Y\'^=\':2r.1k(\'[es-er(@\',1d[4],\', "\',1d[6],\'")]\');1C;Y\'$=\':2r.1k(\'[eo(@\',1d[4],\', 2z-V(@\',1d[4],\') - \',1d[6].V,\' + 1) = "\',1d[6],\'"]\');1C;Y\'=\':2r.1k(\'[@\',1d[4],\'="\',1d[6],\'"]\');1C;Y\'!=\':2r.1k(\'[@\',1d[4],\'!="\',1d[6],\'"]\')}}14{2r.1k(\'[@\',1d[4],\']\')}}1x.1k(2r.2c(\'\'));m 1x},7O:k(1x,3b,2J){o T=[];o 4a=Q.5r(\'.//\'+1x.2c(\'//\'),3b,$$.3B.ac,ep.eq,1n);M(o i=0,j=4a.ev;i<\\/2s>\');$(\'7I\').7i=k(){B(c.5m==\'8p\')5X()}}}14{U.2C("4e",5X);Q.2C("fe",5X)}}};U.fm=k(fn){m c.1B(\'7S\',fn)};U.R({8m:k(){B(c.5x)m c.fl;B(c.9a)m Q.4B.9c;m Q.2Z.9c},8n:k(){B(c.5x)m c.fo;B(c.9a)m Q.4B.9d;m Q.2Z.9d},93:k(){B(c.2P)m 1c.1D(Q.2Z.4b,Q.2Z.71);B(c.4x)m Q.4B.71;m Q.2Z.71},92:k(){B(c.2P)m 1c.1D(Q.2Z.3R,Q.2Z.5P);B(c.4x)m Q.4B.5P;m Q.2Z.5P},8u:k(){m c.99||Q.2Z.5V},8v:k(){m c.9i||Q.2Z.63},7g:k(){m{\'3l\':{\'x\':c.8m(),\'y\':c.8n()},\'7h\':{\'x\':c.93(),\'y\':c.92()},\'2G\':{\'x\':c.8u(),\'y\':c.8v()}}},3p:k(){m{\'x\':0,\'y\':0}}});o 1f={};1f.2T=L 18({C:{3X:18.1l,1Q:18.1l,7w:18.1l,2f:k(p){m-(1c.av(1c.7W*p)-1)/2},49:fb,2x:\'4W\',3T:1e,98:50},1i:k(C){c.G=c.G||1n;c.2Y(C);B(c.C.1i)c.C.1i.1X(c)},2n:k(){o 3A=$3A();B(3A=(7-4*a)/11){J=-1c.3w((11-6*a-11*p)/4,2)+b*b;1C}}m J},ds:k(p,x){m 1c.3w(2,10*--p)*1c.av(20*p*1c.7W*(x[0]||1)/3)}});[\'dt\',\'dz\',\'dA\',\'dG\'].1q(k(2f,i){1f.3o[2f]=L 1f.7U(k(p){m 1c.3w(p,[i+2])});1f.3o.7X(2f)});o 4g={};4g.2T=L 18({C:{3J:O,2x:\'4W\',3X:18.1l,al:18.1l,1Q:18.1l,as:18.1l,8S:18.1l,1F:O,3E:{x:\'1u\',y:\'1o\'},4P:O,6M:6},1i:k(el,C){c.2Y(C);c.G=$(el);c.3J=$(c.C.3J)||c.G;c.3m={\'12\':{},\'1m\':{}};c.J={\'1g\':{},\'12\':{}};c.1G={\'1g\':c.1g.3e(c),\'4i\':c.4i.3e(c),\'3D\':c.3D.3e(c),\'1R\':c.1R.W(c)};c.6V();B(c.C.1i)c.C.1i.1X(c)},6V:k(){c.3J.1B(\'5n\',c.1G.1g);m c},9F:k(){c.3J.4C(\'5n\',c.1G.1g);m c},1g:k(I){c.1h(\'al\',c.G);c.3m.1g=I.1Y;o 1F=c.C.1F;c.1F={\'x\':[],\'y\':[]};M(o z 1a c.C.3E){B(!c.C.3E[z])6l;c.J.12[z]=c.G.2h(c.C.3E[z]).3d();c.3m.1m[z]=I.1Y[z]-c.J.12[z];B(1F&&1F[z]){M(o i=0;i<2;i++){B($2A(1F[z][i]))c.1F[z][i]=($F(1F[z][i])==\'k\')?1F[z][i]():1F[z][i]}}}B($F(c.C.4P)==\'4M\')c.C.4P={\'x\':c.C.4P,\'y\':c.C.4P};Q.2C(\'2M\',c.1G.4i);Q.2C(\'5z\',c.1G.1R);c.1h(\'3X\',c.G);I.1R()},4i:k(I){o ao=1c.2q(1c.dH(1c.3w(I.1Y.x-c.3m.1g.x,2)+1c.3w(I.1Y.y-c.3m.1g.y,2)));B(ao>c.C.6M){Q.3h(\'2M\',c.1G.4i);Q.2C(\'2M\',c.1G.3D);c.3D(I);c.1h(\'as\',c.G)}I.1R()},3D:k(I){c.69=O;c.3m.12=I.1Y;M(o z 1a c.C.3E){B(!c.C.3E[z])6l;c.J.12[z]=c.3m.12[z]-c.3m.1m[z];B(c.1F[z]){B($2A(c.1F[z][1])&&(c.J.12[z]>c.1F[z][1])){c.J.12[z]=c.1F[z][1];c.69=1e}14 B($2A(c.1F[z][0])&&(c.J.12[z]el.1u&&12.xel.1o)},1R:k(){B(c.3f&&!c.69)c.3f.1h(\'dC\',[c.G,c]);14 c.G.1h(\'dD\',c);c.1r();m c}});P.R({dq:k(C){m L 4g.aM(c,C)}});o 6n=L 18({C:{23:\'59\',be:1e,9g:18.1l,5h:18.1l,6w:18.1l,aG:1e,5J:\'dp-8\',aZ:O,4J:{}},7q:k(){c.2u=(U.6C)?L 6C():(U.2P?L 9o(\'en.dc\'):O);m c},1i:k(C){c.7q().2Y(C);c.C.5D=c.C.5D||c.5D;c.4J={};B(c.C.aG&&c.C.23==\'59\'){o 5J=(c.C.5J)?\'; dd=\'+c.C.5J:\'\';c.5l(\'9R-F\',\'9J/x-aS-da-d9\'+5J)}B(c.C.1i)c.C.1i.1X(c)},9s:k(){B(c.2u.5m!=4||!c.4Q)m;c.4Q=O;o 4I=0;5j{4I=c.2u.4I}5c(e){};B(c.C.5D.1X(c,4I))c.5h();14 c.6w();c.2u.7i=18.1l},5D:k(4I){m((4I>=d6)&&(4I]*>([\\s\\S]*?)<\\/2s>/dJ;6Z((2s=5C.e9(c.3L.1K)))3y.1k(2s[1]);3y=3y.2c(\'\\n\')}B(3y)(U.9O)?U.9O(3y):U.9M(3y,0)},af:k(1w){5j{m c.2u.ea(1w)}5c(e){};m 1n}});8X.5A=k(1Z){o 5f=[];M(o K 1a 1Z)5f.1k(7e(K)+\'=\'+7e(1Z[K]));m 5f.2c(\'&\')};P.R({6a:k(C){m L 9b(c.5R(\'eb\'),$2a({1T:c.5A()},C,{23:\'59\'})).9h()}});o 3H=L 3M({C:{7o:O,7k:O,49:O,5g:O},2j:k(1t,J,C){C=$2a(c.C,C);J=7e(J);B(C.7o)J+=\'; 7o=\'+C.7o;B(C.7k)J+=\'; 7k=\'+C.7k;B(C.49){o 6k=L 96();6k.e8(6k.9w()+C.49*24*60*60*bd);J+=\'; e7=\'+6k.e4()}B(C.5g)J+=\'; 5g\';Q.4K=1t+\'=\'+J;m $R(C,{\'1t\':1t,\'J\':J})},5q:k(1t){o J=Q.4K.31(\'(?:^|;)\\\\s*\'+1t.b5()+\'=([^;]*)\');m J?e5(J[1]):O},2K:k(4K,C){B($F(4K)==\'2I\')c.2j(4K.1t,\'\',$2a(4K,{49:-1}));14 c.2j(4K,\'\',$2a(C,{49:-1}))}});o 3I={4l:k(N){22($F(N)){Y\'2z\':m\'"\'+N.3g(/(["\\\\])/g,\'\\\\$1\')+\'"\';Y\'1z\':m\'[\'+N.2D(3I.4l).2c(\',\')+\']\';Y\'2I\':o 2z=[];M(o K 1a N)2z.1k(3I.4l(K)+\':\'+3I.4l(N[K]));m\'{\'+2z.2c(\',\')+\'}\';Y\'4M\':B(e6(N))1C;Y O:m\'1n\'}m 6i(N)},5r:k(4H,5g){m(($F(4H)!=\'2z\')||(5g&&!4H.2v(/^("(\\\\.|[^"\\\\\\n\\r])*?"|[,:{}\\[\\]0-9.\\-+ec-u \\n\\r\\t])+?$/)))?1n:ed(\'(\'+4H+\')\')}};3I.ej=6n.R({1i:k(2L,C){c.2L=2L;c.1B(\'5h\',c.1Q);c.1r(C);c.5l(\'X-ek\',\'ei\')},6a:k(N){m c.1r(c.2L,\'eh=\'+3I.4l(N))},1Q:k(){c.1h(\'1Q\',[3I.5r(c.3L.1K,c.C.5g)])}});o ar=L 3M({8q:k(1Z,1J){1J=$2a({\'5N\':18.1l},1J);o 2s=L P(\'2s\',{\'4s\':1Z}).6j({\'4e\':1J.5N,\'ee\':k(){B(c.5m==\'8p\')c.1h(\'4e\')}});57 1J.5N;m 2s.6o(1J).28(Q.6e)},1y:k(1Z,1J){m L P(\'4y\',$2a({\'a1\':\'ef\',\'eg\':\'e3\',\'F\':\'1K/1y\',\'4N\':1Z},1J)).28(Q.6e)},4S:k(1Z,1J){1J=$2a({\'5N\':18.1l,\'e2\':18.1l,\'dP\':18.1l},1J);o 4S=L dQ();4S.4s=1Z;o G=L P(\'8x\',{\'4s\':1Z});[\'4e\',\'8s\',\'aE\'].1q(k(F){o I=1J[\'67\'+F];57 1J[\'67\'+F];G.1B(F,k(){c.4C(F,1b.8t);I.1X(c)})});B(4S.2y&&4S.2N)G.1h(\'4e\',G,1);m G.6o(1J)},6s:k(58,C){C=$2a({1Q:18.1l,an:18.1l},C);B(!58.1k)58=[58];o 6s=[];o 6q=0;58.1q(k(1Z){o 8x=L ar.4S(1Z,{\'5N\':k(){C.an.1X(c,6q);6q++;B(6q==58.V)C.1Q()}});6s.1k(8x)});m L 26(6s)}});o 3O=L 18({V:0,1i:k(2I){c.N=2I||{};c.5K()},5q:k(1t){m(c.6t(1t))?c.N[1t]:1n},6t:k(1t){m(1t 1a c.N)},2j:k(1t,J){B(!c.6t(1t))c.V++;c.N[1t]=J;m c},5K:k(){c.V=0;M(o p 1a c.N)c.V++;m c},2K:k(1t){B(c.6t(1t)){57 c.N[1t];c.V--}m c},1q:k(fn,W){$1q(c.N,fn,W)},R:k(N){$R(c.N,N);m c.5K()},2a:k(){c.N=$2a.4j(1n,[c.N].R(1b));m c.5K()},1l:k(){c.N={};c.V=0;m c},1O:k(){o 1O=[];M(o K 1a c.N)1O.1k(K);m 1O},1I:k(){o 1I=[];M(o K 1a c.N)1I.1k(c.N[K]);m 1I}});k $H(N){m L 3O(N)};3O.3H=3O.R({1i:k(1w,C){c.1w=1w;c.C=$R({\'aw\':1e},C||{});c.4e()},aX:k(){B(c.V==0){3H.2K(c.1w,c.C);m 1e}o 4H=3I.4l(c.N);B(4H.V>dR)m O;3H.2j(c.1w,4H,c.C);m 1e},4e:k(){c.N=3I.5r(3H.5q(c.1w),1e)||{};c.5K()}});3O.3H.2H={};[\'R\',\'2j\',\'2a\',\'1l\',\'2K\'].1q(k(23){3O.3H.2H[23]=k(){3O.1L[23].4j(c,1b);B(c.C.aw)c.aX();m c}});3O.3H.3i(3O.3H.2H);o 2Q=L 18({1i:k(2E,F){F=F||(2E.1k?\'1s\':\'3C\');o 1s,2m;22(F){Y\'1s\':1s=2E;2m=1s.8h();1C;Y\'2m\':1s=2E.b9();2m=2E;1C;62:1s=2E.5G(1e);2m=1s.8h()}1s.2m=2m;1s.3C=1s.5E();m $R(1s,2Q.1L)},54:k(){o 5I=$A(1b);o 7d=($F(5I[5I.V-1])==\'4M\')?5I.dO():50;o 1s=c.8e();5I.1q(k(2E){2E=L 2Q(2E);M(o i=0;i<3;i++)1s[i]=1c.2q((1s[i]/ 35 * (35 - 7d)) + (2E[i] /35*7d))});m L 2Q(1s,\'1s\')},dN:k(){m L 2Q(c.2D(k(J){m 51-J}))},dK:k(J){m L 2Q([J,c.2m[1],c.2m[2]],\'2m\')},dL:k(7a){m L 2Q([c.2m[0],7a,c.2m[2]],\'2m\')},dM:k(7a){m L 2Q([c.2m[0],c.2m[1],7a],\'2m\')}});k $dS(r,g,b){m L 2Q([r,g,b],\'1s\')};k $dT(h,s,b){m L 2Q([h,s,b],\'2m\')};2t.R({8h:k(){o 5W=c[0],65=c[1],75=c[2];o 2W,6y,8k;o 1D=1c.1D(5W,65,75),3s=1c.3s(5W,65,75);o 4p=1D-3s;8k=1D/51;6y=(1D!=0)?4p/1D:0;B(6y==0){2W=0}14{o 8l=(1D-5W)/4p;o 8W=(1D-65)/4p;o br=(1D-75)/4p;B(5W==1D)2W=br-8W;14 B(65==1D)2W=2+8l-br;14 2W=4+8W-8l;2W/=6;B(2W<0)2W++}m[1c.2q(2W*bc),1c.2q(6y*35),1c.2q(8k*35)]},b9:k(){o br=1c.2q(c[2]/35*51);B(c[1]==0){m[br,br,br]}14{o 2W=c[0]%bc;o f=2W%60;o p=1c.2q((c[2]*(35-c[1]))/dZ*51);o q=1c.2q((c[2]*(b7-c[1]*f))/bm*51);o t=1c.2q((c[2]*(b7-c[1]*(60-f)))/bm*51);22(1c.9q(2W/60)){Y 0:m[br,t,p];Y 1:m[q,br,p];Y 2:m[p,br,t];Y 3:m[p,q,br];Y 4:m[t,p,br];Y 5:m[br,p,q]}}m O}});o 9x=L 18({C:{6b:20,8O:1,6F:k(x,y){c.G.3G(x,y)}},1i:k(G,C){c.2Y(C);c.G=$(G);c.8y=([U,Q].1j(G))?$(Q.4B):c.G},1g:k(){c.8z=c.9A.3e(c);c.8y.2C(\'2M\',c.8z)},1R:k(){c.8y.3h(\'2M\',c.8z);c.1H=$55(c.1H)},9A:k(I){c.1Y=(c.G==U)?I.9B:I.1Y;B(!c.1H)c.1H=c.2G.4f(50,c)},2G:k(){o el=c.G.7g();o 1m=c.G.3p();o 3F={\'x\':0,\'y\':0};M(o z 1a c.1Y){B(c.1Y[z]<(c.C.6b+1m[z])&&el.2G[z]!=0)3F[z]=(c.1Y[z]-c.C.6b-1m[z])*c.C.8O;14 B(c.1Y[z]+c.C.6b>(el.3l[z]+1m[z])&&el.2G[z]+el.3l[z]!=el.7h[z])3F[z]=(c.1Y[z]-el.3l[z]+c.C.6b-1m[z])*c.C.8O}B(3F.y||3F.x)c.1h(\'6F\',[el.2G.x+3F.x,el.2G.y+3F.y])}});9x.3i(L 2p,L 43);o 8B=L 18({C:{6F:18.1l,1Q:18.1l,8L:k(1m){c.4h.1P(c.p,1m)},2b:\'8M\',6E:35,1E:0},1i:k(el,4h,C){c.G=$(el);c.4h=$(4h);c.2Y(C);c.8K=-1;c.8D=-1;c.2n=-1;c.G.1B(\'5n\',c.9D.3e(c));o 6H,1E;22(c.C.2b){Y\'8M\':c.z=\'x\';c.p=\'1u\';6H={\'x\':\'1u\',\'y\':O};1E=\'4b\';1C;Y\'8Q\':c.z=\'y\';c.p=\'1o\';6H={\'x\':O,\'y\':\'1o\'};1E=\'3R\'}c.1D=c.G[1E]-c.4h[1E]+(c.C.1E*2);c.a5=c.4h[1E]/2;c.ai=c.G[\'5q\'+c.p.8R()].W(c.G);c.4h.1P(\'1v\',\'70\').1P(c.p,-c.C.1E);o 8U={};8U[c.z]=[-c.C.1E,c.1D-c.C.1E];c.3D=L 4g.2T(c.4h,{1F:8U,3E:6H,6M:0,3X:k(){c.6L()}.W(c),8S:k(){c.6L()}.W(c),1Q:k(){c.6L();c.29()}.W(c)});B(c.C.1i)c.C.1i.1X(c)},2j:k(2n){c.2n=2n.1F(0,c.C.6E);c.6G();c.29();c.1h(\'8L\',c.a0(c.2n));m c},9D:k(I){o 1v=I.1Y[c.z]-c.ai()-c.a5;1v=1v.1F(-c.C.1E,c.1D-c.C.1E);c.2n=c.8C(1v);c.6G();c.29();c.1h(\'8L\',1v)},6L:k(){c.2n=c.8C(c.3D.J.12[c.z]);c.6G()},6G:k(){B(c.8K!=c.2n){c.8K=c.2n;c.1h(\'6F\',c.2n)}},29:k(){B(c.8D!==c.2n){c.8D=c.2n;c.1h(\'1Q\',c.2n+\'\')}},8C:k(1v){m 1c.2q((1v+c.C.1E)/c.1D*c.C.6E)},a0:k(2n){m c.1D*2n/c.C.6E}});8B.3i(L 2p);8B.3i(L 43);o e0=1f.ah.R({1i:k(C){c.1r(U,C);c.5w=(c.C.5w)?$$(c.C.5w):$$(Q.5w);o 5k=U.5k.4N.31(/^[^#]*/)[0]+\'#\';c.5w.1q(k(4y){B(4y.4N.3k(5k)!=0)m;o 3K=4y.4N.6K(5k.V);B(3K&&$(3K))c.9L(4y,3K)},c);B(!U.5x)c.1B(\'1Q\',k(){U.5k.e1=c.3K})},9L:k(4y,3K){4y.1B(\'6h\',k(I){c.3K=3K;c.8A(3K);I.1R()}.3e(c))}});o 9S=L 18({C:{4L:O,3X:18.1l,1Q:18.1l,2S:1e,6M:3,9H:k(G,2S){2S.1P(\'21\',0.7);G.1P(\'21\',0.7)},9e:k(G,2S){G.1P(\'21\',1);2S.2K();c.3V.2K()}},1i:k(5p,C){c.2Y(C);c.5p=$(5p);c.T=c.5p.8H();c.4L=(c.C.4L)?$$(c.C.4L):c.T;c.1G={\'1g\':[],\'5y\':c.5y.3e(c)};M(o i=0,l=c.4L.V;i0);o 6T=c.4G.9W();o 3x=c.4G.8I();B(6T&&6P&&12<6T.4E().3P)c.4G.7Y(6T);B(3x&&!6P&&12>3x.4E().1o)c.4G.6v(3x);c.2l=12},dY:k(9Q){m c.5p.8H().2D(9Q||k(el){m c.T.3k(el)},c)},29:k(){c.2l=1n;Q.3h(\'2M\',c.1G.5o);Q.3h(\'5z\',c.1G.29);B(c.C.2S){Q.3h(\'2M\',c.1G.5y);c.1h(\'9e\',[c.4G,c.2S])}c.1h(\'1Q\',c.4G)}});9S.3i(L 2p,L 43);o aI=L 18({C:{aT:k(3W){3W.1P(\'4z\',\'8G\')},aW:k(3W){3W.1P(\'4z\',\'4O\')},8T:30,bp:35,bt:35,1A:\'dX\',5F:{\'x\':16,\'y\':16},4V:O},1i:k(T,C){c.2Y(C);c.45=L P(\'4Z\',{\'4R\':c.C.1A+\'-3W\',\'8J\':{\'1v\':\'3Y\',\'1o\':\'0\',\'1u\':\'0\',\'4z\':\'4O\'}}).28(Q.4B);c.3c=L P(\'4Z\').28(c.45);$$(T).1q(c.9I,c);B(c.C.1i)c.C.1i.1X(c)},9I:k(el){el.$1W.42=(el.4N&&el.4D()==\'a\')?el.4N.3g(\'9Y://\',\'\'):(el.a1||O);B(el.53){o 6z=el.53.68(\'::\');B(6z.V>1){el.$1W.42=6z[0].5T();el.$1W.5u=6z[1].5T()}14{el.$1W.5u=el.53}el.a7(\'53\')}14{el.$1W.5u=O}B(el.$1W.42&&el.$1W.42.V>c.C.8T)el.$1W.42=el.$1W.42.6K(0,c.C.8T-1)+"&dU;";el.1B(\'8N\',k(I){c.1g(el);B(!c.C.4V)c.8f(I);14 c.1v(el)}.W(c));B(!c.C.4V)el.1B(\'2M\',c.8f.3e(c));o 29=c.29.W(c);el.1B(\'8P\',29);el.1B(\'3V\',29)},1g:k(el){c.3c.1l();B(el.$1W.42){c.53=L P(\'b0\').28(L P(\'4Z\',{\'4R\':c.C.1A+\'-53\'}).28(c.3c)).5s(el.$1W.42)}B(el.$1W.5u){c.1K=L P(\'b0\').28(L P(\'4Z\',{\'4R\':c.C.1A+\'-1K\'}).28(c.3c)).5s(el.$1W.5u)}$55(c.1H);c.1H=c.4d.2g(c.C.bp,c)},29:k(I){$55(c.1H);c.1H=c.3Z.2g(c.C.bt,c)},1v:k(G){o 1m=G.3p();c.45.4A({\'1u\':1m.x+c.C.5F.x,\'1o\':1m.y+c.C.5F.y})},8f:k(I){o am={\'x\':U.8m(),\'y\':U.8n()};o 2G={\'x\':U.8u(),\'y\':U.8v()};o 3W={\'x\':c.45.4b,\'y\':c.45.3R};o 1V={\'x\':\'1u\',\'y\':\'1o\'};M(o z 1a 1V){o 1m=I.1Y[z]+c.C.5F[z];B((1m+3W[z]-2G[z])>am[z])1m=I.1Y[z]-c.C.5F[z]-3W[z];c.45.1P(1V[z],1m)}},4d:k(){B(c.C.aq)c.1H=c.3Z.2g(c.C.aq,c);c.1h(\'aT\',[c.45])},3Z:k(){c.1h(\'aW\',[c.45])}});aI.3i(L 2p,L 43);o dV=L 18({1i:k(){c.6D=$A(1b);c.19={};c.4U={}},1B:k(F,fn){c.4U[F]=c.4U[F]||{};c.19[F]=c.19[F]||[];B(c.19[F].1j(fn))m O;14 c.19[F].1k(fn);c.6D.1q(k(5v,i){5v.1B(F,c.4i.W(c,[F,5v,i]))},c);m c},4i:k(F,5v,i){c.4U[F][i]=1e;o 4F=c.6D.4F(k(2i,j){m c.4U[F][j]||O},c);B(!4F)m;c.4U[F]={};c.19[F].1q(k(I){I.1X(c,c.6D,5v)},c)}});o 7t=1f.26.R({C:{7K:18.1l,aa:18.1l,3Q:0,4d:O,2N:1e,2y:O,21:1e,7f:O,7n:O,3T:O,6I:O},1i:k(){o C,2B,T,2d;$1q(1b,k(4t,i){22($F(4t)){Y\'2I\':C=4t;1C;Y\'G\':2d=$(4t);1C;62:o 2r=$$(4t);B(!2B)2B=2r;14 T=2r}});c.2B=2B||[];c.T=T||[];c.2d=$(2d);c.2Y(C);c.2l=-1;B(c.C.6I)c.C.3T=1e;B($2A(c.C.4d)){c.C.3Q=O;c.2l=c.C.4d}B(c.C.1g){c.C.3Q=O;c.C.4d=O}c.3U={};B(c.C.21)c.3U.21=\'b8\';B(c.C.2y)c.3U.2y=c.C.7n?\'aj\':\'4b\';B(c.C.2N)c.3U.2N=c.C.7f?\'9n\':\'5P\';M(o i=0,l=c.2B.V;i0));c.1h(3Z?\'aa\':\'7K\',[c.2B[i],el]);M(o 2O 1a c.3U)N[i][2O]=3Z?0:el[c.3U[2O]]},c);m c.1g(N)},dW:k(25){m c.3Q(25)}});1f.7t=7t;',62,956,'||||||||||||this||||||||function||return||var|||||||||||||if|options|||type|element||event|value|property|new|for|obj|false|Element|document|extend||elements|window|length|bind||case||||now||else|from||to|Class|events|in|arguments|Math|param|true|Fx|start|fireEvent|initialize|contains|push|empty|pos|null|top|args|each|parent|rgb|key|left|position|name|items|css|array|className|addEvent|break|max|offset|limit|bound|timer|values|properties|text|prototype|result|style|keys|setStyle|onComplete|stop|selector|data|props|prop|tmp|call|page|source||opacity|switch|method||index|Elements||inject|end|merge|mode|join|container|parsed|transition|delay|getStyle|current|set|overflown|previous|hsb|step|relatedTarget|Events|round|temp|script|Array|transport|test|custom|unit|width|string|chk|togglers|addListener|map|color|Garbage|scroll|Methods|object|nocash|remove|url|mousemove|height|fx|ie|Color|border|ghost|Base|params|parse|hue|Event|setOptions|documentElement||match||getElementsByTagName|margin|100|filter||||create|context|wrapper|toInt|bindWithEvent|overed|replace|removeListener|implement|toggler|indexOf|size|mouse|parentNode|Transitions|getPosition|tag|item|min|CSS|iCss|target|pow|next|scripts|option|time|shared|hex|drag|modifiers|change|scrollTo|Cookie|Json|handle|anchor|response|Abstract|returns|Hash|bottom|display|offsetHeight|len|wait|effects|trash|tip|onStart|absolute|hide||iterable|myTitle|Options|getValue|toolTip||iTo|select|duration|xpath|offsetWidth|Styles|show|load|periodical|Drag|knob|check|apply|increase|toString|val|right|compute|delta|setNow|cont|src|argument|id|chains|padding|webkit|link|visibility|setStyles|body|removeEvent|getTag|getCoordinates|every|active|str|status|headers|cookie|handles|number|href|hidden|grid|running|class|image|pick|checker|fixed|px|open|results|div||255|collect|title|mix|clear|getNow|delete|sources|post|mousewheel|fromTo|catch|bit|native|queryString|secure|onSuccess|htmlElement|try|location|setHeader|readyState|mousedown|move|list|get|evaluate|setHTML|xml|myText|instance|links|webkit419|moveGhost|mouseup|toQueryString|HTMLElement|regexp|isSuccess|rgbToHex|offsets|hexToRgb|_method|colors|encoding|setLength|toLowerCase|unique|onload|parseInt|scrollHeight|iFrom|getProperty|include|trim|iNow|scrollLeft|red|domReady|precision|klass||walk|default|scrollTop|layout|green|parseFloat|on|split|out|send|area|droppables|mp|head|attempt|evType|click|String|addEvents|date|continue|fix|XHR|setProperties|currentStyle|counter|included|images|hasKey|brother|injectAfter|onFailure|generic|saturation|dual|Properties|loaded|XMLHttpRequest|instances|steps|onChange|checkStep|mod|alwaysHide|Listeners|substr|draggedKnob|snap|getElements|code|up|fKey|evalScripts|tagName|prev|stopPropagation|attach|getElementById|preventDefault|getElementsBySelector|while|relative|scrollWidth|setMany|Multi|splice|blue|realType|defined|removeEvents|regex|percent|forEach|typeof|alpha|encodeURIComponent|fixedHeight|getSize|scrollSize|onreadystatechange|none|path|setProperty|proto|fixedWidth|domain|evalResponse|setTransport|clean|hasClass|Accordion|Chain|unload|onCancel|update|RegExp|callChain|toUpperCase|transitions|qs|disabled|checked|add|pairs|getMany|ie_ready|multiple|onActive|getParam|found|xhtml|getItems|concat|selected|Dom|domready|Style|Transition|flag|PI|compat|injectBefore|Function|getLast|node|operator|innerText|nodeType|iProps|appendChild|cssText|firstChild|easeType|camelCase|DOMMouseScroll|random|charAt|copy|locate|newArray|rgbToHsb|merged|addEventListener|brightness|rr|getWidth|getHeight|hasChild|complete|javascript|gecko|abort|callee|getScrollLeft|getScrollTop|pageY|img|mousemover|coord|toElement|Slider|toStep|previousEnd|pageX|coordinates|visible|getChildren|getNext|styles|previousChange|onTick|horizontal|mouseenter|velocity|mouseleave|vertical|capitalize|onDrag|maxTitleChars|lim|NativeEvents|gr|Object|mouseout|first|mouseover|insertBefore|getScrollHeight|getScrollWidth|after|cancel|Date|borderShort|fps|pageXOffset|opera|Ajax|clientWidth|clientHeight|onDragComplete|clientX|onRequest|request|pageYOffset|Single|before|Merge|pp|fullHeight|ActiveXObject|wheelDelta|floor|wheelStops|onStateChange|beforeunload|iParsed|direction|getTime|Scroller|overflow|addClass|getCoords|client|constructor|clickedElement|removeClass|detach|clone|onDragStart|build|application|which|useLink|setTimeout|undefined|execScript|getElement|converter|Content|Sortables|normal|sel|contents|getPrevious|keydown|http|prefix|toPosition|rel|filterById|PropertiesIFlag|removeEventListener|half|Left|removeAttribute|filterByClass|filterByAttribute|onBackground|input|resolver|textarea|getFormElements|getHeader|ie6|Scroll|getPos|fullWidth|zoom|onBeforeStart|win|onProgress|distance||timeout|Asset|onSnap|clientY|cloneEvents|cos|autoSave|nodeValue|where|Bottom|idx|elementsProperty|childNodes|relatedTargetGecko|error|defaultView|urlEncoded|toFloat|Tips|createElement|shift|hyphenate|Move|Number|checkAgainst|getLeft|getTop|addSection|www|onShow|fixRelatedTarget|interval|onHide|save|picked|autoCancel|span|textContent|adopt|innerHTML|styleSheet|escapeRegExp|fixStyle|6000|fullOpacity|hsbToRgb|slideIn|slideOut|360|1000|async|Width|getStyles|slice|Top|sin|setOpacity|removeChild|600000|appendText|0px|showDelay|extended||Right|hideDelay|full|button|menu|shiftKey|metaKey|altKey|fromCharCode|frameborder|ctrlKey|attachEvent|detail|srcElement|control|CollectGarbage|readonly|frameBorder|alt|keyCode|111|readOnly|meta|detachEvent|120|rightClick|wheel|pass|some|associate|getRandom|clearChain|chain|DOMElement|execCommand|BackgroundImageCache|transparent|setInterval|embed|boolean|injectInside|times|bindAsEventListener|err|fromElement|iframe|khtml|whitespace|collection|clearTimeout|textnode|nodeName|MooTools|version|clearInterval|Window|taintEnabled|webkit420|getBoxObjectFor|navigator|all|Document|ie7|injectTop|cloneNode|borderStyle|borderColor|htmlFor|borderWidth|getText|getProperties|setAttribute|setText|colspan|colSpan|tabindex|tabIndex|maxlength|accessKey|accesskey|rowspan|rowSpan|removeProperty|attributes|float|styleFloat|cssFloat|toggleClass|createTextNode|replaceWith|replaceChild|zIndex|hasLayout|lastChild|getParent|getAttribute|getFirst|Sibling|getComputedStyle|getPropertyValue|maxLength|overrideMimeType|200|300|responseText|urlencoded|form|cancelBubble|XMLHTTP|charset|responseXML|Connection|Accept|html|ecma|With|Requested|close|setRequestHeader|postBody||utf|makeDraggable|Bounce|Elastic|Quad|618|Back|Circ|acos|Sine|Cubic|Quart|over|drop|emptydrop|leave|makeResizable|Quint|sqrt|java|gi|setHue|setSaturation|setBrightness|invert|pop|onerror|Image|4096|RGB|HSB|hellip|Group|showThisHideOpen|tool|serialize|10000|SmoothScroll|hash|onabort|screen|toGMTString|decodeURIComponent|isFinite|expires|setTime|exec|getResponseHeader|action|Eaeflnr|eval|readystatechange|stylesheet|media|json|JSON|Remote|Request||Expo|Microsoft|substring|XPathResult|UNORDERED_NODE_SNAPSHOT_TYPE|with|starts|ES|namespaceURI|snapshotLength|snapshotItem|checkbox|radio|getElementsByClassName|1999|w3|org|Pow|contextmenu|space|backspace|tab|esc|down|returnValue|enter|dblclick|keypress|submit|reset|blur|focus|keyup|resize|password|filterByTag|toLeft|toRight|Slide|toBottom|toTop|clearTimer|effect|toggle|easeIn|InOut|ease|Out|In|easeOut|easeInOut|500|linear|defer|DOMContentLoaded|protocol|write|offsetTop|https|offsetParent|void|innerWidth|onDomReady||innerHeight|offsetLeft'.split('|'),0,{})) diff --git a/src/video/js/videobox.js b/src/video/js/videobox.js index 1330e3e..daf636f 100644 --- a/src/video/js/videobox.js +++ b/src/video/js/videobox.js @@ -1,166 +1,166 @@ -var Videobox = { - - init: function (options) { - // init default options - this.options = Object.extend({ - resizeDuration: 400, // Duration of height and width resizing (ms) - initialWidth: 250, // Initial width of the box (px) - initialHeight: 250, // Initial height of the box (px) - defaultWidth: 425, // Default width of the box (px) - defaultHeight: 350, // Default height of the box (px) - animateCaption: true, // Enable/Disable caption animation - flvplayer: 'swf/flvplayer.swf' - }, options || {}); - - this.anchors = []; - $A($$('a')).each(function(el){ - if(el.rel && el.href && el.rel.test('^vidbox', 'i')) { - el.addEvent('click', function (e) { - e = new Event(e); - e.stop(); - this.click(el); - }.bind(this)); - this.anchors.push(el); - } - }, this); - - this.overlay = new Element('div').setProperty('id', 'lbOverlay').injectInside(document.body); - this.center = new Element('div').setProperty('id', 'lbCenter').setStyles({width: this.options.initialWidth+'px', height: this.options.initialHeight+'px', marginLeft: '-'+(this.options.initialWidth/2)+'px', display: 'none'}).injectInside(document.body); - - this.bottomContainer = new Element('div').setProperty('id', 'lbBottomContainer').setStyle('display', 'none').injectInside(document.body); - this.bottom = new Element('div').setProperty('id', 'lbBottom').injectInside(this.bottomContainer); - new Element('a').setProperties({id: 'lbCloseLink', href: '#'}).injectInside(this.bottom).onclick = this.overlay.onclick = this.close.bind(this); - this.caption = new Element('div').setProperty('id', 'lbCaption').injectInside(this.bottom); - this.number = new Element('div').setProperty('id', 'lbNumber').injectInside(this.bottom); - new Element('div').setStyle('clear', 'both').injectInside(this.bottom); - - var nextEffect = this.nextEffect.bind(this); - this.fx = { - overlay: this.overlay.effect('opacity', {duration: 500}).hide(), - center: this.center.effects({duration: 500, transition: Fx.Transitions.sineInOut, onComplete: nextEffect}), - bottom: this.bottom.effect('margin-top', {duration: 400}) - }; - - }, - - click: function(link) { - - return this.open (link.href, link.title, link.rel); - - }, - open: function(sLinkHref, sLinkTitle, sLinkRel) { - this.href = sLinkHref; - this.title = sLinkTitle; - this.rel = sLinkRel; - this.position(); - this.setup(); - this.video(this.href); - this.top = Window.getScrollTop() + (Window.getHeight() / 15); - this.center.setStyles({top: this.top+'px', display: ''}); - this.fx.overlay.start(0.8); - this.step = 1; - this.center.setStyle('background','#fff url(loading.gif) no-repeat center'); - this.caption.innerHTML = this.title; - this.fx.center.start({'height': [this.options.contentsHeight]}); - }, - - setup: function(){ - var aDim = this.rel.match(/[0-9]+/g); - this.options.contentsWidth = (aDim && (aDim[0] > 0)) ? aDim[0] : this.options.defaultWidth; - this.options.contentsHeight = (aDim && (aDim[1] > 0)) ? aDim[1] : this.options.defaultHeight; - - }, - - position: function(){ - this.overlay.setStyles({'top': window.getScrollTop()+'px', 'height': window.getHeight()+'px'}); - }, - - video: function(sLinkHref){ - if (sLinkHref.match(/youtube\.com\/watch/i)) { - this.flash = true; - var hRef = sLinkHref; - var videoId = hRef.split('='); - this.videoID = videoId[1]; - this.so = new SWFObject("http://www.youtube.com/v/"+this.videoID, "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0"); - this.so.addParam("wmode", "transparent"); - } - else if (sLinkHref.match(/metacafe\.com\/watch/i)) { - this.flash = true; - var hRef = sLinkHref; - var videoId = hRef.split('/'); - this.videoID = videoId[4]; - this.so = new SWFObject("http://www.metacafe.com/fplayer/"+this.videoID+"/.swf", "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0"); - this.so.addParam("wmode", "transparent"); - } - else if (sLinkHref.match(/google\.com\/videoplay/i)) { - this.flash = true; - var hRef = sLinkHref; - var videoId = hRef.split('='); - this.videoID = videoId[1]; - this.so = new SWFObject("http://video.google.com/googleplayer.swf?docId="+this.videoID+"&hl=en", "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0"); - this.so.addParam("wmode", "transparent"); - } - else if (sLinkHref.match(/ifilm\.com\/video/i)) { - this.flash = true; - var hRef = sLinkHref; - var videoId = hRef.split('video/'); - this.videoID = videoId[1]; - this.so = new SWFObject("http://www.ifilm.com/efp", "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0", "#000"); - this.so.addVariable("flvbaseclip", this.videoID+"&"); - this.so.addParam("wmode", "transparent"); - } - else if (sLinkHref.match(/\.mov/i)) { - this.flash = false; - if (navigator.plugins && navigator.plugins.length) { - this.other =''; - } else { - this.other = ''; - } - } - else if (sLinkHref.match(/\.wmv/i) || sLinkHref.match(/\.asx/i)) { - this.flash = false; - this.other = '' - } - else if (sLinkHref.match(/\.flv/i)) { - this.flash = true; - this.so = new SWFObject(this.options.flvplayer+"?file="+sLinkHref, "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0", "#000"); - } - else { - this.flash = true; - this.videoID = sLinkHref; - this.so = new SWFObject(this.videoID, "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0"); - } - }, - - nextEffect: function(){ - switch (this.step++){ - case 1: - this.fx.center.start({'width': [this.options.contentsWidth], 'marginLeft': [this.options.contentsWidth/-2]}); - break; - this.step++; - case 2: - this.center.setStyle('background','#fff'); - this.flash ? this.so.write(this.center) : this.center.setHTML(this.other) ; - this.bottomContainer.setStyles({top: (this.top + this.center.clientHeight)+'px', height: '0px', marginLeft: this.center.style.marginLeft, width: this.options.contentsWidth+'px',display: ''}); - if (this.options.animateCaption){ - this.fx.bottom.set(-this.bottom.offsetHeight); - this.bottomContainer.style.height = ''; - this.fx.bottom.start(0); - break; - } - this.bottomContainer.style.height = ''; - this.step++; - } - }, - - close: function(){ - this.fx.overlay.start(0); - this.center.style.display = this.bottomContainer.style.display = 'none'; - this.center.innerHTML = ''; - return false; - } - -}; - - +var Videobox = { + + init: function (options) { + // init default options + this.options = Object.extend({ + resizeDuration: 400, // Duration of height and width resizing (ms) + initialWidth: 250, // Initial width of the box (px) + initialHeight: 250, // Initial height of the box (px) + defaultWidth: 425, // Default width of the box (px) + defaultHeight: 350, // Default height of the box (px) + animateCaption: true, // Enable/Disable caption animation + flvplayer: 'swf/flvplayer.swf' + }, options || {}); + + this.anchors = []; + $A($$('a')).each(function(el){ + if(el.rel && el.href && el.rel.test('^vidbox', 'i')) { + el.addEvent('click', function (e) { + e = new Event(e); + e.stop(); + this.click(el); + }.bind(this)); + this.anchors.push(el); + } + }, this); + + this.overlay = new Element('div').setProperty('id', 'lbOverlay').injectInside(document.body); + this.center = new Element('div').setProperty('id', 'lbCenter').setStyles({width: this.options.initialWidth+'px', height: this.options.initialHeight+'px', marginLeft: '-'+(this.options.initialWidth/2)+'px', display: 'none'}).injectInside(document.body); + + this.bottomContainer = new Element('div').setProperty('id', 'lbBottomContainer').setStyle('display', 'none').injectInside(document.body); + this.bottom = new Element('div').setProperty('id', 'lbBottom').injectInside(this.bottomContainer); + new Element('a').setProperties({id: 'lbCloseLink', href: '#'}).injectInside(this.bottom).onclick = this.overlay.onclick = this.close.bind(this); + this.caption = new Element('div').setProperty('id', 'lbCaption').injectInside(this.bottom); + this.number = new Element('div').setProperty('id', 'lbNumber').injectInside(this.bottom); + new Element('div').setStyle('clear', 'both').injectInside(this.bottom); + + var nextEffect = this.nextEffect.bind(this); + this.fx = { + overlay: this.overlay.effect('opacity', {duration: 500}).hide(), + center: this.center.effects({duration: 500, transition: Fx.Transitions.sineInOut, onComplete: nextEffect}), + bottom: this.bottom.effect('margin-top', {duration: 400}) + }; + + }, + + click: function(link) { + + return this.open (link.href, link.title, link.rel); + + }, + open: function(sLinkHref, sLinkTitle, sLinkRel) { + this.href = sLinkHref; + this.title = sLinkTitle; + this.rel = sLinkRel; + this.position(); + this.setup(); + this.video(this.href); + this.top = Window.getScrollTop() + (Window.getHeight() / 15); + this.center.setStyles({top: this.top+'px', display: ''}); + this.fx.overlay.start(0.8); + this.step = 1; + this.center.setStyle('background','#fff url(loading.gif) no-repeat center'); + this.caption.innerHTML = this.title; + this.fx.center.start({'height': [this.options.contentsHeight]}); + }, + + setup: function(){ + var aDim = this.rel.match(/[0-9]+/g); + this.options.contentsWidth = (aDim && (aDim[0] > 0)) ? aDim[0] : this.options.defaultWidth; + this.options.contentsHeight = (aDim && (aDim[1] > 0)) ? aDim[1] : this.options.defaultHeight; + + }, + + position: function(){ + this.overlay.setStyles({'top': window.getScrollTop()+'px', 'height': window.getHeight()+'px'}); + }, + + video: function(sLinkHref){ + if (sLinkHref.match(/youtube\.com\/watch/i)) { + this.flash = true; + var hRef = sLinkHref; + var videoId = hRef.split('='); + this.videoID = videoId[1]; + this.so = new SWFObject("http://www.youtube.com/v/"+this.videoID, "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0"); + this.so.addParam("wmode", "transparent"); + } + else if (sLinkHref.match(/metacafe\.com\/watch/i)) { + this.flash = true; + var hRef = sLinkHref; + var videoId = hRef.split('/'); + this.videoID = videoId[4]; + this.so = new SWFObject("http://www.metacafe.com/fplayer/"+this.videoID+"/.swf", "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0"); + this.so.addParam("wmode", "transparent"); + } + else if (sLinkHref.match(/google\.com\/videoplay/i)) { + this.flash = true; + var hRef = sLinkHref; + var videoId = hRef.split('='); + this.videoID = videoId[1]; + this.so = new SWFObject("http://video.google.com/googleplayer.swf?docId="+this.videoID+"&hl=en", "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0"); + this.so.addParam("wmode", "transparent"); + } + else if (sLinkHref.match(/ifilm\.com\/video/i)) { + this.flash = true; + var hRef = sLinkHref; + var videoId = hRef.split('video/'); + this.videoID = videoId[1]; + this.so = new SWFObject("http://www.ifilm.com/efp", "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0", "#000"); + this.so.addVariable("flvbaseclip", this.videoID+"&"); + this.so.addParam("wmode", "transparent"); + } + else if (sLinkHref.match(/\.mov/i)) { + this.flash = false; + if (navigator.plugins && navigator.plugins.length) { + this.other =''; + } else { + this.other = ''; + } + } + else if (sLinkHref.match(/\.wmv/i) || sLinkHref.match(/\.asx/i)) { + this.flash = false; + this.other = '' + } + else if (sLinkHref.match(/\.flv/i)) { + this.flash = true; + this.so = new SWFObject(this.options.flvplayer+"?file="+sLinkHref, "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0", "#000"); + } + else { + this.flash = true; + this.videoID = sLinkHref; + this.so = new SWFObject(this.videoID, "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0"); + } + }, + + nextEffect: function(){ + switch (this.step++){ + case 1: + this.fx.center.start({'width': [this.options.contentsWidth], 'marginLeft': [this.options.contentsWidth/-2]}); + break; + this.step++; + case 2: + this.center.setStyle('background','#fff'); + this.flash ? this.so.write(this.center) : this.center.setHTML(this.other) ; + this.bottomContainer.setStyles({top: (this.top + this.center.clientHeight)+'px', height: '0px', marginLeft: this.center.style.marginLeft, width: this.options.contentsWidth+'px',display: ''}); + if (this.options.animateCaption){ + this.fx.bottom.set(-this.bottom.offsetHeight); + this.bottomContainer.style.height = ''; + this.fx.bottom.start(0); + break; + } + this.bottomContainer.style.height = ''; + this.step++; + } + }, + + close: function(){ + this.fx.overlay.start(0); + this.center.style.display = this.bottomContainer.style.display = 'none'; + this.center.innerHTML = ''; + return false; + } + +}; + + window.addEvent('domready', Videobox.init.bind(Videobox)); \ No newline at end of file diff --git a/src/y_key_17a7704ed6d8b7aa.html b/src/y_key_17a7704ed6d8b7aa.html index 3167b64..5b9029d 100644 --- a/src/y_key_17a7704ed6d8b7aa.html +++ b/src/y_key_17a7704ed6d8b7aa.html @@ -1,10 +1,10 @@ - - - - - - - - - + + + + + + + + + \ No newline at end of file