├── .gitignore
├── system
├── images
│ ├── loader.gif
│ ├── controls.png
│ └── loader_1.gif
├── stylesheets
│ ├── transparent.gif
│ ├── mashi.hacks.ie.css
│ ├── mashi.hacks.opera.css
│ ├── mashi.hacks.ie7.css
│ ├── mashi.hacks.ie6.css
│ ├── ie_png_fix.css
│ ├── mashi.reset.css
│ └── mashi.css
└── javascripts
│ ├── mashi
│ ├── mashi.controls.js
│ ├── object
│ │ ├── mashi.object.typewriter.js
│ │ ├── mashi.object.animation.js
│ │ └── mashi.object.easing.js
│ ├── mashi.preloader.js
│ ├── mashi.IEhacks.js
│ ├── mashi.object.js
│ ├── mashi.helper.js
│ └── mashi.modules.min.js
│ └── mashi.min.js
├── application
├── content
│ ├── images
│ │ ├── bottle.png
│ │ ├── github.png
│ │ ├── shirt.gif
│ │ ├── shirt.png
│ │ ├── bg-trans.png
│ │ ├── bubbles.png
│ │ ├── twitter.png
│ │ ├── browser
│ │ │ ├── IE.png
│ │ │ ├── IPad.png
│ │ │ ├── Opera.png
│ │ │ ├── Chrome.png
│ │ │ ├── Firefox.png
│ │ │ ├── IPad-big.png
│ │ │ ├── IPhone.png
│ │ │ └── Safari.png
│ │ ├── logo_249x95.png
│ │ ├── postit
│ │ │ ├── body.png
│ │ │ ├── footer.png
│ │ │ ├── header.png
│ │ │ ├── body-bw.png
│ │ │ ├── footer-bw.png
│ │ │ ├── header-bw.png
│ │ │ └── header2.png
│ │ ├── twitter-bird.png
│ │ └── twitter-logo.png
│ └── intro.js
├── intro-local.htm
├── intro-appspot.htm
├── tests.css
├── init.js
├── inline.htm
└── custom.css
├── RELEASENOTES.md
├── LICENSE.md
├── plugins
├── mashi
│ ├── fx-glow.js
│ ├── fx-text-animation.js
│ └── fx-canvas-circles.js
└── thirdparty
│ └── excanvas.js
├── README.md
└── gpl-2.0.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | *.DS_Store
2 |
--------------------------------------------------------------------------------
/system/images/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/system/images/loader.gif
--------------------------------------------------------------------------------
/system/images/controls.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/system/images/controls.png
--------------------------------------------------------------------------------
/system/images/loader_1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/system/images/loader_1.gif
--------------------------------------------------------------------------------
/system/stylesheets/transparent.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/system/stylesheets/transparent.gif
--------------------------------------------------------------------------------
/application/content/images/bottle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/bottle.png
--------------------------------------------------------------------------------
/application/content/images/github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/github.png
--------------------------------------------------------------------------------
/application/content/images/shirt.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/shirt.gif
--------------------------------------------------------------------------------
/application/content/images/shirt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/shirt.png
--------------------------------------------------------------------------------
/application/content/images/bg-trans.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/bg-trans.png
--------------------------------------------------------------------------------
/application/content/images/bubbles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/bubbles.png
--------------------------------------------------------------------------------
/application/content/images/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/twitter.png
--------------------------------------------------------------------------------
/application/content/images/browser/IE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/browser/IE.png
--------------------------------------------------------------------------------
/application/content/images/logo_249x95.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/logo_249x95.png
--------------------------------------------------------------------------------
/application/content/images/postit/body.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/postit/body.png
--------------------------------------------------------------------------------
/application/content/images/browser/IPad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/browser/IPad.png
--------------------------------------------------------------------------------
/application/content/images/browser/Opera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/browser/Opera.png
--------------------------------------------------------------------------------
/application/content/images/postit/footer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/postit/footer.png
--------------------------------------------------------------------------------
/application/content/images/postit/header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/postit/header.png
--------------------------------------------------------------------------------
/application/content/images/twitter-bird.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/twitter-bird.png
--------------------------------------------------------------------------------
/application/content/images/twitter-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/twitter-logo.png
--------------------------------------------------------------------------------
/application/content/images/browser/Chrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/browser/Chrome.png
--------------------------------------------------------------------------------
/application/content/images/browser/Firefox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/browser/Firefox.png
--------------------------------------------------------------------------------
/application/content/images/browser/IPad-big.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/browser/IPad-big.png
--------------------------------------------------------------------------------
/application/content/images/browser/IPhone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/browser/IPhone.png
--------------------------------------------------------------------------------
/application/content/images/browser/Safari.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/browser/Safari.png
--------------------------------------------------------------------------------
/application/content/images/postit/body-bw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/postit/body-bw.png
--------------------------------------------------------------------------------
/application/content/images/postit/footer-bw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/postit/footer-bw.png
--------------------------------------------------------------------------------
/application/content/images/postit/header-bw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/postit/header-bw.png
--------------------------------------------------------------------------------
/application/content/images/postit/header2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/up/mashi/HEAD/application/content/images/postit/header2.png
--------------------------------------------------------------------------------
/system/stylesheets/mashi.hacks.ie.css:
--------------------------------------------------------------------------------
1 | /* ### MODULE PRELOADER ############################################################## */
2 |
3 | #progressIndicator {
4 | height: 49%;
5 | }
6 |
--------------------------------------------------------------------------------
/system/stylesheets/mashi.hacks.opera.css:
--------------------------------------------------------------------------------
1 | /* ### MODULE PRELOADER ############################################################## */
2 |
3 | #progressIndicator {
4 | height: 49%;
5 | }
6 |
7 |
--------------------------------------------------------------------------------
/system/stylesheets/mashi.hacks.ie7.css:
--------------------------------------------------------------------------------
1 | #progressIndicator {
2 | height: 48%;
3 | }
4 | #textframe_gp {
5 | overflow: hidden;
6 | height:100%;
7 | position: relative;
8 | }
9 | #textframe_p {
10 | margin-top: expression((document.getElementById('textframe_gp').offsetHeight - document.getElementById('textframe_p').offsetHeight)/2);
11 | }
12 |
13 | #textframe ul,
14 | #textframe li {
15 | margin: 0 50px;
16 | padding: 0 50px;
17 | }
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/system/stylesheets/mashi.hacks.ie6.css:
--------------------------------------------------------------------------------
1 | #progressIndicator {
2 | height: 48%;
3 | }
4 | #textframe_gp {
5 | overflow: hidden;
6 | position: relative !important;
7 | }
8 | #textframe_p {
9 | position: absolute;
10 | top: 50%;
11 | width: 100%;
12 | text-align: center;
13 | }
14 | #textframe {
15 | position: relative;
16 | top: -50%;
17 | }
18 | #textframe ul,
19 | #textframe li {
20 | margin: 0 50px;
21 | padding: 0 70px;
22 | }
23 |
24 | #mashi-controls a {
25 | line-height: 10px;
26 | }
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/RELEASENOTES.md:
--------------------------------------------------------------------------------
1 | #Release Notes
2 | Mashi Timeline Toolkit
3 | (http://mashi.tv/REALESENOTES.md)
4 |
5 | -------------------------------------------------------------------------------
6 | ####[2011-06-11: VERSION 1.0.0 - REVISION 21]
7 | **********************
8 |
9 | [FIXED] 'isReady' BUG in IE9
10 |
11 | -------------------------------------------------------------------------------
12 | ####[2011-05-03: VERSION 1.0.0 - REVISION 20]
13 | **********************
14 |
15 | Second public release.
16 |
17 | [CHANGED] Almost everything.
18 |
19 | -------------------------------------------------------------------------------
20 | ####[2010-08-24: VERSION 0.9.3 - REVISION 12]
21 | **********************
22 |
23 | First public release.
24 |
--------------------------------------------------------------------------------
/system/stylesheets/ie_png_fix.css:
--------------------------------------------------------------------------------
1 | * html img,
2 | * html .png {
3 | position: relative;
4 | behavior: expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
5 | this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')",
6 | this.src = "stylesheets/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
7 | this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')",
8 | this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/application/intro-local.htm:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 | Mashi Minify Local Test
8 |
9 |
10 |
11 |
24 |
25 |
28 |
29 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/application/intro-appspot.htm:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 | Mashi Minify CDN (appspot.com) Test
8 |
9 |
10 |
11 |
24 |
25 |
28 |
29 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/application/tests.css:
--------------------------------------------------------------------------------
1 | /*
2 | Author: uli preuss
3 | Author URI: http://ulipreuss.eu
4 | */
5 |
6 | /* mac hide \*/
7 | html, body {
8 | height:100%;
9 | width: 100%;
10 | }
11 | /* end hide */
12 |
13 | body {
14 | font-size: 12px;
15 | color: #444;
16 | background-color: #111;
17 | line-height: 1;
18 | overflow: hidden;
19 | }
20 |
21 | * {
22 | font-family: 'Trebuchet MS', Arial, sans serif;
23 | }
24 |
25 |
26 | a {
27 | color: #FFD59F;
28 | }
29 |
30 | img {
31 | border: none;
32 | }
33 |
34 | #outer {
35 | height: 100%;
36 | width: 100%;
37 | display: table;
38 | vertical-align: middle;
39 | }
40 | #container {
41 | position:relative;
42 | *top: 20%;
43 | text-align: center;
44 | vertical-align: middle;
45 | display: table-cell;
46 | height: 256px;
47 | }
48 | #inner {
49 | width: 980px;
50 | text-align: center;
51 | margin: 0 auto;
52 | position: relative;
53 | }
54 |
55 | #splash {
56 | border: 1px solid #222;
57 | padding: 0px;
58 | position: relative;
59 | text-align: left;
60 | }
61 |
62 | #splash,
63 | canvas {
64 | width: 910px;
65 | height: 304px;
66 | }
67 |
68 | #progressIndicator {
69 | padding-top: 19px !important;
70 | }
71 |
72 | p#copyright {
73 | margin: 0 10px;
74 | text-align: right;
75 | font-size: 11px;
76 | }
77 |
78 |
--------------------------------------------------------------------------------
/system/stylesheets/mashi.reset.css:
--------------------------------------------------------------------------------
1 | .mashi article, .mashi aside, .mashi canvas, .mashi details, .mashi figcaption, .mashi figure, .mashi footer, .mashi header, .mashi hgroup, .mashi menu, .mashi nav, .mashi section, .mashi summary, .mashi time, .mashi mark, .mashi audio, .mashi video, .mashi div, .mashi span, .mashi applet, .mashi object, .mashi iframe, .mashi h1, .mashi h2, .mashi h3, .mashi h4, .mashi h5, .mashi h6, .mashi p, .mashi blockquote, .mashi pre, .mashi a, .mashi abbr, .mashi acronym, .mashi address, .mashi big, .mashi cite, .mashi code, .mashi del, .mashi dfn, .mashi em, .mashi font, .mashi img, .mashi ins, .mashi kbd, .mashi q, .mashi s, .mashi samp, .mashi small, .mashi strike, .mashi strong, .mashi sub, .mashi sup, .mashi tt, .mashi var, .mashi dl, .mashi dt, .mashi dd, .mashi ol, .mashi ul, .mashi li, .mashi fieldset, .mashi form, .mashi label, .mashi legend, .mashi table, .mashi caption, .mashi tbody, .mashi tfoot, .mashi thead, .mashi tr, .mashi th, .mashi td {
2 | margin: 0;
3 | padding: 0;
4 | border: 0;
5 | outline: 0;
6 | font-weight: inherit;
7 | font-style: inherit;
8 | font-size: 100%;
9 | font-family: inherit;
10 | vertical-align: baseline;
11 | }
12 | .mashi body {
13 | line-height: 1;
14 | }
15 | .mashi ol, .mashi ul {
16 | list-style: none;
17 | }
18 | .mashi table {
19 | border-collapse: separate;
20 | border-spacing: 0;
21 | }
22 | .mashi caption, .mashi th, .mashi td {
23 | text-align: left;
24 | font-weight: normal;
25 | }
26 |
--------------------------------------------------------------------------------
/application/init.js:
--------------------------------------------------------------------------------
1 | /* modules */
2 | mashi.module('all');
3 | //mashi.module('preloader');
4 | //mashi.module('controls');
5 | //mashi.module('object.animation');
6 | //mashi.module('object.easing');
7 | //mashi.module('object.typewriter');
8 |
9 | /* plugins */
10 | mashi.plugin('mashi.fx-text-animation');
11 | mashi.plugin('mashi.fx-canvas-circles');
12 | mashi.plugin('thirdparty.processing');
13 | if (_IE_) {
14 | mashi.plugin('thirdparty.excanvas');
15 | }
16 |
17 | mashi.frameset('content.intro');
18 |
19 | var as_callback = function() {
20 | CanvasCircles({
21 | id: 'canvasframe',
22 | frameRate: 30,
23 | speed: 5,
24 | layer: 5,
25 | size: {
26 | base: 10,
27 | relative: [0.7, 5]
28 | },
29 | range: [5000, 5000000],
30 | brightness: {
31 | inner: 70,
32 | outer: 127
33 | },
34 | saturation: 155,
35 | alpha: 20,
36 | hue: 848,
37 | stroke: false,
38 | callback: function() {
39 | //_m_.frame.finished = true;
40 | }
41 | });
42 | };
43 |
44 |
45 | var app_config = function() {
46 | app.config({
47 | meta: {
48 | title: 'Mashi Website Application',
49 | author: 'Uli Preuss'
50 | },
51 | style: {
52 | reset: false
53 | },
54 | buttons: {
55 | type: 'single'
56 | },
57 | animation: {
58 | canvas: true,
59 | start: true
60 | }
61 | });
62 |
63 | };
64 |
65 | if(_IE_) {
66 | window.onload = function() {
67 | app_config();
68 | };
69 | }
70 | else {
71 | app.isReady(function(){
72 | app_config();
73 | });
74 | }
75 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | # Licence
2 |
3 | Mashi - Javascript Timeline Toolkit
4 | http://mashi.tv
5 | Copyright (c) 2008-2011 Uli Preuss
6 | All rights reserved.
7 |
8 | Mashi is free software; you can redistribute it and/or modify it under the
9 | terms of the **version 2 of the GNU General Public License** (the "GPL")
10 | as published by the Free Software Foundation. The GPL license is available
11 | at: [http://www.gnu.org](http://www.gnu.org/licenses/gpl-2.0.txt).
12 |
13 | Some plugins may be the copyright of other authors. These components contain
14 | explicit declarations of copyright in the code itself or/and in LICENSE files
15 | in the directories in which they reside.
16 |
17 | This program is distributed in the hope that it will be useful, but WITHOUT
18 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20 |
21 | ## Licensing Options
22 |
23 | ### FOSS Exception
24 | For developers and distributors of open source software under a FOSS license
25 | other than the GPL, Mashi makes its GPL-licensed Code available under a FOSS
26 | Exception that enables use of Mashi under certain conditions without causing
27 | the entire derivative work to be subject to the GPL.
28 |
29 | ### Commercial License Agreement
30 | Distributors that combine and distribute commercially licensed software with
31 | Mashi software and do not wish to distribute the source code for the
32 | commercially licensed software under version 2 of the GNU General Public
33 | License must enter into a **commercial license agreement** with Mashi.
34 |
35 | For questions and more information about this licensing options, please visit
36 | our website and use the [contact form](http://mashi.tv/#contact)
--------------------------------------------------------------------------------
/application/inline.htm:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 | Mashi Inline Example
8 |
9 |
10 |
11 |
24 |
25 |
26 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/system/stylesheets/mashi.css:
--------------------------------------------------------------------------------
1 | /* MASHI CORE */
2 |
3 | .mashi {
4 | width: 100%;
5 | height: 100%;
6 | background: transparent;
7 | overflow: hidden;
8 | position: absolute;
9 | }
10 |
11 | #textframe {
12 | font-size: 45px;
13 | font-weight: bold;
14 | color: white;
15 | text-align: center;
16 | padding: 20px;
17 | line-height: 1em;
18 | }
19 |
20 | #textframe_gp[id] { /* not IE6 */
21 | display: table;
22 | }
23 | #textframe_p[id] { /* not IE6 */
24 | display: table-cell;
25 | vertical-align: middle;
26 | position: static;
27 | }
28 |
29 |
30 | /* MASHI MODULE PRELOADER */
31 |
32 | .preloadImages,
33 | #mContainer {
34 | visibility: hidden;
35 | }
36 |
37 | #progressIndicator {
38 | background: url(../images/loader.gif) center top no-repeat;
39 | text-align: center;
40 | padding-top: 13px;
41 | height: 50px;
42 | font-size: 8px;
43 | }
44 |
45 |
46 | /* MASHI MODULE CONTROLS */
47 |
48 | #mashi-controls {}
49 |
50 | #mashi-controls a {
51 | display: inline-block;
52 | border: 1px solid #666;
53 | width:33px;
54 | height:20px;
55 | margin-left: 3px;
56 | line-height: 12px;
57 | font-size: 12px;
58 | padding:0;
59 | text-decoration: none;
60 | }
61 | #mashi-controls:last-child {
62 | margin-left: 0px;
63 | }
64 |
65 | #controls-button-start {
66 | background-image:url(../images/controls.png);
67 | background-repeat:no-repeat;
68 | background-position:-6px -12px;
69 | }
70 | #controls-button-start:hover {
71 | background-position:-6px -57px;
72 | }
73 |
74 | #controls-button-stop {
75 | background-image:url(../images/controls.png);
76 | background-repeat:no-repeat;
77 | background-position:-70px -12px;
78 | }
79 | #controls-button-stop:hover {
80 | background-position:-70px -57px;
81 | }
82 |
83 | #controls-button-first {
84 | background-image:url(../images/controls.png);
85 | background-repeat:no-repeat;
86 | background-position:-166px -12px;
87 | }
88 | #controls-button-first:hover {
89 | background-position:-166px -57px;
90 | }
91 |
92 | #controls-button-last {
93 | background-image:url(../images/controls.png);
94 | background-repeat:no-repeat;
95 | background-position:-241px -12px;
96 | }
97 | #controls-button-last:hover {
98 | background-position:-241px -57px;
99 | }
100 |
101 | #controls-button-prev {
102 | background-image:url(../images/controls.png);
103 | background-repeat:no-repeat;
104 | background-position:-129px -12px;
105 | }
106 | #controls-button-prev:hover {
107 | background-position:-129px -57px;
108 | }
109 |
110 | #controls-button-next {
111 | background-image:url(../images/controls.png);
112 | background-repeat:no-repeat;
113 | background-position:-202px -12px;
114 | }
115 | #controls-button-next:hover {
116 | background-position:-202px -57px;
117 | }
118 |
--------------------------------------------------------------------------------
/plugins/mashi/fx-glow.js:
--------------------------------------------------------------------------------
1 | /**
2 | * FX Tool: Glow (Color Fader)
3 | * Copyright (c) 2008-2011, Uli Preuss.
4 | * All Rights Reserved.
5 | */
6 |
7 | /*jslint white: true, onevar: true, undef: true, eqeqeq: true, bitwise: true, regexp: false, newcap: true, immed: true, strict: true, indent: 4 */
8 |
9 | /*global document: false, setInterval: false, clearInterval: false */
10 | var glow, shortenColorDistance, hex2rgb;
11 |
12 | (function () {
13 |
14 | "use strict";
15 |
16 | glow = function (id, property, start, end, steps, speed) {
17 | var el, startrgb, endrgb, er, eg, eb, r, g, b, step, rint, gint, bint;
18 | el = document.getElementById(id);
19 | steps = steps || 20;
20 | speed = speed || 20;
21 | clearInterval(el.ival);
22 | endrgb = hex2rgb(end);
23 | er = endrgb[0];
24 | eg = endrgb[1];
25 | eb = endrgb[2];
26 | if (!el.r) {
27 | startrgb = hex2rgb(start);
28 | r = startrgb[0];
29 | g = startrgb[1];
30 | b = startrgb[2];
31 | el.r = r;
32 | el.g = g;
33 | el.b = b;
34 | }
35 | rint = Math.round(Math.abs(el.r - er) / steps);
36 | gint = Math.round(Math.abs(el.g - eg) / steps);
37 | bint = Math.round(Math.abs(el.b - eb) / steps);
38 | if (rint === 0) {
39 | rint = 1;
40 | }
41 | if (gint === 0) {
42 | gint = 1;
43 | }
44 | if (bint === 0) {
45 | bint = 1;
46 | }
47 | el.step = 1;
48 | el.ival = setInterval(function () {
49 | shortenColorDistance(id, property, steps, er, eg, eb, rint, gint, bint);
50 | },
51 | speed);
52 | };
53 |
54 | shortenColorDistance = function (id, property, steps, er, eg, eb, rint, gint, bint) {
55 | var color, r, g, b, el = document.getElementById(id);
56 | if (el.step <= steps) {
57 | r = el.r;
58 | g = el.g;
59 | b = el.b;
60 | if (r >= er) {
61 | r = r - rint;
62 | } else {
63 | r = parseInt(r, 10) + parseInt(rint, 10);
64 | }
65 | if (g >= eg) {
66 | g = g - gint;
67 | } else {
68 | g = parseInt(g, 10) + parseInt(gint, 10);
69 | }
70 | if (b >= eb) {
71 | b = b - bint;
72 | } else {
73 | b = parseInt(b, 10) + parseInt(bint, 10);
74 | }
75 | color = 'rgb(' + r + ',' + g + ',' + b + ')';
76 | if (property === 'background') {
77 | el.style.backgroundColor = color;
78 | } else if (property === 'border') {
79 | el.style.borderColor = color;
80 | } else {
81 | el.style.color = color;
82 | }
83 | el.r = r;
84 | el.g = g;
85 | el.b = b;
86 | el.step = el.step + 1;
87 | } else {
88 | clearInterval(el.ival);
89 | color = 'rgb(' + er + ',' + eg + ',' + eb + ')';
90 | if (property === 'background') {
91 | el.style.backgroundColor = color;
92 | } else if (property === 'border') {
93 | el.style.borderColor = color;
94 | } else {
95 | el.style.color = color;
96 | }
97 | }
98 | };
99 |
100 | hex2rgb = function (color) {
101 | return [
102 | parseInt(color.substring(0, 2), 16),
103 | parseInt(color.substring(2, 4), 16),
104 | parseInt(color.substring(4, 6), 16)
105 | ];
106 | };
107 |
108 | } ());
109 |
--------------------------------------------------------------------------------
/system/javascripts/mashi/mashi.controls.js:
--------------------------------------------------------------------------------
1 | /*
2 | Mashi Timeline Toolkit - Module Controls
3 | Copyright (c) 2008-2011 Uli Preuss. All Rights Reserved.
4 | Licensed under the terms of the GNU General Public License, version 2
5 | see: http://mashi.tv/license.md for details
6 | */
7 |
8 |
9 | /* JSLINT OPTIONS ********************************************************************* */
10 |
11 | /* jslint
12 | white: true, onevar: true, undef: true, eqeqeq: true, bitwise: true,
13 | regexp: false, newcap: true, immed: true, strict: true, indent: 2
14 | */
15 | /* global
16 | document: false, setInterval: false, mashi: false, _m_: false, _ma_: false, _mhelper_:
17 | false, _IE_: false, _IE_6_7_: false, _IE_8_: false, _IE_7_8_: false, _mIEhacks_: false
18 | */
19 |
20 |
21 | /* JSDOC TOOLKIT COMMENTS *************************************************************** */
22 |
23 | /** @fileOverview Mashi - Module Controls */
24 |
25 | /** Alias for mashi.application.prototype.controls */
26 | var _mac_;
27 |
28 | (function () {
29 |
30 | "use strict";
31 |
32 | if (typeof mashi.application !== "undefined") {
33 | mashi.application.prototype.controls = function () {};
34 | _mac_ = mashi.application.prototype.controls;
35 | }
36 |
37 | /** @private */
38 | _mac_.create = function () {
39 |
40 | var btnDetails, actBtn, controls, parent, layer, i, parts, reg, btn, stageframe;
41 |
42 | btnDetails = ["first|ǀ<", "prev|<<", "start|>", "stop|❙❙", "next|>>", "last|>ǀ"];
43 | switch (_m_.buttons.type) {
44 | case 'single':
45 | actBtn = "start stop";
46 | break;
47 | case 'movie':
48 | actBtn = "start stop";
49 | break;
50 | case 'slideshow':
51 | actBtn = "first prev next last";
52 | break;
53 | case 'all':
54 | actBtn = "first prev start stop next last";
55 | break;
56 | default:
57 | actBtn = "";
58 | }
59 |
60 | if (_m_.buttons.type !== 'none') {
61 | controls = document.createElement("div");
62 | controls.id = "mashi-controls";
63 | controls.setAttribute('class', _m_.id);
64 | if (_m_.buttons.horizontal === "center") {
65 | controls.style.textAlign = "center";
66 | }
67 | parent = _m_.frame.odd.parentNode;
68 | parent.appendChild(controls);
69 |
70 | layer = document.createElement("div");
71 | layer.style.position = "absolute";
72 | layer.style.zIndex = "200";
73 | if (_m_.buttons.vertical === "top") {
74 | if(_IE_6_7_) {
75 | layer.style.top = "5px";
76 | }
77 | else {
78 | layer.style.top = "0px";
79 | }
80 | } else if (_m_.buttons.vertical === "bottom") {
81 | if(_IE_6_7_) {
82 | layer.style.bottom = "5px";
83 | }
84 | else {
85 | layer.style.bottom = "0px";
86 | }
87 | } else if (_m_.buttons.vertical === "middle") {
88 | layer.style.bottom = stageframe.offsetHeight / 2 - 5 + "px";
89 | }
90 |
91 | if (_m_.buttons.horizontal === "right") {
92 | layer.style.right = "5px";
93 | } else if (_m_.buttons.horizontal === "left") {
94 | layer.style.left = "5px";
95 | } else if (_m_.buttons.horizontal === "center") {
96 | layer.style.width = "99%";
97 | }
98 |
99 | controls.appendChild(layer);
100 |
101 | for (i = 0; i < btnDetails.length; i += 1) {
102 | parts = btnDetails[i].split('|');
103 | reg = new RegExp(parts[0], "i");
104 | if (reg.test(actBtn)) {
105 | btn = document.createElement("a");
106 | if (_m_.auto_start === true) {
107 | if (_m_.buttons.type === "single" && parts[0] === "start") {
108 | btn.style.display = "none";
109 | }
110 | } else {
111 | if (_m_.buttons.type === "single" && parts[0] === "stop") {
112 | btn.style.display = "none";
113 | }
114 | }
115 | btn.href = "javascript:" + _m_.namespace + "." + parts[0] + "();";
116 | btn.id = _m_.label.button.base + parts[0];
117 | if (_IE_) {
118 | btn.innerHTML = ' ';
119 | }
120 | if (_m_.buttons.text === true) {
121 | btn.innerHTML = parts[1];
122 | }
123 | layer.appendChild(btn);
124 | }
125 | }
126 | }
127 | };
128 |
129 | }());
130 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | __ __ ___ ____ __ __ __
2 | | \/ | / _ \ / ___| | | | | | |
3 | | | | |_| | | |_ | |__| | | |
4 | | |\/| | | _ | \__ \ | __ | | |
5 | | | | | | | | | ___| | | | | | | |
6 | |__| |__| |__| |__| |____ / |__| |__| |__|
7 | javascript timeline toolkit
8 |
9 |
10 | ### Introduction
11 |
12 | Mashi is a JavaScript Toolkit for timeline-based web applications and ..
13 |
14 | * allows you to create flash-like movies and complex animations with standard (X)HTML, CSS and JavaScript.
15 | * is compact, object-oriented, modular and lightweight: incl. all modules 41kb / 13kb (CDN+GZip)
16 | * requires no additional plugins for basic usage
17 | * supports all major browsers.
18 | * works on iPad, iPhone and any mobile device with a modern browser.
19 | * is framework independent. You can easily integrate your favorite one.
20 | * is under constant development. Visit our timelabs and blog to learn more.
21 |
22 |
23 | ### How it works
24 |
25 | The Mashi toolkit enables you to swiftly create interactive and time-controlled web applications that are easily integrated in your websites.
26 |
27 | Mashi utilizes nothing but standard web technology - HTML, JavaScript, CSS and the DOM. Additional 32 bit PNG-Images are used to create transparency effects. You see, it's only technology every web developer is proficient in and uses every day.
28 |
29 | Unlike other projects Mashi doesn't completely rely on HTML5, the Canvas-Element and CSS3. Mashi apps also work with XHTML and HTML4, which enables them to function properly even in out-dated browsers like IE6. We're pretty sure there's still some people using it. You don't want to leave them out in the rain, right?
30 |
31 | Mashi's base element is the timeline. In contrast to other animation tools mashi uses a scene-based timeline. So you are not limited to your every-day "movie"-timeline divided in dozens of equal frames per second but you can split your timeline into self-contained and independent scenes at will. This allows you to approach your scenes in a much more direct and tangible way.
32 |
33 | The timeline consists of several scenes (frames), that may be combined to one or more framesets or even outsourced to different files. The toolkit loads the framesets into an array.
34 |
35 | The frames themselves consist of two elements only - their duration in milliseconds and a JavaScript function that is called as soon as the scene starts. Inside that function you can use: native JavaScript code, your favorite JS-framework or the methods provided by Mashi.
36 |
37 | All Mashi toolkit files are found in a dedicated folder called 'system'. The development version and the minimized production version can be included locally or you can conveniently use Google's Appspot CDN (Content Delivery Network).
38 |
39 | Mashi offers an automated preloader. It preloads every single graphic used in your app to display it without any delay at the right time. In addition it also loads the appropriate hacks to help our good-ol' IE6 cope with PNG-transparency.
40 |
41 | Switching between different scenes is really easy: Mashi is shipped with the "Controls" module that provides buttons like "play" and "pause" etc. including their associated logics.
42 |
43 | In addition Mashi is already equipped with modules for object and text animation as well as CSS3-effects (e.g. text shadows). Stubborn, out-dated IEs are hacked by Mashi along the way.
44 |
45 | Not enough for you? No problem: It's a cakewalk to use Mashis plug-in mechanism to integrate additional features. Write your own plugin!
46 |
47 | Mashi apps are loaded into an arbitrary element on your website. They use multiple layers: two layers for backgrounds or fading, one pure text layer and a stage layer for any objects. And you can also easily add and use a canvas layer - if needed.
48 |
49 |
50 | ### Mashi Timelabs
51 |
52 | Visit our [timelabs](http://mashi.tv/labs/index.htm) to see some mashi demos, apps and experiments. Rate them and vote for upcoming features.
53 |
54 | Feeling creative? Want to show off? The Labs are open for everyones apps. Just send us an URL to yours and we will add it.
55 |
56 |
57 | ### Documentation
58 |
59 | The [API Documentation](http://mashi.tv/apidoc/index.htm) provides an explanation of every class and its functionality. And you'll find more on our [Blog Page](http://blog.mashi.tv).
60 |
61 |
62 | ### Download
63 |
64 | The Toolkit Mashi at github: [http://github.com/up/mashi](http://github.com/up/mashi)
65 |
66 | $ git clone git@github.com:up/mashi.git
67 |
68 | or download it as
69 | [zip](https://github.com/up/mashi/zipball/master) or
70 | [tar.gz](https://github.com/up/mashi/tarball/master).
71 |
72 |
73 | ### License
74 |
75 | Copyright © 2008-2011 Uli Preuss
76 |
77 | The Mashi Timeline Toolkit is free software; you can redistribute it and/or modify it
78 | under the terms of the version 2 of the GNU General Public License (the "GPL").
79 | For (re)distribution without GPL ask for our commercial license.
80 |
81 | Read the [full licence text](http://mashi.tv/LICENSE.md).
82 |
--------------------------------------------------------------------------------
/system/javascripts/mashi/object/mashi.object.typewriter.js:
--------------------------------------------------------------------------------
1 | /*
2 | Mashi Timeline Toolkit - Module Object Typewriter
3 | Copyright (c) 2008-2011 Uli Preuss. All Rights Reserved.
4 | Licensed under the terms of the GNU General Public License, version 2
5 | see: http://mashi.tv/license.md for details
6 | */
7 |
8 |
9 | /* JSLINT OPTIONS ********************************************************************* */
10 |
11 | /* jslint
12 | white: true, onevar: true, undef: true, eqeqeq: true, bitwise: true, regexp: true,
13 | newcap: true, immed: true, strict: true, indent: 2
14 | */
15 | /* global
16 | setTimeout: false, _m_: false, _ma_: false,
17 | */
18 |
19 |
20 | /* JSDOC TOOLKIT COMMENTS *************************************************************** */
21 |
22 | /** @fileOverview Mashi - Module Object.Typewriter */
23 |
24 | (function () {
25 |
26 | "use strict";
27 |
28 | if (typeof mashi.object !== "undefined") {
29 |
30 | /**
31 | * Typewriter run
32 | * @param {Object} configuration
33 | *
34 | * @example
35 | * infolayer.run({
36 | * html: 'Info text',
37 | * delay: 60,
38 | * wait: 2000
39 | * });
40 | */
41 | mashi.object.prototype.run = function (config) {
42 | _ma_.$(this.id).innerHTML = config.html;
43 |
44 | /** @ignore */
45 | new mashi.object.prototype.typewriter(this.id, config, "").init();
46 | //new mashi.object.prototype.typewriter(this.id, config, "|").init();
47 | };
48 |
49 | /** @private */
50 | mashi.object.prototype.typewriter = function (id, config, cursor) {
51 | var obj = _ma_.$(id);
52 | obj.typewriter = this;
53 | if (typeof obj.innerHTML === "undefined") {
54 | this.running = true;
55 | return;
56 | }
57 | this.delay = (typeof config.delay === "undefined" ? 50 : config.delay);
58 | this.html = obj.innerHTML;
59 | this.cursor = (cursor ? cursor : "");
60 | this.cText = "";
61 | this.curChar = 0;
62 | this.running = false;
63 | this.inTag = false;
64 | this.tagBuffer = "";
65 | this.inHTMLEntity = false;
66 | this.HTMLEntityBuffer = "";
67 |
68 | /** @private */
69 | this.callback = function () {
70 | obj.innerHTML = this.html;
71 | setTimeout(function () {
72 | _m_.frame.finished = true;
73 | }, (typeof config.wait === "undefined" ? 0 : config.wait));
74 | };
75 |
76 | /** @private */
77 | this.init = function () {
78 | if (this.running) {
79 | return;
80 | }
81 | if (typeof this.html === "undefined") {
82 | setTimeout(function () {
83 | if (_ma_.$(obj.id)) {
84 | _ma_.$(obj.id).typewriter.init();
85 | }
86 | }, this.delay);
87 | return;
88 | }
89 | if (this.cText === "") {
90 | obj.innerHTML = "";
91 | }
92 | // this.html = this.html.replace(/<([^<])*>/, ""); // Strip html tags
93 | if (this.curChar < this.html.length) {
94 | if (this.html.charAt(this.curChar) === "<" && !this.inTag) {
95 | this.tagBuffer = "<";
96 | this.inTag = true;
97 | this.curChar += 1;
98 | this.init();
99 | return;
100 | } else if (this.html.charAt(this.curChar) === ">" && this.inTag) {
101 | this.tagBuffer += ">";
102 | this.inTag = false;
103 | this.cText += this.tagBuffer;
104 | this.curChar += 1;
105 | this.init();
106 | return;
107 | } else if (this.inTag) {
108 | this.tagBuffer += this.html.charAt(this.curChar);
109 | this.curChar += 1;
110 | this.init();
111 | return;
112 | } else if (this.html.charAt(this.curChar) === "&" && !this.inHTMLEntity) {
113 | this.HTMLEntityBuffer = "&";
114 | this.inHTMLEntity = true;
115 | this.curChar += 1;
116 | this.init();
117 | return;
118 | } else if (this.html.charAt(this.curChar) === ";" && this.inHTMLEntity) {
119 | this.HTMLEntityBuffer += ";";
120 | this.inHTMLEntity = false;
121 | this.curChar += 1;
122 | this.cText += this.HTMLEntityBuffer;
123 | this.init();
124 | return;
125 | } else if (this.inHTMLEntity) {
126 | this.HTMLEntityBuffer += this.html.charAt(this.curChar);
127 | this.curChar += 1;
128 | this.init();
129 | return;
130 | } else {
131 | this.cText += this.html.charAt(this.curChar);
132 | }
133 | obj.innerHTML = this.cText;
134 | obj.innerHTML += (this.curChar < this.html.length - 1 ? (typeof this.cursor === "function" ? this.cursor(this.cText) : this.cursor) : "");
135 | this.curChar += 1;
136 | setTimeout(function () {
137 | if (_ma_.$(obj.id)) {
138 | _ma_.$(obj.id).typewriter.init();
139 | }
140 | }, this.delay);
141 | } else {
142 | this.cText = "";
143 | this.curChar = 0;
144 | this.running = false;
145 | this.callback();
146 | }
147 | };
148 | };
149 | }
150 | }());
151 |
--------------------------------------------------------------------------------
/system/javascripts/mashi/mashi.preloader.js:
--------------------------------------------------------------------------------
1 | /*
2 | Mashi Timeline Toolkit - Module Preloader
3 | Copyright (c) 2008-2011 Uli Preuss. All Rights Reserved.
4 | Licensed under the terms of the GNU General Public License, version 2
5 | see: http://mashi.tv/license.md for details
6 | */
7 |
8 |
9 | /* JSLINT OPTIONS ********************************************************************* */
10 |
11 | /* jslint
12 | white: true, onevar: true, undef: true, eqeqeq: true, bitwise: true, regexp: false,
13 | newcap: true, immed: true, strict: true, indent: 2
14 | */
15 | /* global
16 | window: false, document: false, setTimeout: false, mashi: false, _m_: false,
17 | _mhelper_: false, _IE_6_: false, MASHI_APP_PATH: false
18 | */
19 |
20 |
21 | /* JSDOC TOOLKIT COMMENTS *************************************************************** */
22 |
23 | /** @fileOverview Mashi - Module Preloader */
24 |
25 | /** Alias for mashi.application.prototype.preloader */
26 | var _map_;
27 |
28 | (function () {
29 |
30 | "use strict";
31 |
32 | if (typeof mashi.application.preloader === "undefined") {
33 |
34 | if (mashi.min === false) {
35 | mashi.module('helper');
36 | }
37 |
38 | _map_ = mashi.application.prototype.preloader = function () {};
39 |
40 | /** @private */
41 | _map_.init = function () {
42 |
43 | var stageframe, stageframe_height, mHTML, i;
44 |
45 | stageframe = document.getElementById('stageframe');
46 | stageframe_height = parseFloat(_mhelper_.getStyle('stageframe', 'height')) / 2 - 17;
47 | _map_.PI = document.createElement('div');
48 | _map_.PI.setAttribute('id', 'progressIndicator');
49 | _map_.PI.style.position = 'relative';
50 | _map_.PI.style.top = '40%';
51 | _map_.PI.style.height = '100%';
52 |
53 | _map_.PI.innerHTML = ' ';
54 | stageframe.appendChild(_map_.PI);
55 |
56 | this.progress = 0;
57 | this.image_array = this.getImages();
58 | if (this.image_array.length === 0) {
59 | this.preloadCallback(1000);
60 | } else {
61 | this.addPreloadLayer();
62 | mHTML = "";
63 |
64 | for (i = 0; i < this.image_array.length; i += 1) {
65 | //Todo: enables background image cache for internet explorer 6
66 | if (_IE_6_) {
67 | // no preload in ie6
68 | _map_.incrementProgress();
69 | } else {
70 | mHTML += '
';
71 |
72 | }
73 |
74 | }
75 | document.getElementById("mContainer").innerHTML = mHTML;
76 | }
77 |
78 | };
79 |
80 | /** @private */
81 | _map_.getImages = function () {
82 |
83 | var reg, func_str, results, k, i, img_arr = [],
84 | pattern, unique_img_arr, matches;
85 |
86 | for (i = 0; i < _m_.frame.array.length; i += 1) {
87 |
88 | reg = new RegExp("src", "ig");
89 | if (reg.test(_m_.frame.array[i])) {
90 | func_str = _m_.frame.array[i][1].toString();
91 | results = func_str.match(/src.+(png|gif|jpeg|jpg)/g);
92 | if (results !== null) {
93 | for (k = 0; k < results.length; k += 1) {
94 | pattern = /src\s?=\s?.['|"]+\s?\+\s?MASHI_APP_PATH\s?\+\s?['|"]+(.+(png|gif|jpeg|jpg))/g;
95 | while (true) {
96 | matches = pattern.exec(results[k]);
97 | if (!matches) {
98 | break;
99 | }
100 | img_arr.push(matches[1]);
101 | }
102 | }
103 | }
104 | }
105 |
106 | reg = new RegExp("url", "ig");
107 | if (reg.test(_m_.frame.array[i])) {
108 | func_str = _m_.frame.array[i][1].toString();
109 | results = func_str.match(/url.[^.]+\.(png|gif|jpeg|jpg)/g);
110 | //console.log(results)
111 | if (results !== null) {
112 | for (k = 0; k < results.length; k += 1) {
113 | pattern = /MASHI_APP_PATH\s?\+\s?['|"]+(.+(png|gif|jpeg|jpg))/g;
114 | while (true) {
115 | matches = pattern.exec(results[k]);
116 | if (!matches) {
117 | break;
118 | }
119 | img_arr.push(matches[1]);
120 | }
121 | }
122 | }
123 | }
124 |
125 | }
126 | unique_img_arr = _mhelper_.array_unique(img_arr).sort();
127 | //for(i in unique_img_arr) alert(unique_img_arr[i]);
128 | _m_.image.array = unique_img_arr;
129 | return unique_img_arr;
130 | };
131 |
132 | /** @private */
133 | _map_.addPreloadLayer = function () {
134 |
135 | var div = document.createElement("div");
136 | div.id = "mContainer";
137 | document.getElementsByTagName('body')[0].appendChild(div);
138 |
139 | };
140 |
141 | /** @private */
142 | _map_.incrementProgress = function () {
143 | this.progress += 1;
144 | var progressbarWidth = (this.progress / this.image_array.length) * 100;
145 | _map_.PI.innerHTML = parseInt(progressbarWidth, 10);
146 | if (this.progress >= this.image_array.length) {
147 | this.preloadCallback(300);
148 | }
149 | };
150 |
151 | /** @private */
152 | _map_.preloadCallback = function (delay) {
153 |
154 | setTimeout(function () {
155 | if (_map_.PI.parentNode && _map_.PI.parentNode.removeChild) {
156 | _map_.PI.parentNode.removeChild(_map_.PI);
157 | }
158 | if (_m_.start === true) {
159 | window[_m_.namespace].start();
160 | }
161 | _ma_.$("mashi-controls").style.display = "block";
162 |
163 | }, delay);
164 |
165 | };
166 |
167 | }
168 |
169 | }());
170 |
--------------------------------------------------------------------------------
/plugins/mashi/fx-text-animation.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Animation: Text String
3 | * Required: mashi.object.animations.js
4 | * Copyright (c) 2008-2011, Uli Preuss.
5 | * All Rights Reserved.
6 | */
7 |
8 | /*jslint white: true, onevar: true, undef: true, eqeqeq: true, bitwise: true, regexp: false, newcap: true, immed: true, strict: true, indent: 2 */
9 |
10 | /*global window: false, document: false, setInterval: false, clearInterval: false, setTimeout: false, num: false, mashi: false, _m_: false, _ma_: false */
11 |
12 | var textanimation;
13 |
14 | (function () {
15 |
16 | "use strict";
17 |
18 | textanimation = function (c) {
19 | _m_.object.moving = 'true';
20 | _ma_.global.stop = false;
21 |
22 | var wait, adjustment, i, cache = '', props = {},
23 | num_global = 0,
24 | char_width, character = 0,
25 | kernel = {}, displayCharacter,
26 | obj_stageframe, obj_kernel, alphabet, span, string, duration, classname, num, match, observer, observer_ready;
27 |
28 | /* Calculate the Kernel */
29 | obj_stageframe = document.getElementById(_m_.label.stage);
30 | obj_kernel = document.createElement("div");
31 | obj_kernel.id = 'kernel';
32 | obj_stageframe.appendChild(obj_kernel);
33 |
34 | alphabet = ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789").split('');
35 | for (i = 0; i < alphabet.length; i++) {
36 |
37 | span = document.createElement("span");
38 | span.id = 'char_' + alphabet[i];
39 | span.style.fontSize = c.style.fontSize;
40 | span.style.fontFamily = c.style.fontFamily;
41 | span.style.letterSpacing = '0';
42 | span.appendChild(document.createTextNode(alphabet[i]));
43 | document.getElementById("kernel").appendChild(span);
44 |
45 | kernel['char_' + alphabet[i]] = document.getElementById('char_' + alphabet[i]).offsetWidth;
46 | document.getElementById('char_' + alphabet[i]).id = 'dummy' + i; // for ie7 - matching case insensitivy object/id
47 | }
48 |
49 | if (obj_kernel.hasChildNodes()) {
50 | while (obj_kernel.childNodes.length >= 1) {
51 | obj_kernel.removeChild(obj_kernel.firstChild);
52 | }
53 | }
54 |
55 | obj_stageframe.removeChild(obj_kernel);
56 | /* end */
57 |
58 | string = c.string.split('');
59 | duration = c.animation.speed;
60 | classname = (c.className !== undefined) ? c.className : '';
61 |
62 | props.letterSpacing = parseFloat(c.style.letterSpacing, 10);
63 | props.left_start = parseInt(c.position.left.start, 10);
64 | props.top_start = parseInt(c.position.top.start, 10);
65 | props.left_end = parseInt(c.position.left.end, 10);
66 | props.top_end = parseInt(c.position.top.end, 10);
67 |
68 | if (c.animation.wait !== undefined && c.animation.wait.after !== undefined) {
69 | wait = c.animation.wait.after;
70 | } else {
71 | wait = 100;
72 | }
73 |
74 | if (c.animation.wait !== undefined && c.animation.wait.adjustment !== undefined) {
75 | adjustment = c.animation.wait.adjustment;
76 | } else {
77 | adjustment = 100;
78 | }
79 |
80 |
81 | displayCharacter = function (num) {
82 |
83 | setTimeout(function () {
84 |
85 | if(_ma_.global.stop === true) {
86 | return;
87 | }
88 |
89 | character = string[num - 1];
90 |
91 | if (kernel['char_' + character] !== undefined) {
92 | char_width = props.letterSpacing * kernel['char_' + character];
93 | } else {
94 | // Unknown characters get the kernel of the 'e' character
95 | char_width = props.letterSpacing * (kernel.char_e / 2);
96 | }
97 |
98 | props.left_end += char_width;
99 |
100 | character = string[num];
101 | match = 0;
102 | for (var k = 0; k < cache.length; k++) {
103 | if (character === cache.substr(k, character.length)) {
104 | match++;
105 | }
106 | }
107 |
108 | cache = cache + ' ' + string[num];
109 |
110 | character = 'char_' + num_global;
111 |
112 | window['obj' + character] = new mashi.object({
113 | id: character,
114 | className: classname,
115 | position: {
116 | left: props.left_start,
117 | top: props.top_start
118 | }
119 | });
120 |
121 | window['obj' + character].set({
122 | type: 'textanimation',
123 | html: string[num],
124 | style: {
125 | fontFamily: c.style.fontFamily,
126 | fontSize: c.style.fontSize,
127 | color: c.style.color,
128 | textShadow: (c.style.textShadow) ? c.style.textShadow : ''
129 | }
130 | });
131 |
132 | if (c.animation.type === 'appear') {
133 | window['obj' + character].appear({
134 | left: props.left_end + "px",
135 | top: props.top_end + "px"
136 | });
137 | } else if (c.animation.type === 'moveTo') {
138 | window['obj' + character].appear({
139 | left: props.left_start + "px",
140 | top: props.top_start + "px"
141 | });
142 | window['obj' + character].moveTo({
143 | left: props.left_end + "px",
144 | top: props.top_end + "px"
145 | });
146 | }
147 |
148 | num_global++;
149 |
150 | }, duration += c.animation.step);
151 |
152 | };
153 |
154 | observer_ready = setInterval(function () {
155 | if (typeof _m_.test_object.appear === 'function') {
156 | clearInterval(observer_ready);
157 | for (i = num = 0; i < string.length; i++) {
158 | displayCharacter(num);
159 | num++;
160 | }
161 | num_global++;
162 | }
163 | },
164 | 100);
165 |
166 | observer = setInterval(function () {
167 | if (_ma_.global.stop === true) {
168 | clearInterval(observer);
169 | } else if (_m_.object.moving === 'false') {
170 | setTimeout(function () {
171 | _ma_.next();
172 | setTimeout(function () {
173 | _ma_.clearStage();
174 | _ma_.start();
175 | }, wait);
176 | }, adjustment);
177 | clearInterval(observer);
178 | }
179 | },
180 | 100);
181 |
182 | };
183 |
184 | } ());
185 |
--------------------------------------------------------------------------------
/system/javascripts/mashi/mashi.IEhacks.js:
--------------------------------------------------------------------------------
1 | /*
2 | Mashi Timeline Toolkit - Module IEhacks
3 | Copyright (c) 2008-2011 Uli Preuss. All Rights Reserved.
4 | Licensed under the terms of the GNU General Public License, version 2
5 | see: http://mashi.tv/license.md for details
6 | */
7 |
8 |
9 | /* JSLINT OPTIONS ********************************************************************* */
10 |
11 | /* jslint
12 | white: true, onevar: true, undef: true, eqeqeq: true, bitwise: true, regexp: true,
13 | newcap: true, immed: true, strict: true, indent: 2
14 | */
15 | /* global
16 | document: false, mashi: false, _IE_6_: false, _IE_7_8_: false
17 | */
18 |
19 |
20 | /* JSDOC TOOLKIT COMMENTS *************************************************************** */
21 |
22 | /** @fileOverview Mashi - Module IEhacks */
23 |
24 | /** Alias for mashi.application.prototype.IEhacks */
25 | var _mIEhacks_;
26 |
27 | (function () {
28 |
29 | "use strict";
30 |
31 | if (typeof mashi.application.IEhacks === "undefined") {
32 |
33 | _mIEhacks_ = mashi.application.prototype.IEhacks = function () {};
34 |
35 |
36 | /** @private */
37 | _mIEhacks_.textShadow = function (obj, textShadow, fontFamily, ie8) {
38 |
39 | var propSet, html, valueParts, shadowLeft, shadowTop, shadowBlur, shadowColor, position, shadow, setParts, i, num, props;
40 |
41 | if (!textShadow) { return; }
42 |
43 | propSet = textShadow.split(',');
44 | obj.style.position = 'absolute';
45 | obj.style.zoom = '1';
46 |
47 | html = obj.innerHTML;
48 | // TODO: Optimise and extend simulation
49 |
50 | // Simulate Normal Shadow
51 | // if single set of 'textShadow' properties
52 | if (propSet.length === 1) {
53 | valueParts = textShadow.split(' ');
54 | shadowLeft = valueParts[0];
55 | shadowTop = valueParts[1];
56 | shadowBlur = valueParts[2];
57 | shadowColor = valueParts[3];
58 | position = (ie8) ? 'position: absolute; ' : '';
59 | shadow = ' ' +
60 | '' +
78 | ' ' + html +
79 | '
';
80 | obj.innerHTML = shadow;
81 | } else if (propSet.length === 2) {
82 | // do nothing
83 | } else if (propSet.length === 3) {
84 | // do nothing
85 | } else if (propSet.length === 4) {
86 |
87 | // Simulate Border
88 | // if four sets of 'textShadow' properties
89 |
90 | setParts = textShadow.split(',');
91 | for (i in setParts) {
92 | if (setParts.hasOwnProperty(i)) {
93 | if (/-/.test(setParts[i]) === false) {
94 | num = i;
95 | }
96 | }
97 | }
98 | props = setParts[num].split(' ');
99 | shadowLeft = props[0];
100 | shadowTop = props[1];
101 | shadowBlur = props[2];
102 | shadowColor = props[3];
103 | shadow = ' ' +
104 | '' +
123 | ' ' + html +
124 | '
';
125 | obj.innerHTML = shadow;
126 | }
127 | };
128 |
129 | /** @private */
130 | _mIEhacks_.pngChildHack = function (obj, src) {
131 |
132 | // TODO: enable fading transparent pngs in msie 6-8 (without jquery)
133 | var div = document.createElement('div');
134 | div.id = obj.id + '_child';
135 | div.className = 'isChild';
136 | div.style.width = obj.style.width;
137 | div.style.height = obj.style.height;
138 | if (src !== '') {
139 | div.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader( src=' + src + ')';
140 | }
141 | obj.appendChild(div);
142 |
143 | };
144 |
145 | /** @private */
146 | _mIEhacks_.addHTML = function (obj, html) {
147 |
148 | var div;
149 |
150 | if (document.getElementById(obj.id + '_child') !== null) {
151 | div = document.createElement('div');
152 | div.id = obj.id + '_text';
153 | div.style.padding = obj.style.padding;
154 | if (_IE_6_) {
155 | div.style.width = obj.style.width;
156 | } else if (_IE_7_8_ && obj.style.width !== '') {
157 | div.style.width = parseInt(obj.style.width, 10) - (parseInt(obj.style.padding, 10) * 2) + "px";
158 | }
159 | div.style.height = obj.style.height;
160 | obj.style.marginLeft = '-' + obj.style.padding;
161 | obj.style.marginTop = '-' + obj.style.padding;
162 | div.style.lineHeight = obj.style.lineHeight;
163 | div.style.fontSize = obj.style.fontSize;
164 | div.innerHTML = html;
165 | div.style.filter = 'alpha(opacity=100)';
166 | document.getElementById(obj.id + '_child').appendChild(div);
167 | } else {
168 | document.getElementById(obj.id).innerHTML = html;
169 | }
170 | };
171 |
172 | }
173 |
174 | }());
175 |
--------------------------------------------------------------------------------
/plugins/mashi/fx-canvas-circles.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Mashi Plugin - CanvasCircles
3 | * Copyright (c) 2010-2011 Uli Preuss
4 | * All Rights Reserved.
5 | *
6 | * Required: processing.js and excanvas.js
7 | */
8 |
9 | /*jslint white: true, onevar: true, undef: true, eqeqeq: true, bitwise: true, regexp: false, newcap: true, immed: true, strict: true, indent: 4 */
10 |
11 | /*global window: false, document: false, alert: false, Processing: false, Grow: false, animate: false */
12 | var CanvasCircles, randomMinToMax, getStyle;
13 |
14 | (function () {
15 |
16 | "use strict";
17 |
18 | CanvasCircles = function (params) {
19 |
20 | var config, ival, el, procel, width, height, abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),
21 | init, i, Circle, Grow, animate,
22 | layer = [], data = [], timeline = 0;
23 |
24 | if (params === undefined) {
25 | params = {};
26 | }
27 | if (params.id === undefined) {
28 | alert('ERROR: No Canvas ID defined!');
29 | return;
30 | }
31 |
32 | config = {
33 | id: params.id,
34 | frameRate: (params.frameRate) ? params.frameRate : 30,
35 | speed: (params.speed) ? params.speed : 5,
36 | layer: (params.layer) ? params.layer : 13,
37 | size: {
38 | base: (params.size.base) ? params.size.base : 5,
39 | relative: (params.size.relative) ? params.size.relative : [0.7, 5] // min, max
40 | },
41 | range: (params.range) ? params.range : [5000, 5000000],
42 | // ms - min, max
43 | brightness: {
44 | inner: (params.brightness.inner) ? params.brightness.inner : 192,
45 | outer: (params.brightness.outer) ? params.brightness.outer : 127
46 | },
47 | saturation: (params.saturation) ? params.saturation : 155,
48 | alpha: (params.alpha) ? params.alpha : 20,
49 | hue: (params.hue) ? params.hue : 848,
50 | stroke: (params.stroke) ? params.stroke : false,
51 | callback: (params.callback) ? params.callback : null
52 | };
53 |
54 | init = function () {
55 | el = document.getElementById(config.id);
56 | width = parseInt(getStyle(config.id, 'width'), 10);
57 | height = parseInt(getStyle(config.id, 'height'), 10);
58 | procel = new Processing(el);
59 | procel.size(width, height);
60 | procel.colorMode(procel.HSB);
61 | if (config.stroke === false) {
62 | procel.noStroke();
63 | }
64 | for (i = 0; i < config.layer; i++) {
65 | data.push({
66 | string: abc[randomMinToMax(0, 25)],
67 | date: new Date(timeline += randomMinToMax(config.range[0], config.range[1]))
68 | });
69 | }
70 | layer.push(new Grow(data));
71 | animate();
72 | };
73 |
74 | Circle = function (height, string) {
75 | var floor, maxAge = 100;
76 | floor = abc.join(' ').indexOf(string.charAt(0).toUpperCase()) / Math.pow(abc.length, 1);
77 | return {
78 | age: 0,
79 | x: floor * width * 4 / 5 + width / 5,
80 | y: height * Math.sin(floor * Math.PI) * Math.min(height, 90) * 3,
81 | dx: (Math.random() * width - width / 2) * 0.001,
82 | dy: (Math.random() * height - height / 2) * 0.001,
83 | hue: Math.floor(floor * config.hue),
84 | update: function () {
85 | this.age++;
86 | this.x += this.dx;
87 | this.y += this.dy;
88 | if (this.age >= maxAge) {
89 | layer.remove(this);
90 | }
91 | },
92 | draw: function () {
93 | var hue, r, factor, age = this.age;
94 | hue = this.hue + age * 0.1;
95 | r = age * age / 50 + 2 * age + 30 * config.size.base;
96 | factor = randomMinToMax(config.size.relative[0], config.size.relative[1]);
97 | procel.fill(hue, age + config.saturation, config.brightness.inner - age, config.alpha - 1.5 * age);
98 | procel.ellipse(this.x, this.y * factor, r * factor, r * factor);
99 | procel.fill(hue, age + config.saturation, config.brightness.outer - age, config.alpha - 1.5 * age);
100 | procel.ellipse(this.x, this.y * factor, r * factor * 4 / 5, r * factor * 4 / 5);
101 | procel.fill(0, 0, 255, config.alpha);
102 | }
103 | };
104 | };
105 |
106 | Grow = function (data) {
107 | var al, min, max, frames, delta, frame;
108 | al = data.length;
109 | min = data[0].date.getTime();
110 | max = data[al - 1].date.getTime();
111 | frames = al * config.frameRate / config.speed;
112 | delta = (max - min) / frames;
113 | frame = 0;
114 | return {
115 | update: function () {
116 | var c, d;
117 | if (frame > al) {
118 | window.clearInterval(ival);
119 | if (typeof config.callback === 'function') {
120 | config.callback();
121 | }
122 | }
123 | frame++;
124 | d = min + frame * delta;
125 | while (data.length > 0 && data[0].date.getTime() <= d) {
126 | c = data.shift();
127 | layer.push(new Circle(layer.length, c.string));
128 | }
129 | },
130 | draw: function () {
131 | procel.background(0, 15);
132 | }
133 | };
134 | };
135 |
136 | animate = function () {
137 | var run = function () {
138 | for (var i = 0; i < layer.length; i++) {
139 | layer[i].update();
140 | layer[i].draw();
141 | }
142 | };
143 | ival = window.setInterval(run, 1000 / config.frameRate);
144 | };
145 |
146 | init();
147 |
148 | };
149 |
150 | /* HELPER */
151 |
152 | randomMinToMax = function (min, max) {
153 | return Math.floor(Math.random() * (max + 1));
154 | };
155 |
156 | getStyle = function (el, styleProp) {
157 | var y, x = document.getElementById(el);
158 | if (x.currentStyle) {
159 | y = x.currentStyle[styleProp];
160 | } else if (window.getComputedStyle) {
161 | y = document.defaultView.getComputedStyle(x, null).getPropertyValue(styleProp);
162 | }
163 | return y;
164 | };
165 |
166 | Array.prototype.remove = function (from, to) {
167 | if (typeof from !== "number") {
168 | return this.remove(this.indexOf(from));
169 | }
170 | var rest = this.slice((to || from) + 1 || this.length);
171 | this.length = from < 0 ? this.length + from : from;
172 | return this.push.apply(this, rest);
173 | };
174 |
175 | } ());
176 |
--------------------------------------------------------------------------------
/system/javascripts/mashi/object/mashi.object.animation.js:
--------------------------------------------------------------------------------
1 | /*
2 | Mashi Timeline Toolkit - Module Object Animation
3 | Copyright (c) 2008-2011 Uli Preuss. All Rights Reserved.
4 | Licensed under the terms of the GNU General Public License, version 2
5 | see: http://mashi.tv/license.md for details
6 | */
7 |
8 |
9 | /* JSLINT OPTIONS ********************************************************************* */
10 |
11 | /* jslint
12 | white: true, onevar: true, undef: true, eqeqeq: true, bitwise: true, regexp: false,
13 | newcap: true, immed: true, strict: true, indent: 2
14 | */
15 | /* global
16 | setTimeout: false, clearTimeout: false, jQuery: false, _m_: false, _ma_: false,
17 | _IE_: false
18 | */
19 |
20 |
21 | /* JSDOC TOOLKIT COMMENTS *************************************************************** */
22 |
23 | /** @fileOverview Mashi - Module Object.Animation */
24 |
25 | (function () {
26 |
27 | "use strict";
28 |
29 | if (typeof mashi.object !== "undefined") {
30 |
31 | /**
32 | * Object moves to position
33 | * @param {Object} params
34 | *
35 | * @example
36 | * dummy.moveTo({
37 | * left: "70px",
38 | * top: "500px"
39 | * });
40 | */
41 | mashi.object.prototype.moveTo = function (params) {
42 |
43 | var x, y, direction, callback, delay, ox, oy, _o = this,
44 | _object = this.obj;
45 |
46 | _m_.object.moving = 'true';
47 | x = parseInt(params.left, 10);
48 | y = parseInt(params.top, 10);
49 | ox = (params.ox) ? params.ox : null;
50 | oy = (params.oy) ? params.oy : null;
51 | delay = (params.delay) ? params.delay : 15;
52 | callback = (params.callback) ? params.callback : false;
53 | direction = {
54 | horizontal: '2right',
55 | vertical: '2bottom'
56 | };
57 |
58 | _o.m = _o.id;
59 | this.steps = 6;
60 | this.position = {
61 | 'top': true,
62 | 'left': true
63 | };
64 | this.diff = {
65 | 'top': null,
66 | 'left': null
67 | };
68 |
69 | // Get current positions
70 | if (_object.style.top !== "") {
71 | this.oy = _object.style.top;
72 | } else if (_object.style.bottom !== "") {
73 | this.oy = _object.style.bottom;
74 | this.position.top = false;
75 | } else {
76 | this.oy = 0;
77 | }
78 |
79 | if (_object.style.left !== "") {
80 | this.ox = _object.style.left;
81 | } else if (_object.style.right !== "") {
82 | this.ox = _object.style.right;
83 | this.position.left = false;
84 | } else {
85 | this.ox = 0;
86 | }
87 |
88 | if (parseInt(this.ox, 10) > x) {
89 | direction.horizontal = '2left';
90 | }
91 | if (parseInt(this.oy, 10) > y) {
92 | direction.vertical = '2top';
93 | }
94 |
95 | if (!ox) {
96 | ox = parseInt(this.ox, 10);
97 | }
98 | if (!oy) {
99 | oy = parseInt(this.oy, 10);
100 | }
101 |
102 | this.diff.left = ox - x;
103 | this.leftStep = parseInt(this.diff.left / this.steps, 10);
104 |
105 | this.diff.top = oy - y;
106 | this.topStep = parseInt(this.diff.top / this.steps, 10);
107 |
108 | // horizontal
109 | if (this.diff.left > 0 && (this.diff.left - this.leftStep) >= this.leftStep) {
110 | _object.style.left = ox - this.leftStep + "px";
111 | this.continueSlide = true;
112 | } else if (this.diff.left < 0 && (this.diff.left - this.leftStep) <= this.leftStep) {
113 | _object.style.left = ox - this.leftStep + "px";
114 | this.continueSlide = true;
115 | } else {
116 | _object.style.left = ox + "px";
117 | }
118 |
119 | // vertical
120 | if (this.diff.top > 0 && (this.diff.top - this.topStep) >= this.topStep) {
121 | if (this.position.top === true) {
122 | _object.style.top = oy - this.topStep + "px";
123 | this.continueSlide = true;
124 | } else {
125 | _object.style.bottom = oy + this.topStep + "px";
126 | }
127 | } else if (this.diff.top < 0) {
128 | if (this.position.top === true) {
129 | _object.style.top = oy - this.topStep + "px";
130 | } else {
131 | _object.style.bottom = oy - this.topStep + "px";
132 | }
133 | } else {
134 | if (this.position.top === true) {
135 | _object.style.top = oy + "px";
136 | } else {
137 | _object.style.bottom = oy + "px";
138 | }
139 | }
140 |
141 | if ((direction.horizontal === '2right' && this.diff.left <= this.steps * -1) || (direction.horizontal === '2left' && this.diff.left >= this.steps) || (direction.vertical === '2bottom' && this.diff.top <= this.steps * -1) || (direction.vertical === '2top' && this.diff.top >= this.steps)) {
142 | _o.m = setTimeout(function () {
143 | _o.moveTo({
144 | left: x,
145 | top: y,
146 | delay: delay,
147 | callback: callback,
148 | ox: parseFloat(_o.obj.style.left),
149 | oy: parseFloat(_o.obj.style.top)
150 | });
151 | }, delay);
152 | } else {
153 | _m_.object.moving = 'false';
154 | clearTimeout(_o.m);
155 | if (typeof callback === 'function') {
156 | callback();
157 | }
158 | }
159 |
160 | };
161 |
162 | /**
163 | * Object scrolls to position
164 | * @param {Object} params
165 | *
166 | * @example
167 | * panorama.scrollTo({
168 | * left: "-4208px",
169 | * top: "0"
170 | * });
171 | */
172 | mashi.object.prototype.scrollTo = function (param) {
173 |
174 | var left, top, delay;
175 |
176 | left = parseInt(param.left, 10);
177 | top = parseInt(param.top, 10);
178 | delay = (param.delay !== undefined) ? parseInt(param.delay, 10) : undefined;
179 | this._scrollTo(left, top, delay);
180 |
181 | };
182 |
183 | /** @private */
184 | mashi.object.prototype._scrollTo = function (x, y, delay, step) {
185 |
186 | var d, s, _o = this,
187 | _object = this.obj;
188 | _o.m = _o.id;
189 |
190 | if (_m_.buttons.type === "single") {
191 | _ma_.$('controls-button-start').style.display = "none";
192 | _ma_.$('controls-button-stop').style.display = "none";
193 | }
194 |
195 | d = this.delay = (delay) ? delay : 1;
196 | s = this.steps = (step) ? step : 1;
197 |
198 | // Get current positions
199 | this.ox = parseInt(_object.style.left, 10);
200 | _object.style.left = this.ox - this.steps + 'px';
201 | if (x < this.ox) {
202 | _o.m = setTimeout(function () {
203 | _o._scrollTo(x, y, d, s);
204 | }, d);
205 | } else {
206 | if (_m_.buttons.type === "single") {
207 | _ma_.$('controls-button-start').style.display = "inline-block";
208 | _ma_.$('controls-button-stop').style.display = "none";
209 | }
210 | clearTimeout(_o.m);
211 | }
212 | };
213 |
214 | /**
215 | * Object appears on position
216 | * @param {Object} params
217 | *
218 | * @example
219 | * GERTRUDE.appear({
220 | * left: "400px",
221 | * top: "98px",
222 | * duration: 1500
223 | * });
224 | */
225 | mashi.object.prototype.appear = function (params) {
226 |
227 | var duration, steps, start, _object = this.obj;
228 |
229 | _object.style.zoom = "1";
230 | if (params) {
231 | _object.style.left = params.left;
232 | _object.style.top = params.top;
233 | }
234 |
235 | duration = (params && params.duration) ? params.duration : _m_.fade.duration;
236 | steps = (params && params.steps) ? params.steps : _m_.fade.steps;
237 | start = (params && params.start) ? params.start : _m_.fade.start;
238 |
239 | /*
240 | if (_mhelper_.hasClass(_object, 'hasChilds')) {
241 | _ma_.setOpacity(_object.id, 0);
242 | _ma_.fadeIn(_object.id, duration, steps, start);
243 | }
244 | */
245 |
246 | if (_IE_ && _object.style.backgroundImage === '') {
247 |
248 | if (typeof jQuery !== 'undefined') {
249 | _ma_.fadeIn(_object.id, duration, steps, start);
250 | } else {
251 | _ma_.setOpacity(_object.id, 1);
252 | }
253 | } else {
254 | _ma_.setOpacity(_object.id, 0);
255 | _ma_.fadeIn(_object.id, duration, steps, start);
256 | }
257 | };
258 |
259 | /**
260 | * Object disappears on position
261 | * @param {Object} params
262 | *
263 | * @example
264 | * GERTRUDE.disappear({
265 | * left: "1400px",
266 | * top: "98px",
267 | * duration: 1500
268 | * });
269 | */
270 | mashi.object.prototype.disappear = function (params) {
271 |
272 | var duration, steps, end, _object = this.obj;
273 |
274 | _object.style.zoom = "1";
275 | if (params) {
276 | if (params.left) {
277 | _object.style.left = params.left;
278 | }
279 | if (params.top) {
280 | _object.style.top = params.top;
281 | }
282 | }
283 |
284 | duration = (params && params.duration) ? params.duration : _m_.fade.duration;
285 | steps = (params && params.steps) ? params.steps : _m_.fade.steps;
286 | end = (params && params.end) ? params.end : _m_.fade.end;
287 |
288 | if (_IE_ && _object.style.backgroundImage === '') {
289 | if (typeof jQuery !== 'undefined') {
290 | _ma_.fadeOut(_object.id, duration, steps, end);
291 | } else {
292 | _ma_.setOpacity(_object.id, 0);
293 | }
294 | } else {
295 | _ma_.setOpacity(_object.id, 1);
296 | _ma_.fadeOut(_object.id, duration, steps, end);
297 | }
298 |
299 | };
300 |
301 | }
302 |
303 | }());
304 |
--------------------------------------------------------------------------------
/application/content/intro.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Author: Uli Preuss
3 | *
4 | */
5 |
6 |
7 | var addTextLayer, dummy, textLayer, twitterbird, twitterlogo, link, timeout, firefox, ie, safari, opera, chrome;
8 |
9 | addTextLayer = function() {
10 | textLayer = new mashi.object({
11 | id: "textLayer",
12 | className: 'png',
13 | style: {
14 | width: "100%",
15 | left: "0px",
16 | top: "50px"
17 | }
18 | });
19 | };
20 |
21 | app.hook.post = function () {
22 | if(link === undefined) { return; }
23 | link.set({ html: '' });
24 | };
25 |
26 |
27 | /**
28 | * FRAMESET ****************************************************************
29 | */
30 |
31 | app.add(100, function() {
32 |
33 | link = new mashi.object({
34 | id: "link",
35 | style: {
36 | left: "30px",
37 | bottom: "30px",
38 | zIndex: '2000'
39 | },
40 | event: {
41 | //click: function() {},
42 | //dblclick: function() {},
43 | //mousedown: function() {},
44 | //mouseup: function() {},
45 | //mousemove: function() {},
46 | mouseout: function() {
47 | this.style.color = "inherit";
48 | },
49 | mouseover: function() {
50 | this.style.color = "#cea500";
51 | }
52 | },
53 | appendTo: 'app_container' // default: stageframe
54 | });
55 |
56 | });
57 |
58 | /* INTRO ***************************************************************** */
59 | app.addSection('intro', as_callback);
60 |
61 | app.add('auto', function() {
62 |
63 | textanimation({
64 | string: "Introducing Mashi",
65 | className: 'intro',
66 | style: {
67 | color: "#ccc",
68 | fontFamily: "Trebuchet MS",
69 | fontSize: "50px",
70 | letterSpacing: "1.23em",
71 | textShadow: "10px 10px 6px #000000"
72 | },
73 | position: {
74 | top: {
75 | start: "120px",
76 | end: "120px"
77 | },
78 | left: {
79 | start: "2455px",
80 | end: "183px"
81 | }
82 | },
83 | animation: {
84 | type: "moveTo",
85 | speed: 2,
86 | step: 120,
87 | wait: {
88 | adjustment: 500,
89 | after: 2000
90 | }
91 | }
92 | });
93 |
94 | });
95 |
96 | app.add(2000, function() {
97 |
98 | app.each('.intro').disappear({
99 | delay: 50,
100 | speed: 1000,
101 | steps: 20,
102 | opacity: 1
103 | });
104 |
105 | });
106 |
107 | app.add(5000, function() {
108 |
109 | app.set({
110 | html:
111 | '' +
112 | ' The JavaScript Toolkit for
' +
113 | ' timeline-based web applications.' +
114 | '',
115 | style: {
116 | fontSize: "27px",
117 | lineHeight: "29px"
118 | }
119 | });
120 |
121 | });
122 |
123 | app.add(500, function() {
124 |
125 | app.set({
126 | html: ''
127 | });
128 |
129 | });
130 |
131 | app.add(6000, function() {
132 |
133 | app.set({
134 | html:
135 | 'Mashi allows you to create
' +
136 | 'flash-like movies and complex animations
' +
137 | 'with standard (X)HTML, CSS and JavaScript.',
138 | style: {
139 | fontSize: "20px",
140 | letterSpacing: "0.12em",
141 | lineHeight: "1.1em"
142 | }
143 | });
144 |
145 | });
146 |
147 |
148 | app.add(300, function() {
149 |
150 | app.set({
151 | html: ''
152 | });
153 |
154 | });
155 |
156 | app.add(6000, function() {
157 |
158 | app.set({
159 | html:
160 | 'Mashi is compact, object-oriented, modular and
' +
161 | 'lightweight: incl. all modules 41kb / 13kb (CDN+GZip)'
162 | });
163 |
164 | _m_.frame.fading = false;
165 |
166 | });
167 |
168 | app.add(500, function() {
169 |
170 | app.set({
171 | html: ''
172 | });
173 |
174 | });
175 |
176 | app.add(4500, function() {
177 |
178 | app.set({
179 | html:
180 | 'Mashi requires no additional plugins for basic usage ..'
181 | });
182 |
183 | });
184 |
185 | app.add(3500, function() {
186 |
187 | app.set({
188 | html:
189 | 'and supports all major browsers ..'
190 | });
191 |
192 | });
193 |
194 | app.add(300, function() {
195 |
196 | app.set({
197 | html: ''
198 | });
199 |
200 | firefox = new mashi.object({
201 | id: "firefox",
202 | style: {
203 | width: "128px",
204 | height: "128px",
205 | left: "-500px",
206 | top: "98px",
207 | backgroundImage: "url(" + MASHI_APP_PATH + "content/images/browser/Firefox.png)"
208 | }
209 | });
210 | firefox.moveTo({
211 | left: "100px",
212 | top: "98px"
213 | });
214 |
215 | });
216 |
217 | app.add(300, function() {
218 |
219 | safari = new mashi.object({
220 | id: "safari",
221 | style: {
222 | width: "128px",
223 | height: "128px",
224 | left: "-500px",
225 | top: "98px",
226 | backgroundImage: "url(" + MASHI_APP_PATH + "content/images/browser/Safari.png)"
227 | }
228 | });
229 | safari.moveTo({
230 | left: "250px",
231 | top: "98px"
232 | });
233 |
234 | });
235 |
236 |
237 | app.add(300, function() {
238 |
239 | ie = new mashi.object({
240 | id: "ie",
241 | style: {
242 | width: "128px",
243 | height: "128px",
244 | left: "-500px",
245 | top: "98px",
246 | backgroundImage: "url(" + MASHI_APP_PATH + "content/images/browser/IE.png)"
247 | }
248 | });
249 | ie.moveTo({
250 | left: "400px",
251 | top: "98px"
252 | });
253 |
254 | });
255 |
256 | app.add(300, function() {
257 |
258 | opera = new mashi.object({
259 | id: "opera",
260 | style: {
261 | width: "128px",
262 | height: "128px",
263 | left: "-500px",
264 | top: "98px",
265 | backgroundImage: "url(" + MASHI_APP_PATH + "content/images/browser/Opera.png)"
266 | }
267 | });
268 | opera.moveTo({
269 | left: "550px",
270 | top: "98px"
271 | });
272 |
273 | });
274 |
275 | app.add(2000, function() {
276 |
277 | chrome = new mashi.object({
278 | id: "chrome",
279 | style: {
280 | width: "128px",
281 | height: "128px",
282 | left: "-500px",
283 | top: "98px",
284 | backgroundImage: "url(" + MASHI_APP_PATH + "content/images/browser/Chrome.png)"
285 | }
286 | });
287 | chrome.moveTo({
288 | left: "700px",
289 | top: "98px"
290 | });
291 |
292 | });
293 |
294 | app.add(1000, function() {
295 |
296 | app.set({
297 | html: ''
298 | });
299 |
300 | });
301 |
302 | app.add(100, function() {
303 |
304 | firefox.disappear();
305 |
306 | });
307 |
308 | app.add(100, function() {
309 |
310 | safari.disappear();
311 |
312 | });
313 |
314 | app.add(100, function() {
315 |
316 | ie.disappear();
317 |
318 | });
319 |
320 | app.add(100, function() {
321 |
322 | opera.disappear();
323 |
324 | });
325 |
326 | app.add(100, function() {
327 |
328 | chrome.disappear();
329 |
330 | });
331 |
332 | app.add(500, function() {
333 |
334 | iphone = new mashi.object({
335 | id: "iphone",
336 | style: {
337 | width: "71px",
338 | height: "128px",
339 | left: "-500px",
340 | top: "98px",
341 | backgroundImage: "url(" + MASHI_APP_PATH + "content/images/browser/IPhone.png)"
342 | }
343 | });
344 | iphone.moveTo({
345 | left: "100px",
346 | top: "98px"
347 | });
348 |
349 | });
350 |
351 | app.add(500, function() {
352 |
353 | ipad = new mashi.object({
354 | id: "ipad",
355 | style: {
356 | width: "232px",
357 | height: "128px",
358 | left: "-500px",
359 | top: "98px",
360 | backgroundImage: "url(" + MASHI_APP_PATH + "content/images/browser/IPad.png)"
361 | }
362 | });
363 | ipad.moveTo({
364 | left: "580px",
365 | top: "98px"
366 | });
367 |
368 | });
369 |
370 | app.add(4500, function() {
371 |
372 | app.set({
373 | html:
374 | '' +
375 | ' Mashi works on iPad, iPhone and
' +
376 | ' any mobile device
' +
377 | ' with a modern browser.' +
378 | '
'
379 | });
380 |
381 | });
382 |
383 | app.add(800, function() {
384 |
385 | ipad.disappear();
386 | iphone.disappear();
387 |
388 | app.set({
389 | html: ''
390 | });
391 |
392 | _m_.frame.fading = false;
393 |
394 | });
395 |
396 | app.add(2000, function() {
397 |
398 | app.set({
399 | html:
400 | 'Mashi is framework independent.
'+
401 | ' '
402 | });
403 |
404 | });
405 |
406 | app.add(4000, function() {
407 |
408 | app.set({
409 | html:
410 | 'Mashi is framework independent.
'+
411 | 'You can easily integrate your favorite one.'
412 | });
413 |
414 | });
415 |
416 | app.add(1000, function() {
417 |
418 | app.set({
419 | html: ''
420 | });
421 |
422 | });
423 |
424 | app.add(5000, function() {
425 |
426 | app.set({
427 | html:
428 | 'Mashi is under constant development.
' +
429 | 'Visit our timelabs and blog to learn more.'
430 | });
431 |
432 | });
433 |
434 | app.add(1000, function() {
435 |
436 | app.set({
437 | html: ''
438 | });
439 |
440 | });
441 |
442 | app.add(5000, function() {
443 |
444 | app.set({
445 | html: 'May creativity
be with you!',
446 | style: {
447 | fontSize: "33px",
448 | lineHeight: "33px"
449 | }
450 | });
451 |
452 | app.stop();
453 |
454 | });
455 |
456 |
--------------------------------------------------------------------------------
/application/custom.css:
--------------------------------------------------------------------------------
1 | h3 {
2 | font-size: 20px;
3 | margin-bottom: 10px;
4 | }
5 | table {
6 | border-collapse: collapse;
7 | width: 100%;
8 | font-size: 15px;
9 | }
10 | table th {
11 | border: 1px solid #eeeeee;
12 | padding: 2px 5px;
13 | }
14 | table td {
15 | border: 1px solid #eeeeee;
16 | padding: 2px 5px;
17 | }
18 | table th {
19 | font-weight: bold;
20 | color: #000000;
21 | background-color: #eeeeee;
22 | }
23 | em { font-style: italic; }
24 | div.info {
25 | margin-top: 10px;
26 | font-size: 19px;
27 | }
28 | div.info strong { font-size: 26px; }
29 | div.info span { color: #aaaaaa; }
30 | div#tweetLayer {
31 | font-size: 13px;
32 | text-align: center;
33 | padding-left: 170px;
34 | padding-bottom: 70px;
35 | line-height: 32px;
36 | }
37 | div#tweetLayer h3 {
38 | margin-top: 8px;
39 | font-size: 26px;
40 | }
41 | div#tweetLayer p { text-align: center; }
42 | div#tweetLayer ul {
43 | width: 550px;
44 | margin: 0 auto;
45 | list-style: none;
46 | padding: 1em;
47 | }
48 | div#tweetLayer ul li {
49 | display: block;
50 | margin-bottom: 10px;
51 | text-align: left;
52 | margin: 0.25em;
53 | padding: 0.5em;
54 | }
55 | a.twitter {
56 | font-size: 18px;
57 | line-height: 16px;
58 | font-weight: bold;
59 | color: #a5d6e8;
60 | }
61 | a.twitter p.twitter a:hover { text-decoration: underline; }
62 | #description {
63 | padding: 20px 30px 20px 20px !important;
64 | color: #eeeeee;
65 | background-color: #000000;
66 | opacity: 0.5;
67 | text-align: left;
68 | }
69 | #snippet pre {
70 | border: 1px solid #333738;
71 | padding: 10px 10px 10px 20px;
72 | border-radius: 5px;
73 | background-color: #282b2e;
74 | -moz-box-shadow: inset 8px 8px 8px #222222;
75 | -webkit-box-shadow: inset 8px 8px 8px #222222;
76 | box-shadow: inset 8px 8px 8px #222222;
77 | text-shadow: #000000 4px 4px 10px;
78 | opacity: 0.7;
79 | filter: alpha(opacity=70);
80 | }
81 | #snippet pre strong { font-size: 17px; }
82 | #snippet pre code {
83 | font-family: "Monaco", "Consolas", "Lucida Console", "Courier New", "Courier";
84 | font-size: 15px;
85 | line-height: 1.1em;
86 | color: #eeeeee;
87 | }
88 | #snippet pre code .xml .title { color: #eeeeee; }
89 | #snippet pre code .string { color: #e20074; }
90 | #snippet pre code .title { color: #e20074; }
91 | #snippet pre code .constant { color: #e20074; }
92 | #snippet pre code .parent { color: #e20074; }
93 | #snippet pre code .rules .value { color: #e20074; }
94 | #snippet pre code .rules .value .number { color: #e20074; }
95 | #snippet pre code .preprocessor { color: #e20074; }
96 | #snippet pre code .instancevar { color: #e20074; }
97 | #snippet pre code .aggregate { color: #e20074; }
98 | #snippet pre code .template_tag { color: #e20074; }
99 | #snippet pre code .addition { color: #e20074; }
100 | #snippet pre code .flow { color: #e20074; }
101 | #snippet pre code .stream { color: #e20074; }
102 | #snippet pre code .bash .variable { color: #e20074; }
103 | #snippet pre code .tag .attribute .value { color: steelblue; }
104 | #snippet pre code .pi { color: steelblue; }
105 | #snippet pre code .comment { color: green; }
106 | #snippet pre code .annotation { color: green; }
107 | #snippet pre code .template_comment { color: green; }
108 | #snippet pre code .number { color: #008800; }
109 | #snippet pre code .date { color: #008800; }
110 | #snippet pre code .regexp { color: #008800; }
111 | #snippet pre code .literal { color: #008800; }
112 | #snippet pre code .change { color: #008800; }
113 | #snippet pre code .label { color: blue; }
114 | #snippet pre code .decorator { color: blue; }
115 | #snippet pre code .filter .argument { color: blue; }
116 | #snippet pre code .localvars { color: blue; }
117 | #snippet pre code .array { color: blue; }
118 | #snippet pre code .attr_selector { color: blue; }
119 | #snippet pre code .important { color: blue; }
120 | #snippet pre code .pseudo { color: blue; }
121 | #snippet pre code .doctype { color: blue; }
122 | #snippet pre code .deletion { color: blue; }
123 | #snippet pre code .envvar { color: blue; }
124 | #snippet pre code .shebang { color: blue; }
125 | #snippet pre code .phpdoc { font-weight: bold; }
126 | #snippet pre code .keyword { font-weight: bold; }
127 | #snippet pre code .id { font-weight: bold; }
128 | #snippet pre code .phpdoc { font-weight: bold; }
129 | #snippet pre code .title { font-weight: bold; }
130 | #snippet pre code .built_in { font-weight: bold; }
131 | #snippet pre code .aggregate { font-weight: bold; }
132 | #snippet pre code .bash .variable { font-weight: bold; }
133 | #snippet pre code .keyword { color: YellowGreen; }
134 | #snippet pre code .html .css { opacity: 0.5; }
135 | #snippet pre code .html .javascript { opacity: 0.5; }
136 | #snippet pre code .html .vbscript { opacity: 0.5; }
137 | #snippet pre code .tag { color: #aaaaaa; }
138 | #snippet pre code .tag .title { color: #aaaaaa; }
139 | #snippet pre code .html .php { color: green; }
140 | .big { font-size: 180px; }
141 | .about {
142 | width: 100%;
143 | color: #eeeeee;
144 | font-weight: normal;
145 | font-family: Verdana, Arial, Helvetica, sans-serif;
146 | text-align: left;
147 | text-shadow: #eeeeee 0px 0px 13px;
148 | padding: 20px;
149 | }
150 | .about a {
151 | color: lightblue;
152 | text-decoration: underline;
153 | display: inline-block;
154 | padding: 2px 5px;
155 | border: 1px dashed transparent;
156 | }
157 | .about a:hover {
158 | text-decoration: none;
159 | border: 1px dashed #cea500;
160 | color: #cea500;
161 | }
162 | .about h3 {
163 | font-size: 13px;
164 | font-weight: bold;
165 | margin-bottom: 3px;
166 | }
167 | .about p {
168 | text-align: left;
169 | font-size: 13px;
170 | line-height: 10px;
171 | margin: 0 auto 0px;
172 | padding: 0 0 3px 0;
173 | }
174 | .about p strong {
175 | font-weight: bold;
176 | color: #ffffff;
177 | }
178 | .about ul {
179 | width: 70%;
180 | text-align: left;
181 | margin: 20px auto 17px;
182 | }
183 | .about ul li {
184 | display: block;
185 | font-size: 18px;
186 | }
187 | .about ul li:before {
188 | content: "•";
189 | display: inline-block;
190 | margin-right: 5px;
191 | }
192 | .download h2 {
193 | font-size: 120px;
194 | line-height: 80%;
195 | font-family: "Trebuchet MS", Arial, sans serif;
196 | font-style: normal;
197 | margin: 0;
198 | padding: 0;
199 | }
200 | .docs {
201 | width: 400px;
202 | margin: 0;
203 | padding: 0;
204 | font-size: 16px;
205 | }
206 | .docs p {
207 | font-family: "Trebuchet MS", Arial, sans serif;
208 | color: #eeeeee;
209 | text-align: left;
210 | font-size: 130%;
211 | }
212 | .docs a {
213 | font-size: 150%;
214 | position: relative;
215 | display: inline-block;
216 | margin: 3px 0;
217 | text-decoration: underline;
218 | color: #cea500;
219 | }
220 | .docs a.normal { font-size: 100%; }
221 | .docs a:hover {
222 | text-decoration: none;
223 | color: blue;
224 | }
225 | .blog {
226 | width: 600px;
227 | margin: 0;
228 | padding: 0;
229 | }
230 | .blog h2 {
231 | font-family: "Trebuchet MS";
232 | color: #eeeeee;
233 | text-align: right;
234 | }
235 | .blog p {
236 | font-family: "Trebuchet MS";
237 | color: #eeeeee;
238 | text-align: right;
239 | }
240 | .blog p { font-size: 140%; }
241 | .blog h2 {
242 | font-weight: bold;
243 | margin-bottom: 12px;
244 | }
245 | .blog a {
246 | font-size: 200%;
247 | line-height: 100%;
248 | position: relative;
249 | display: inline-block;
250 | margin: 3px 0;
251 | text-decoration: underline;
252 | color: #cea500;
253 | }
254 | .blog a.normal { font-size: 100%; }
255 | .blog a:hover {
256 | text-decoration: none;
257 | color: blue;
258 | }
259 | .labs {
260 | width: 390px;
261 | margin: 0;
262 | padding: 0;
263 | }
264 | .labs h2 {
265 | font-family: "Trebuchet MS";
266 | color: #eeeeee;
267 | text-align: left;
268 | }
269 | .labs p {
270 | font-family: "Trebuchet MS";
271 | color: #eeeeee;
272 | text-align: left;
273 | }
274 | .labs p { font-size: 140%; }
275 | .labs h2 {
276 | font-weight: bold;
277 | margin-bottom: 12px;
278 | }
279 | .labs a {
280 | font-size: 200%;
281 | line-height: 100%;
282 | position: relative;
283 | display: inline-block;
284 | margin: 3px 0;
285 | text-decoration: underline;
286 | color: #cea500;
287 | }
288 | .labs a.normal { font-size: 100%; }
289 | .labs a:hover {
290 | text-decoration: none;
291 | color: blue;
292 | }
293 | .wide {
294 | width: 590px;
295 | padding-top: 22px;
296 | padding-left: 49px;
297 | }
298 | #textframe span {
299 | color: #aaaaaa;
300 | font-weight: bold;
301 | }
302 | .note {
303 | font-family: "Corbel", sans-serif;
304 | text-align: center;
305 | width: 380px;
306 | margin: 0 auto !important;
307 | border: 1px solid #b29105;
308 | letter-spacing: inherit !important;
309 | line-height: inherit !important;
310 | background: #000000;
311 | -moz-box-shadow: 0px 0px 20px #666666;
312 | -webkit-box-shadow: 0px 0px 20px #666666;
313 | opacity: 0.7;
314 | }
315 | .note h3 {
316 | text-align: left;
317 | color: #000000;
318 | font-size: 16px !important;
319 | background: #b29105;
320 | padding: 2px 5px 0px;
321 | font-weight: bold;
322 | }
323 | .note div {
324 | padding: 0px 12px 12px;
325 | letter-spacing: inherit !important;
326 | font-size: 16px !important;
327 | line-height: 1em;
328 | color: #eeeeee;
329 | }
330 | form {
331 | text-align: left;
332 | font-size: 1em;
333 | }
334 | fieldset {
335 | float: left;
336 | padding: 0;
337 | margin: 10px 0 0 0;
338 | display: inline-block;
339 | width: 400px;
340 | padding: 25px;
341 | }
342 | fieldset.fm_right {
343 | float: right;
344 | margin-right: 32px;
345 | width: 330px;
346 | }
347 | p.fm_input_layer {
348 | clear: both;
349 | padding-bottom: 48px;
350 | }
351 | legend, label {
352 | color: #606060;
353 | font-weight: bold;
354 | }
355 | label {
356 | display: inline-block;
357 | float: left;
358 | text-align: left;
359 | margin-bottom: 3px;
360 | }
361 | input:focus {
362 | background: #000000;
363 | border: 1px solid #666666;
364 | }
365 | textarea:focus {
366 | background: #000000;
367 | border: 1px solid #666666;
368 | }
369 | input, textarea {
370 | float: right;
371 | width: 70%;
372 | font-size: 1em;
373 | color: #ffffff;
374 | background: #232323;
375 | opacity: 0.5;
376 | filter: alpha(opacity=50);
377 | border: 1px solid #cccccc;
378 | margin-bottom: 5px;
379 | padding: 4px;
380 | font-weight: bold;
381 | }
382 | textarea {
383 | height: 125px;
384 | resize: none;
385 | }
386 | input.button {
387 | color: #eeeeee;
388 | margin-top: 5px;
389 | margin-left: 12px;
390 | width: auto;
391 | cursor: pointer;
392 | }
393 | p.description {
394 | text-align: left !important;
395 | padding: 0 !important;
396 | line-height: 20px;
397 | }
398 | p#flashnotice {
399 | height: 40px;
400 | text-align: right;
401 | padding-right: 12px;
402 | line-height: 20px;
403 | width: 100%;
404 | margin: 0;
405 | }
406 |
--------------------------------------------------------------------------------
/system/javascripts/mashi/mashi.object.js:
--------------------------------------------------------------------------------
1 | /*
2 | Mashi Timeline Toolkit - Module Object
3 | Copyright (c) 2008-2011 Uli Preuss. All Rights Reserved.
4 | Licensed under the terms of the GNU General Public License, version 2
5 | see: http://mashi.tv/license.md for details
6 | */
7 |
8 |
9 | /* JSLINT OPTIONS ********************************************************************* */
10 |
11 | /* jslint
12 | white: true, onevar: true, undef: true, eqeqeq: true, bitwise: true, regexp: false,
13 | newcap: true, immed: true, strict: true, indent: 2
14 | */
15 | /* global
16 | document: false, setInterval: false, mashi: false, _m_: false, _ma_: false,
17 | _mhelper_: false, _IE_: false, _IE_6_7_: false, _IE_8_: false, _IE_7_8_: false,
18 | _mIEhacks_: false
19 | */
20 |
21 |
22 | /* JSDOC TOOLKIT COMMENTS *************************************************************** */
23 |
24 | /** @fileOverview Mashi - Module Object */
25 |
26 | /** Alias for mashi.application.prototype.object */
27 | var _mao_;
28 |
29 | (function () {
30 |
31 | "use strict";
32 |
33 | if (typeof mashi.application.object === "undefined") {
34 |
35 | if (mashi.min === false) {
36 | mashi.module('helper');
37 | }
38 | if (_IE_) {
39 | mashi.module('IEhacks');
40 | }
41 |
42 | /** @private */
43 | mashi.application.prototype.object = function () {};
44 |
45 | _mao_ = mashi.application.prototype.object;
46 | _mao_._namespace = "mashi";
47 | _mao_.zindex = 500;
48 | _mao_.objects = [];
49 |
50 | /**
51 | * Create a mashi object
52 | * @constructor
53 | * @param {Object} params Object configuration.
54 | * @param {Object} params.id Object id.
55 | * @param {Object} params.style Object style (css properties).
56 | * @param {Object} params.className Object class name.
57 | * @param {String} params.html (innerHTML) Inner HTML.
58 | *
59 | * @example
60 | * var hamlet = new mashi.object(params);
61 | */
62 | mashi.object = function (params) {
63 |
64 | var type, property;
65 |
66 | // Set object ID
67 | this.id = params.id;
68 | this.obj = _ma_.$(this.id);
69 |
70 | // Set object Class
71 | if (params.className) {
72 | this.class_name = params.className;
73 | } else {
74 | this.class_name = '';
75 | }
76 |
77 | // Set object Style
78 | if (params.style) {
79 | this.style = {};
80 | for (property in params.style) {
81 | if (params.style.hasOwnProperty(property)) {
82 | this.style[property] = params.style[property];
83 | }
84 | }
85 | }
86 |
87 | // Set parent node (append to ..)
88 | this.targetObj = (params.appendTo) ? (_ma_.$(params.appendTo) ? _ma_.$(params.appendTo) : _m_.stageframe.parentNode.parentNode) : _m_.stageframe;
89 |
90 | if (!this.obj) {
91 |
92 | // Add new object id to array
93 | _mao_.objects.push(this.id);
94 |
95 | // don't forget to set the necessary styles of the stage
96 | //this.targetObj.style.position = "relative";
97 | this.targetObj.style.overflow = "hidden";
98 | this.targetObj.appendChild(_mao_.createObject(this.id, this.class_name, this.style));
99 | this.obj = _ma_.$(this.id);
100 |
101 | if (typeof this.style !== 'undefined' && typeof this.style.backgroundImage !== 'undefined') {
102 | this.src = this.style.backgroundImage.match(/(?:[^\(\/]*\/)['|"]*([^\)]+)/g);
103 | if (_IE_ && this.style.backgroundImage.match(/\.png/i) !== null) {
104 | _mIEhacks_.pngChildHack(this.obj, this.src);
105 | } else {
106 | this.obj.style.backgroundImage = "url(" + this.src + ")";
107 | }
108 | }
109 | if (typeof this.style !== 'undefined' && typeof this.style.textShadow !== 'undefined') {
110 | if (_IE_6_7_) {
111 | _mIEhacks_.pngChildHack(this.obj, '');
112 | _mIEhacks_.textShadow(this.obj, this.style.textShadow, this.style.fontFamily);
113 | } else if (_IE_8_) {
114 | _mIEhacks_.pngChildHack(this.obj, '');
115 | _mIEhacks_.textShadow(this.obj, this.style.textShadow, this.style.fontFamily, true);
116 | }
117 | }
118 |
119 | } else {
120 | this.obj.style.display = "inline-block";
121 | if (params.style && params.style.left) {
122 | this.obj.style.left = params.style.left;
123 | }
124 | if (params.style && params.style.top) {
125 | this.obj.style.top = params.style.top;
126 | }
127 | this.obj.style.backgroundImage = "url(" + this.obj.rel + ")";
128 | }
129 |
130 | // Set object Events
131 | if (params.event) {
132 | for (type in params.event) {
133 | if (typeof params.event[type] === 'function') {
134 | _mhelper_.addEvent(this.obj, type, params.event[type]);
135 | }
136 | }
137 | }
138 |
139 | // Set object inner HTML
140 | this.html = (params.html) ? params.html : '';
141 |
142 | if (_IE_) {
143 | _mIEhacks_.addHTML(this.obj, this.html);
144 | } else {
145 | this.obj.innerHTML = this.html;
146 | }
147 |
148 | /**
149 | * Set/change object properties, class name or/and inner html
150 | * @param {Object} params Object configuration.
151 | * @param {Object} params.style Style object (css properties).
152 | * @param {String} params.html Change inner HTML.
153 | * @param {String} params.$html Add inner HTML.
154 | *
155 | * @example
156 | * app.set(params);
157 | */
158 | this.set = function (params) {
159 |
160 | var property, _object, src;
161 |
162 | _object = this.obj;
163 |
164 | if (!params || params === '') {
165 | _object.innerHTML = "";
166 | return;
167 | }
168 |
169 | if (params.type === 'textanimation') {
170 | _ma_.$(_object.id).innerHTML = params.html;
171 | }
172 |
173 | if (params.style) {
174 |
175 | for (property in params.style) {
176 | if (params.style.hasOwnProperty(property)) {
177 | if (_IE_ && property === "backgroundImage" && params.style[property].match(/\.png/i) !== null) {
178 | src = params.style[property].match(/(?:[^\(\/]*\/)['|"]*([^\)]+)/g);
179 | _mhelper_.removeChildNodesByClassName(_object, 'isChild');
180 | _mIEhacks_.pngChildHack(_object, src);
181 | }
182 |
183 | if (_IE_ && property === "textShadow") {
184 | if (_IE_6_7_) {
185 | if (params.style[property] !== '') {
186 | _mIEhacks_.textShadow(_object, params.style[property], params.style.fontFamily);
187 | }
188 | } else if (_IE_8_) {
189 | if (params.style[property] !== '') {
190 | _mIEhacks_.textShadow(_object, params.style[property], params.style.fontFamily, true);
191 | }
192 | }
193 | } else if (_IE_ && property === "fontSize") {
194 | if (_ma_.$(_object.id + '_text') !== null) {
195 | _ma_.$(_object.id + '_text').style.fontSize = params.style[property];
196 | } else {
197 | _ma_.$(_object.id).style.fontSize = params.style[property];
198 | }
199 | } else {
200 | _object.style[property] = params.style[property];
201 | }
202 | }
203 |
204 | }
205 |
206 | }
207 |
208 | if (params.html !== undefined && params.type !== 'textanimation') {
209 |
210 | this.html = (params.html !== '') ? params.html : ' ';
211 |
212 | if (_IE_) {
213 | if (typeof _ma_.$(_object.id + '_text') !== 'object') {
214 | _mIEhacks_.addHTML(_object, this.html);
215 | } else {
216 | if (_ma_.$(_object.id + '_text') !== null) {
217 | _ma_.$(_object.id + '_text').innerHTML = this.html;
218 | } else {
219 | _ma_.$(_object.id).innerHTML = this.html;
220 | }
221 | }
222 | } else {
223 | _object.innerHTML = this.html;
224 | }
225 | } else if (params.$html) {
226 | if (_IE_) {
227 | if (_ma_.$(_object.id + '_text') !== null) {
228 | _ma_.$(_object.id + '_text').innerHTML += params.$html;
229 | } else {
230 | _ma_.$(_object.id).innerHTML += params.$html;
231 | }
232 | } else {
233 | _object.innerHTML += params.$html;
234 | }
235 |
236 | }
237 | };
238 |
239 | /**
240 | * Set pager loop
241 | * Not used yet ??????????
242 | * @ignore
243 | */
244 | this.addPager = function () {
245 |
246 | _m_.self.pager = arguments[0];
247 | _m_.self.pager.id = this.obj.id;
248 |
249 | setInterval(function () {
250 |
251 | var pager = _m_.self.pager.before;
252 | pager += _m_.frame.num + 1;
253 | pager += _m_.self.pager.splitter;
254 | pager += _m_.self.frames.length;
255 | pager += _m_.self.pager.after;
256 |
257 | _m_.self.$(_m_.self.pager.id).innerHTML = pager;
258 |
259 | }, 100);
260 |
261 | };
262 |
263 | };
264 |
265 | /** @private */
266 | _mao_.createObject = function (id, class_name, style) {
267 |
268 | var property;
269 |
270 | this.object = document.createElement('div');
271 | this.object.id = id;
272 | this.object.style.position = "absolute";
273 | if (class_name !== '') {
274 | this.object.className = class_name;
275 | }
276 |
277 | for (property in style) {
278 | if (style.hasOwnProperty(property) && property !== 'backgroundImage') {
279 | this.object.style[property] = style[property];
280 | this.object.rel = style[property];
281 | }
282 | }
283 | if (this.object.style.padding) {
284 | if (!_IE_7_8_) {
285 | this.object.style.width = parseInt(this.object.style.width, 10) - (parseInt(this.object.style.padding, 10) * 2) + "px";
286 | this.object.style.height = parseInt(this.object.style.height, 10) - (parseInt(this.object.style.padding, 10) * 2) + "px";
287 | }
288 | } else {
289 | this.object.style.padding = "0px";
290 | }
291 |
292 | return this.object;
293 |
294 | };
295 |
296 | }
297 |
298 | }());
299 |
--------------------------------------------------------------------------------
/plugins/thirdparty/excanvas.js:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Google Inc.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 | document.createElement("canvas").getContext||(function(){var s=Math,j=s.round,F=s.sin,G=s.cos,V=s.abs,W=s.sqrt,k=10,v=k/2;function X(){return this.context_||(this.context_=new H(this))}var L=Array.prototype.slice;function Y(b,a){var c=L.call(arguments,2);return function(){return b.apply(a,c.concat(L.call(arguments)))}}var M={init:function(b){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var a=b||document;a.createElement("canvas");a.attachEvent("onreadystatechange",Y(this.init_,this,a))}},init_:function(b){b.namespaces.g_vml_||
15 | b.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");b.namespaces.g_o_||b.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!b.styleSheets.ex_canvas_){var a=b.createStyleSheet();a.owningElement.id="ex_canvas_";a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=b.getElementsByTagName("canvas"),d=0;for(;d','","");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};i.stroke=function(b){var a=[],c=P(b?this.fillStyle:this.strokeStyle),d=c.color,f=c.alpha*this.globalAlpha;a.push("g.x)g.x=e.x;if(h.y==null||e.yg.y)g.y=e.y}}a.push(' ">');if(b)if(typeof this.fillStyle=="object"){var m=this.fillStyle,r=0,n={x:0,y:0},o=0,q=1;if(m.type_=="gradient"){var t=m.x1_/this.arcScaleX_,E=m.y1_/this.arcScaleY_,p=this.getCoords_(m.x0_/this.arcScaleX_,m.y0_/this.arcScaleY_),
30 | z=this.getCoords_(t,E);r=Math.atan2(z.x-p.x,z.y-p.y)*180/Math.PI;if(r<0)r+=360;if(r<1.0E-6)r=0}else{var p=this.getCoords_(m.x0_,m.y0_),w=g.x-h.x,x=g.y-h.y;n={x:(p.x-h.x)/w,y:(p.y-h.y)/x};w/=this.arcScaleX_*k;x/=this.arcScaleY_*k;var R=s.max(w,x);o=2*m.r0_/R;q=2*m.r1_/R-o}var u=m.colors_;u.sort(function(ba,ca){return ba.offset-ca.offset});var J=u.length,da=u[0].color,ea=u[J-1].color,fa=u[0].alpha*this.globalAlpha,ga=u[J-1].alpha*this.globalAlpha,S=[],l=0;for(;l')}else a.push('');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push("')}a.push("");this.element_.insertAdjacentHTML("beforeEnd",a.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(b,a){var c=this.m_;return{x:k*(b*c[0][0]+a*c[1][0]+c[2][0])-v,y:k*(b*c[0][1]+a*c[1][1]+c[2][1])-v}};i.save=function(){var b={};O(this,b);this.aStack_.push(b);this.mStack_.push(this.m_);this.m_=y(I(),this.m_)};i.restore=function(){O(this.aStack_.pop(),
33 | this);this.m_=this.mStack_.pop()};function ha(b){var a=0;for(;a<3;a++){var c=0;for(;c<2;c++)if(!isFinite(b[a][c])||isNaN(b[a][c]))return false}return true}function A(b,a,c){if(!!ha(a)){b.m_=a;if(c)b.lineScale_=W(V(a[0][0]*a[1][1]-a[0][1]*a[1][0]))}}i.translate=function(b,a){A(this,y([[1,0,0],[0,1,0],[b,a,1]],this.m_),false)};i.rotate=function(b){var a=G(b),c=F(b);A(this,y([[a,c,0],[-c,a,0],[0,0,1]],this.m_),false)};i.scale=function(b,a){this.arcScaleX_*=b;this.arcScaleY_*=a;A(this,y([[b,0,0],[0,a,
34 | 0],[0,0,1]],this.m_),true)};i.transform=function(b,a,c,d,f,h){A(this,y([[b,a,0],[c,d,0],[f,h,1]],this.m_),true)};i.setTransform=function(b,a,c,d,f,h){A(this,[[b,a,0],[c,d,0],[f,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new U};function D(b){this.type_=b;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(b,a){a=P(a);this.colors_.push({offset:b,color:a.color,alpha:a.alpha})};function U(){}G_vmlCanvasManager=
35 | M;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=U})();
36 |
--------------------------------------------------------------------------------
/system/javascripts/mashi/mashi.helper.js:
--------------------------------------------------------------------------------
1 | /*
2 | Mashi Timeline Toolkit - Module Helper
3 | Copyright (c) 2008-2011 Uli Preuss. All Rights Reserved.
4 | Licensed under the terms of the GNU General Public License, version 2
5 | see: http://mashi.tv/license.md for details
6 | */
7 |
8 |
9 | /* JSLINT OPTIONS ********************************************************************* */
10 |
11 | /* jslint
12 | white: true, onevar: true, undef: true, eqeqeq: true, bitwise: true, regexp: true,
13 | newcap: true, immed: true, continue: true, strict: true, indent: 2
14 | */
15 | /* global
16 | window: false, document: false, clearInterval: false, escape: false, unescape: false,
17 | mashi: false, _m_: false
18 | */
19 |
20 |
21 | /* JSDOC TOOLKIT COMMENTS *************************************************************** */
22 |
23 | /** @fileOverview Mashi - Module Helper */
24 |
25 | /**
26 | * Alias for mashi.application.prototype.helper
27 | * @namespace
28 | */
29 | var _mhelper_;
30 |
31 | (function () {
32 |
33 | "use strict";
34 |
35 | if (typeof mashi.application.helper === "undefined") {
36 |
37 | _mhelper_ = mashi.application.prototype.helper = function () {};
38 |
39 | /**
40 | * Helper - Create unique array
41 | * @param {Array} arrayName
42 | * @return {Array} arrayName
43 | *
44 | * @example
45 | * _mhelper_.array_unique(my_array);
46 | */
47 | _mhelper_.array_unique = function (arrayName) {
48 | var i, j, newArray = [];
49 | label:
50 | for (i = 0; i < arrayName.length; i += 1) {
51 | for (j = 0; j < newArray.length; j += 1) {
52 | if (newArray[j] === arrayName[i]) {
53 | continue label;
54 | }
55 | }
56 | newArray[newArray.length] = arrayName[i];
57 | }
58 | return newArray;
59 | };
60 |
61 | /**
62 | * Helper - Get Style Property
63 | * @param {String} id
64 | * @param {String} property
65 | * @return {String} property value
66 | *
67 | * @example
68 | * _mhelper_.getStyle('header', 'color');
69 | */
70 | _mhelper_.getStyle = function (id, styleProp) {
71 | var y, x = document.getElementById(id);
72 | if (x.currentStyle) {
73 | y = x.currentStyle[styleProp];
74 | } else if (window.getComputedStyle) {
75 | y = document.defaultView.getComputedStyle(x, null).getPropertyValue(styleProp);
76 | }
77 | return y;
78 | };
79 |
80 | /**
81 | * Helper - Test if element has class name
82 | * @param {HTML-Object} node
83 | * @param {String} class name
84 | *
85 | * @example
86 | * _mhelper_.hasClass(elem, 'active');
87 | */
88 | _mhelper_.hasClass = function (node, className) {
89 | return node.className.match(new RegExp('(\\s|^)' + className + '(\\s|$)'));
90 | };
91 |
92 |
93 | /**
94 | * Helper - Remove class name
95 | * @param {HTML-Object} node
96 | * @param {String} class name
97 | *
98 | * @example
99 | * _mhelper_.removeClass(elem, 'active');
100 | */
101 | _mhelper_.removeClass = function (node, className) {
102 | if (_mhelper_.hasClass(node, className)) {
103 | var reg = new RegExp('(\\s|^)' + className + '(\\s|$)');
104 | node.className = node.className.replace(reg, ' ');
105 | }
106 | };
107 |
108 |
109 | /**
110 | * Helper - Add class name
111 | * @param {HTML-Object} node
112 | * @param {String} class name
113 | *
114 | * @example
115 | * _mhelper_.addClass(elem, 'active');
116 | */
117 | _mhelper_.addClass = function (node, className) {
118 | if (!_mhelper_.hasClass(node, className)) {
119 | node.className += " " + className;
120 | }
121 | };
122 |
123 |
124 | /**
125 | * Helper - Remove child nodes
126 | * @param {HTML-Object} node
127 | *
128 | * @example
129 | * _mhelper_.removeChildNodes(menu);
130 | */
131 | _mhelper_.removeChildNodes = function (node) {
132 | while (node.childNodes[0]) {
133 | node.removeChild(node.childNodes[0]);
134 | }
135 | };
136 |
137 |
138 | /**
139 | * Helper - Remove child nodes by class name
140 | * @param {HTML-Object} node
141 | * @param {String} class name
142 | *
143 | * @example
144 | * _mhelper_.removeChildNodes(menu, 'disabled');
145 | */
146 | _mhelper_.removeChildNodesByClassName = function (node, className) {
147 |
148 | var i;
149 |
150 | for (i = 0; i < node.childNodes.length; i += 1) {
151 | if (_mhelper_.hasClass(node.childNodes[i], className)) {
152 | node.removeChild(node.childNodes[i]);
153 | }
154 | }
155 | };
156 |
157 |
158 | /**
159 | * Helper - Set Cookie
160 | * @param {String} cookie name
161 | * @param {String} cookie value
162 | * @param {Number} expiredays
163 | *
164 | * @example
165 | * _mhelper_.setCookie(menu, 'disabled');
166 | */
167 | _mhelper_.setCookie = function (c_name, value, expiredays) {
168 | var exdate = new Date();
169 | exdate.setDate(exdate.getDate() + expiredays);
170 | document.cookie = c_name + "=" + escape(value) + ((expiredays === null) ? "" : ";expires=" + exdate.toUTCString());
171 | };
172 |
173 | /**
174 | * Helper - Get Cookie
175 | * @param {String} cookie name
176 | *
177 | * @example
178 | * _mhelper_.getCookie('my_cookie');
179 | */
180 | _mhelper_.getCookie = function (c_name) {
181 | var c_start, c_end;
182 | if (document.cookie.length > 0) {
183 | c_start = document.cookie.indexOf(c_name + "=");
184 | if (c_start !== -1) {
185 | c_start = c_start + c_name.length + 1;
186 | c_end = document.cookie.indexOf(";", c_start);
187 | if (c_end === -1) {
188 | c_end = document.cookie.length;
189 | }
190 | return unescape(document.cookie.substring(c_start, c_end));
191 | }
192 | }
193 | return "";
194 | };
195 |
196 |
197 | /**
198 | * Helper - Find left position of an element;
199 | * (c) Peter-Paul Koch
200 | * @param {HTML-Object} node
201 | *
202 | * @example
203 | * _mhelper_.findPosY(elem);
204 | */
205 | _mhelper_.findPosY = function (obj) {
206 | var curtop = 0;
207 | if (obj.offsetParent) {
208 | while (1) {
209 | curtop += obj.offsetTop;
210 | if (!obj.offsetParent) {
211 | break;
212 | }
213 | obj = obj.offsetParent;
214 | }
215 | } else if (obj.y) {
216 | curtop += obj.y;
217 | }
218 | return curtop;
219 | };
220 |
221 | /**
222 | * Helper - Find top position of an element;
223 | * (c) Peter-Paul Koch
224 | * @param {HTML-Object} node
225 | *
226 | * @example
227 | * _mhelper_.findPosX(elem);
228 | */
229 | _mhelper_.findPosX = function (obj) {
230 | var curleft = 0;
231 | if (obj.offsetParent) {
232 | while (1) {
233 | curleft += obj.offsetLeft;
234 | if (!obj.offsetParent) {
235 | break;
236 | }
237 | obj = obj.offsetParent;
238 | }
239 | } else if (obj.x) {
240 | curleft += obj.x;
241 | }
242 | return curleft;
243 | };
244 |
245 |
246 | /**
247 | * Helper - Clear all intervals
248 | *
249 | * @example
250 | * _mhelper_.clearAllIntervals();
251 | */
252 | _mhelper_.clearAllIntervals = function () {
253 |
254 | var ival;
255 |
256 | for (ival in _m_.intervals) {
257 | if (_m_.intervals.hasOwnProperty(ival)) {
258 | clearInterval(_m_.intervals[ival]);
259 | }
260 | }
261 | };
262 |
263 |
264 | /**
265 | * Helper - Add event;
266 | * written by Dean Edwards, 2005
267 | * with input from Tino Zijdel, Matthias Miller, Diego Perini
268 | * @param {HTML-Object} node
269 | * @param {String} event type (without 'on')
270 | * @param {Function} node
271 | *
272 | * @example
273 | * _mhelper_.addEvent(link, 'click', my_click_handler);
274 | */
275 | _mhelper_.addEvent = function (element, type, handler) {
276 | if (element.addEventListener) {
277 | element.addEventListener(type, handler, false);
278 | } else {
279 | // assign each event handler a unique ID
280 | if (!handler.$$guid) {
281 | handler.$$guid = _mhelper_.addEvent.guid += 1;
282 | }
283 | // create a hash table of event types for the element
284 | if (!element.events) {
285 | element.events = {};
286 | }
287 | // create a hash table of event handlers for each element/event pair
288 | var handlers = element.events[type];
289 | if (!handlers) {
290 | handlers = element.events[type] = {};
291 | // store the existing event handler (if there is one)
292 | if (element["on" + type]) {
293 | handlers[0] = element["on" + type];
294 | }
295 | }
296 | // store the event handler in the hash table
297 | handlers[handler.$$guid] = handler;
298 | // assign a global event handler to do all the work
299 | element["on" + type] = _mhelper_.handleEvent;
300 | }
301 | };
302 |
303 | // a counter used to create unique IDs
304 | _mhelper_.addEvent.guid = 1;
305 |
306 | /**
307 | * Helper - Remove event
308 | * @param {HTML-Object} node
309 | * @param {String} event type (without 'on')
310 | * @param {Function} node
311 | *
312 | * @example
313 | * _mhelper_.removeEvent(link, 'click', my_click_handler);
314 | */
315 | _mhelper_.removeEvent = function (element, type, handler) {
316 | if (element.removeEventListener) {
317 | element.removeEventListener(type, handler, false);
318 | } else {
319 | // delete the event handler from the hash table
320 | if (element.events && element.events[type]) {
321 | delete element.events[type][handler.$$guid];
322 | }
323 | }
324 | };
325 |
326 | /** @private */
327 | _mhelper_.handleEvent = function (event) {
328 | var handlers, i, returnValue = true;
329 | // grab the event object (IE uses a global event object)
330 | event = event || _mhelper_.fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event);
331 | // get a reference to the hash table of event handlers
332 | handlers = this.events[event.type];
333 | // execute each event handler
334 | for (i in handlers) {
335 | if (handlers.hasOwnProperty(i)) {
336 | this.handleEvent = handlers[i];
337 | if (this.handleEvent(event) === false) {
338 | returnValue = false;
339 | }
340 | }
341 | }
342 | return returnValue;
343 | };
344 |
345 | /** @private */
346 | _mhelper_.fixEvent = function (event) {
347 | event.preventDefault = _mhelper_.fixEvent.preventDefault;
348 | event.stopPropagation = _mhelper_.fixEvent.stopPropagation;
349 | return event;
350 | };
351 | /** @private */
352 | _mhelper_.fixEvent.preventDefault = function () {
353 | this.returnValue = false;
354 | };
355 | /** @private */
356 | _mhelper_.fixEvent.stopPropagation = function () {
357 | this.cancelBubble = true;
358 | };
359 |
360 |
361 | /**
362 | * Helper - Trim string,
363 | * (c) Douglas Crockford
364 | * @ignore
365 | * @example
366 | * ' abc '.trim();
367 | */
368 | String.prototype.trim = function () {
369 | return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1");
370 | };
371 |
372 | }
373 |
374 | }());
375 |
--------------------------------------------------------------------------------
/system/javascripts/mashi/object/mashi.object.easing.js:
--------------------------------------------------------------------------------
1 | /*
2 | Mashi Timeline Toolkit - Module Object Easing
3 | Copyright (c) 2008-2011 Uli Preuss. All Rights Reserved.
4 | Licensed under the terms of the GNU General Public License, version 2
5 | see: http://mashi.tv/license.md for details
6 |
7 | EASING EQUATIONS - Copyright 2001 Robert Penner All Rights Reserved.
8 | */
9 |
10 |
11 | /* JSLINT OPTIONS ********************************************************************* */
12 |
13 | /* jslint
14 | white: true, onevar: true, undef: true, eqeqeq: true, bitwise: true, regexp: false,
15 | newcap: true, immed: true, strict: true, indent: 2
16 | */
17 | /* global
18 | setInterval: false, clearInterval: false, _m_: false
19 | */
20 |
21 |
22 | /* JSDOC TOOLKIT COMMENTS *************************************************************** */
23 |
24 | /** @fileOverview Mashi - Module Object.Easing */
25 |
26 | (function () {
27 |
28 | "use strict";
29 |
30 | if (typeof _m_.object !== "undefined") {
31 |
32 | /**
33 | * Object Easing
34 | * @param {Object} configuration
35 | *
36 | * @example
37 | * NINJA.easing({
38 | * property: 'left',
39 | * type: 'easeInQuad',
40 | * begin: right,
41 | * finish: left,
42 | * duration: duration,
43 | * callback: function () {}
44 | * });
45 | */
46 | mashi.object.prototype.easing = function (p) {
47 |
48 | var _object = this.obj,
49 | that = this,
50 | time = 0;
51 |
52 | /** @private */
53 | this.ival = setInterval(function () {
54 | _object.style[p.property] = Math[p.type](time, parseInt(p.begin, 10), parseInt(p.finish, 10) - parseInt(p.begin, 10), p.duration) + ((p.property === 'opacity') ? '' : 'px');
55 | time += 1;
56 |
57 | if (time > p.duration) {
58 | _object.style[p.property] = p.finish;
59 | clearInterval(that.ival);
60 | if(p.callback !== undefined) {
61 | p.callback();
62 | }
63 | }
64 | }, 1);
65 |
66 | };
67 |
68 | /*
69 | TERMS OF USE - EASING EQUATIONS
70 | Open source under the BSD License.
71 | Copyright 2001 Robert Penner All rights reserved.
72 |
73 | Redistribution and use in source and binary forms, with or without modification,
74 | are permitted provided that the following conditions are met:
75 |
76 | * Redistributions of source code must retain the above copyright notice,
77 | this list of conditions and the following disclaimer.
78 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
79 | disclaimer in the documentation and/or other materials provided with the distribution.
80 | * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived
81 | from this software without specific prior written permission.
82 |
83 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
84 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
85 | IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
86 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
87 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
88 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
89 | POSSIBILITY OF SUCH DAMAGE.
90 | */
91 |
92 | // simple linear tweening - no easing
93 | // t: current time, b: beginning value, c: change in value, d: duration
94 | Math.linearTween = function (t, b, c, d) {
95 | return c * t / d + b;
96 | };
97 |
98 | ///////////// QUADRATIC EASING: t^2 ///////////////////
99 | // quadratic easing in - accelerating from zero velocity
100 | // t: current time, b: beginning value, c: change in value, d: duration
101 | // t and d can be in frames or seconds/milliseconds
102 | Math.easeInQuad = function (t, b, c, d) {
103 | return c * (t /= d) * t + b;
104 | };
105 |
106 | // quadratic easing out - decelerating to zero velocity
107 | Math.easeOutQuad = function (t, b, c, d) {
108 | return -c * (t /= d) * (t - 2) + b;
109 | };
110 |
111 | // quadratic easing in/out - acceleration until halfway, then deceleration
112 | Math.easeInOutQuad = function (t, b, c, d) {
113 | if ((t /= d / 2) < 1) {
114 | return c / 2 * t * t + b;
115 | }
116 | return -c / 2 * ((--t) * (t - 2) - 1) + b;
117 | };
118 |
119 | ///////////// CUBIC EASING: t^3 ///////////////////////
120 | // cubic easing in - accelerating from zero velocity
121 | // t: current time, b: beginning value, c: change in value, d: duration
122 | // t and d can be frames or seconds/milliseconds
123 | Math.easeInCubic = function (t, b, c, d) {
124 | return c * (t /= d) * t * t + b;
125 | };
126 |
127 | // cubic easing out - decelerating to zero velocity
128 | Math.easeOutCubic = function (t, b, c, d) {
129 | return c * ((t = t / d - 1) * t * t + 1) + b;
130 | };
131 |
132 | // cubic easing in/out - acceleration until halfway, then deceleration
133 | Math.easeInOutCubic = function (t, b, c, d) {
134 | if ((t /= d / 2) < 1) {
135 | return c / 2 * t * t * t + b;
136 | }
137 | return c / 2 * ((t -= 2) * t * t + 2) + b;
138 | };
139 |
140 | ///////////// QUARTIC EASING: t^4 /////////////////////
141 | // quartic easing in - accelerating from zero velocity
142 | // t: current time, b: beginning value, c: change in value, d: duration
143 | // t and d can be frames or seconds/milliseconds
144 | Math.easeInQuart = function (t, b, c, d) {
145 | return c * (t /= d) * t * t * t + b;
146 | };
147 |
148 | // quartic easing out - decelerating to zero velocity
149 | Math.easeOutQuart = function (t, b, c, d) {
150 | return -c * ((t = t / d - 1) * t * t * t - 1) + b;
151 | };
152 |
153 | // quartic easing in/out - acceleration until halfway, then deceleration
154 | Math.easeInOutQuart = function (t, b, c, d) {
155 | if ((t /= d / 2) < 1) {
156 | return c / 2 * t * t * t * t + b;
157 | }
158 | return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
159 | };
160 |
161 | ///////////// QUINTIC EASING: t^5 ////////////////////
162 | // quintic easing in - accelerating from zero velocity
163 | // t: current time, b: beginning value, c: change in value, d: duration
164 | // t and d can be frames or seconds/milliseconds
165 | Math.easeInQuint = function (t, b, c, d) {
166 | return c * (t /= d) * t * t * t * t + b;
167 | };
168 |
169 | // quintic easing out - decelerating to zero velocity
170 | Math.easeOutQuint = function (t, b, c, d) {
171 | return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
172 | };
173 |
174 | // quintic easing in/out - acceleration until halfway, then deceleration
175 | Math.easeInOutQuint = function (t, b, c, d) {
176 | if ((t /= d / 2) < 1) {
177 | return c / 2 * t * t * t * t * t + b;
178 | }
179 | return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
180 | };
181 |
182 | ///////////// SINUSOIDAL EASING: sin(t) ///////////////
183 | // sinusoidal easing in - accelerating from zero velocity
184 | // t: current time, b: beginning value, c: change in position, d: duration
185 | Math.easeInSine = function (t, b, c, d) {
186 | return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
187 | };
188 |
189 | // sinusoidal easing out - decelerating to zero velocity
190 | Math.easeOutSine = function (t, b, c, d) {
191 | return c * Math.sin(t / d * (Math.PI / 2)) + b;
192 | };
193 |
194 | // sinusoidal easing in/out - accelerating until halfway, then decelerating
195 | Math.easeInOutSine = function (t, b, c, d) {
196 | return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
197 | };
198 |
199 | ///////////// EXPONENTIAL EASING: 2^t /////////////////
200 | // exponential easing in - accelerating from zero velocity
201 | // t: current time, b: beginning value, c: change in position, d: duration
202 | Math.easeInExpo = function (t, b, c, d) {
203 | return (t === 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
204 | };
205 |
206 | // exponential easing out - decelerating to zero velocity
207 | Math.easeOutExpo = function (t, b, c, d) {
208 | return (t === d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
209 | };
210 |
211 | // exponential easing in/out - accelerating until halfway, then decelerating
212 | Math.easeInOutExpo = function (t, b, c, d) {
213 | if (t === 0) {
214 | return b;
215 | }
216 | if (t === d) {
217 | return b + c;
218 | }
219 | if ((t /= d / 2) < 1) {
220 | return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
221 | }
222 | return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;
223 | };
224 |
225 | /////////// CIRCULAR EASING: sqrt(1-t^2) //////////////
226 | // circular easing in - accelerating from zero velocity
227 | // t: current time, b: beginning value, c: change in position, d: duration
228 | Math.easeInCirc = function (t, b, c, d) {
229 | return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
230 | };
231 |
232 | // circular easing out - decelerating to zero velocity
233 | Math.easeOutCirc = function (t, b, c, d) {
234 | return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
235 | };
236 |
237 | // circular easing in/out - acceleration until halfway, then deceleration
238 | Math.easeInOutCirc = function (t, b, c, d) {
239 | if ((t /= d / 2) < 1) {
240 | return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
241 | }
242 | return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
243 | };
244 |
245 | /////////// ELASTIC EASING: exponentially decaying sine wave //////////////
246 | // t: current time, b: beginning value, c: change in value, d: duration, a: amplitude (optional), p: period (optional)
247 | // t and d can be in frames or seconds/milliseconds
248 | Math.easeInElastic = function (t, b, c, d, a, p) {
249 | var s;
250 | if (a === undefined) {
251 | a = 10;
252 | }
253 | if (p === undefined) {
254 | p = 25;
255 | }
256 | if (t === 0) {
257 | return b;
258 | }
259 | if ((t /= d) === 1) {
260 | return b + c;
261 | }
262 | if (!p) {
263 | p = d * 0.3;
264 | }
265 | if (a < Math.abs(c)) {
266 | a = c;
267 | s = p / 4;
268 | } else {
269 | s = p / (2 * Math.PI) * Math.asin(c / a);
270 | }
271 | return - (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
272 | };
273 |
274 | Math.easeOutElastic = function (t, b, c, d, a, p) {
275 | var s;
276 | if (a === undefined) {
277 | a = 10;
278 | }
279 | if (p === undefined) {
280 | p = 25;
281 | }
282 | if (t === 0) {
283 | return b;
284 | }
285 | if ((t /= d) === 1) {
286 | return b + c;
287 | }
288 | if (!p) {
289 | p = d * 0.3;
290 | }
291 | if (a < Math.abs(c)) {
292 | a = c;
293 | s = p / 4;
294 | } else {
295 | s = p / (2 * Math.PI) * Math.asin(c / a);
296 | }
297 | return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
298 | };
299 |
300 | Math.easeInOutElastic = function (t, b, c, d, a, p) {
301 | var s;
302 | if (a === undefined) {
303 | a = 10;
304 | }
305 | if (p === undefined) {
306 | p = 25;
307 | }
308 | if (t === 0) {
309 | return b;
310 | }
311 | if ((t /= d / 2) === 2) {
312 | return b + c;
313 | }
314 | if (!p) {
315 | p = d * (0.3 * 1.5);
316 | }
317 | if (a < Math.abs(c)) {
318 | a = c;
319 | s = p / 4;
320 | } else {
321 | s = p / (2 * Math.PI) * Math.asin(c / a);
322 | }
323 | if (t < 1) {
324 | return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
325 | }
326 | return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * 0.5 + c + b;
327 | };
328 |
329 | /////////// BACK EASING: overshooting cubic easing: (s+1)*t^3 - s*t^2 //////////////
330 | // back easing in - backtracking slightly, then reversing direction and moving to target
331 | // t: current time, b: beginning value, c: change in value, d: duration, s: overshoot amount (optional)
332 | // t and d can be in frames or seconds/milliseconds
333 | // s controls the amount of overshoot: higher s means greater overshoot
334 | // s has a default value of 1.70158, which produces an overshoot of 10 percent
335 | // s==0 produces cubic easing with no overshoot
336 | Math.easeInBack = function (t, b, c, d, s) {
337 | if (s === undefined) {
338 | s = 1.70158;
339 | }
340 | return c * (t /= d) * t * ((s + 1) * t - s) + b;
341 | };
342 |
343 | // back easing out - moving towards target, overshooting it slightly, then reversing and coming back to target
344 | Math.easeOutBack = function (t, b, c, d, s) {
345 | if (s === undefined) {
346 | s = 1.70158;
347 | }
348 | return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
349 | };
350 |
351 | // back easing in/out - backtracking slightly, then reversing direction and moving to target,
352 | // then overshooting target, reversing, and finally coming back to target
353 | Math.easeInOutBack = function (t, b, c, d, s) {
354 | if (s === undefined) {
355 | s = 1.70158;
356 | }
357 | if ((t /= d / 2) < 1) {
358 | return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
359 | }
360 | return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
361 | };
362 |
363 | /////////// BOUNCE EASING: exponentially decaying parabolic bounce //////////////
364 | // bounce easing in
365 | // t: current time, b: beginning value, c: change in position, d: duration
366 | Math.easeInBounce = function (t, b, c, d) {
367 | return c - Math.easeOutBounce(d - t, 0, c, d) + b;
368 | };
369 |
370 | // bounce easing out
371 | Math.easeOutBounce = function (t, b, c, d) {
372 | if ((t /= d) < (1 / 2.75)) {
373 | return c * (7.5625 * t * t) + b;
374 | } else if (t < (2 / 2.75)) {
375 | return c * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75) + b;
376 | } else if (t < (2.5 / 2.75)) {
377 | return c * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375) + b;
378 | } else {
379 | return c * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375) + b;
380 | }
381 | };
382 |
383 | // bounce easing in/out
384 | Math.easeInOutBounce = function (t, b, c, d) {
385 | if (t < d / 2) {
386 | return Math.easeInBounce(t * 2, 0, c, d) * 0.5 + b;
387 | }
388 | return Math.easeOutBounce(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;
389 | };
390 |
391 | }
392 |
393 | }());
394 |
--------------------------------------------------------------------------------
/system/javascripts/mashi.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Mashi - Javascript Timeline Toolkit
3 | * Core library
4 | *
5 | * Version : 1.0.0-0021
6 | * Build time : Mon Jun 13 12:32:47 CEST 2011
7 | * Repository : http://github.com/up/mashi
8 | * Website : http://mashi.tv/
9 | *
10 | * Copyright (c) 2008-2011 Uli Preuss. All rights reserved.
11 | *
12 | * Mashi is free software; you can redistribute it and/or modify it under the
13 | * terms of the version 2 of the GNU General Public License as published by the
14 | * Free Software Foundation. See http://mashi.tv/LICENSE.md for licensing options.
15 | *
16 | * This program is distributed in the hope that it will be useful, but WITHOUT
17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
19 | *
20 | */
21 |
22 | var mashi,_m_,_ma_,_WebKit_,_Safari_,_Chrome_,_Opera_,_IE_,_IE_6_,_IE_7_,_IE_8_,_IE_6_7_,_IE_6_8_,_IE_7_8_,_IE_6_7_8_,_IE_9_,MASHI_APP_PATH=MASHI_APP_PATH?MASHI_APP_PATH:"";
23 | (function(r){_m_=mashi={version:"1.0.0-0021",id:r,namespace:null,position:{X:null,Y:null},frame:{object:null,array:[],current:"odd",odd:null,oddid:null,even:null,evenid:null,interval:0,num:0,finished:!1,fading:!0},label:{stage:"stageframe",canvas:"canvasframe",text:{self:"textframe",parent:"textframe_p",grandparent:"textframe_gp"},button:{base:"controls-button-",start:"controls-button-start",stop:"controls-button-stop"}},delay:{sum:0,auto:!1},accessible:null,canvas:!1,path:"",image:{array:[]},fade:{},
24 | meta:{},buttons:{},control:{},loaded_modules:[],intervals:[],pager:"pager",running:!1,min:!1,defaults:{meta:{namespace:"app",title:"none",author:"unknown"},animation:{fade:{duration:300,steps:20,start:0,end:1},canvas:!1,start:!1,rewind:!1,accessible:"stage"},buttons:{type:!1,text:!1,position:{vertical:"bottom",horizontal:"right"}},style:{backgroundImage:"none",backgroundColor:"#FFFFFF",reset:!0},frames:[]}};_m_.uA=function(f){return f.test(navigator.userAgent)?!0:!1};_WebKit_=_m_.uA(/WebKit/);_Safari_=
25 | _m_.uA(/Safari/)&&!_m_.uA(/Chrome/)?!0:!1;_Chrome_=_m_.uA(/Safari/)&&_m_.uA(/Chrome/)?!0:!1;_Opera_=_m_.uA(/Opera/);_IE_=_IE_6_7_8_=_m_.uA(/MSIE (6|7|8)/);_IE_6_=_m_.uA(/MSIE 6/);_IE_7_=_m_.uA(/MSIE 7/);_IE_8_=_m_.uA(/MSIE 8/);_IE_6_7_=_m_.uA(/MSIE (6|7)/);_IE_6_8_=_m_.uA(/MSIE (6|8)/);_IE_7_8_=_m_.uA(/MSIE (7|8)/);_IE_9_=_m_.uA(/MSIE 9/);mashi.application=function(){var f,d,b,h,j,k,i,l,m,o,n,q,p;this.distributed=!1;this.global={};this.section=null;this.javascripts={files:0,loaded:0};this.hook={before:null,
26 | after:null};_m_.self=this;_ma_=this;this.config=function(a){if(_ma_.global.wait!==!0)setTimeout(function(){_ma_.config(a);_ma_.global.wait=!0},1E3);else if(this.title=a.meta!==void 0&&a.meta.title!==void 0?a.meta.title:_m_.defaults.meta.title,this.author=a.meta!==void 0&&a.meta.author!==void 0?a.meta.author:_m_.defaults.meta.author,_m_.namespace=a.meta!==void 0&&a.meta.namespace!==void 0?a.meta.namespace:_m_.defaults.meta.namespace,_m_.frame.oddid=a.display!==void 0?a.display:_m_.namespace,_m_.frame.evenid=
27 | a.display!==void 0?a.display+"-copy":_m_.namespace+"-copy",_m_.fade.duration=a.fade!==void 0&&a.fade.duration!==void 0?a.fade.duration:_m_.defaults.animation.fade.duration,_m_.fade.steps=a.fade!==void 0&&a.fade.steps!==void 0?a.fade.steps:_m_.defaults.animation.fade.steps,_m_.fade.start=a.fade!==void 0&&a.fade.start!==void 0?a.fade.start:_m_.defaults.animation.fade.start,_m_.fade.end=a.fade!==void 0&&a.fade.end!==void 0?a.fade.end:_m_.defaults.animation.fade.end,_m_.reset=a.style!==void 0&&a.style.reset!==
28 | void 0?a.style.reset:_m_.defaults.reset,_m_.canvas=a.animation!==void 0&&a.animation.canvas!==void 0?a.animation.canvas:_m_.canvas,_m_.start=a.animation!==void 0&&a.animation.start!==void 0?a.animation.start:_m_.defaults.animation.start,_m_.rewind=a.animation!==void 0&&a.animation.rewind!==void 0?a.animation.rewind:_m_.defaults.animation.rewind,_m_.accessible=a.animation!==void 0&&a.animation.accessible!==void 0?a.animation.accessible:_m_.defaults.animation.accessible,_m_.buttons.type=a.buttons!==
29 | void 0&&a.buttons.type!==void 0?a.buttons.type:_m_.defaults.buttons.type,_m_.buttons.text=a.buttons!==void 0&&a.buttons.text!==void 0?a.buttons.text:_m_.defaults.buttons.text,_m_.buttons.vertical=a.buttons!==void 0&&a.buttons.position!==void 0&&a.buttons.position.vertical!==void 0?a.buttons.position.vertical:_m_.defaults.buttons.position.vertical,_m_.buttons.horizontal=a.buttons!==void 0&&a.buttons.position!==void 0&&a.buttons.position.horizontal!==void 0?a.buttons.position.horizontal:_m_.defaults.buttons.position.horizontal,
30 | this.$(_m_.frame.oddid)!==null)this.addMashiStylesheets(),this.frames=_m_.frame.array,this.createLayer(),typeof _mac_!=="undefined"&&_m_.buttons.type!=="none"&&_mac_.create(),typeof this.preloader!=="undefined"&&this.frames.length>0?(this.$("mashi-controls").style.display="none",this.preloader.init()):_m_.start===!0&&this.start(),_m_.test_object=new mashi.object({id:"test_object"})};this.getLength=function(a){this.str="";a==="msec"?this.str+=_m_.delay.sum+" msecs":a==="sec"||a===""?this.str+=_m_.delay.sum/
31 | 1E3+" secs":a==="min"&&(this.str+=_m_.delay.sum/6E4+" mins");return this.str};this.createLayer=function(){_m_.frame.odd=this.$(_m_.frame.oddid);d=_m_.frame.odd.innerHTML;_m_.frame.odd.innerHTML="";_m_.frame.odd.style.display="block";_m_.position.X=this.findPosX(_m_.frame.odd)+"px";_m_.position.Y=this.findPosY(_m_.frame.odd)+"px";f=_m_.frame.odd.parentNode;f.style.position="relative";if(!this.$(_m_.frame.evenid))b=_m_.frame.odd.cloneNode(!0),b.setAttribute("id",_m_.frame.evenid),b.setAttribute("class",
32 | _m_.id),f.appendChild(b),_m_.frame.even=this.$(_m_.frame.evenid),_m_.frame.even.style.position="absolute";if(_m_.canvas===!0)h=document.createElement("canvas"),h.setAttribute("class",_m_.id),h.setAttribute("id",_m_.label.canvas),h.setAttribute("width",_m_.frame.odd.offsetWidth),h.setAttribute("height",_m_.frame.odd.offsetHeight),h.style.position="absolute",h.style.zIndex="101",f.appendChild(h),!h.getContext&&typeof G_vmlCanvasManager!=="undefined"&&(G_vmlCanvasManager.initElement(h),h=_m_.self.$(_m_.label.canvas));
33 | if(!this.$(_m_.label.stage))_m_.stageframe=_m_.frame.odd.cloneNode(!0),_m_.stageframe.setAttribute("id",_m_.label.stage),_m_.stageframe.style.zIndex=_m_.accessible==="stage"?"110":"102",_m_.stageframe.style.backgroundColor="transparent",f.appendChild(_m_.stageframe);if(!this.$(_m_.label.text.self)&&(j=document.createElement("div"),j.setAttribute("class",_m_.id),j.setAttribute("id",_m_.label.text.grandparent),j.style.zIndex="103",f.appendChild(j),f.style.overflow="hidden",k=document.createElement("div"),
34 | k.setAttribute("id",_m_.label.text.parent),k.style.zIndex="104",j.appendChild(k),i=document.createElement("div"),i.setAttribute("id",_m_.label.text.self),i.style.zIndex="105",k.appendChild(i),_m_.frame.array.length===0))i.innerHTML=d;_m_.frame.object=this.$(_m_.frame.oddid)};this.start=function(){_ma_.global.stop=!0;_m_.frame.num===_m_.frame.array.length&&this.clearStage();if(_m_.canvas===!0&&_IE_8_&&(_m_.stageframe=this.$(_m_.label.stage),_m_.running===!1)){var a=this.$(_m_.label.canvas);a.parentNode.removeChild(a);
35 | h=document.createElement("canvas");h.setAttribute("class",_m_.id);h.setAttribute("id",_m_.label.canvas);h.setAttribute("width",_m_.frame.odd.offsetWidth);h.setAttribute("height",_m_.frame.odd.offsetHeight);h.style.position="absolute";h.style.zIndex="101";f=_m_.frame.odd.parentNode;f.insertBefore(h,_m_.stageframe);typeof G_vmlCanvasManager!=="undefined"&&(G_vmlCanvasManager.initElement(h),h=_m_.self.$(_m_.label.canvas))}if(_m_.buttons.type==="single"){if(this.$(_m_.label.button.start))this.$(_m_.label.button.start).style.display=
36 | "none";if(this.$(_m_.label.button.stop))this.$(_m_.label.button.stop).style.display="inline-block"}l=!1;o=m=0;n=_m_.frame.array.length;_m_.frame.num<=0||n-1===_m_.frame.num||n===_m_.frame.num?_m_.frame.num=0:_m_.frame.num+=1;if(n>0&&_m_.frame.array[_m_.frame.num]!==void 0)_m_.frame.interval=setInterval(function(){if(_ma_.$("frame-counter")&&_m_.frame.num<_m_.frame.array.length)_ma_.$("frame-counter").innerHTML=_m_.frame.num+1;if(_m_.frame.array[_m_.frame.num]!==void 0)_m_.self.section=_m_.frame.array[_m_.frame.num][2];
37 | if(_m_.frame.num
41 | 0&&(_m_.frame.num-=1,this.flipToNumber(_m_.frame.num))};this.next=function(){_m_.frame.num<_m_.frame.array.length-1&&(_m_.frame.num+=1,this.flipToNumber(_m_.frame.num))};this.last=function(){_m_.frame.num=_m_.frame.array.length-1;this.flipToNumber(_m_.frame.num);this.hideEmptyDisplay()};this.add=function(a,c){arguments.length===2?_m_.frame.array.push([a,c]):arguments.length===3&&_m_.frame.array.push([a,c,arguments[2]]);a==="auto"?_m_.delay.auto=!0:_m_.delay.sum+=a};this.addSection=function(a,c,e){_m_.self.add(100,
42 | function(){_m_.self.set({html:" "})});var g;if(c&&typeof c!=="function"){if(g=c,e&&typeof e==="function")window.addFunc=e}else if(c&&typeof c==="function")window.addFunc=c;_m_.self.add(100,function(){_m_.self.clearStage(g);window.addFunc&&window.addFunc()},a)};this.wait=function(a,c){c?_m_.self.add(a,c):_m_.self.add(a,function(){})};this.set=function(a){var c;if(i!==void 0)if(!a||a===""||a==="undefined")i.innerHTML="";else{if(a.position&&a.position.vertical)i.style.verticalAlign=a.position.vertical;
43 | if(a.position&&a.position.horizontal)i.style.textAlign=a.position.horizontal;if(a.position&&a.position.padding)i.style.padding=a.position.padding;if(a.style)for(c in a.style)a.style.hasOwnProperty(c)&&(/background/i.test(c)?_m_.frame.object.style[c]=a.style[c]:i.style[c]=a.style[c]);if(a.html!==void 0)i.innerHTML=a.html!==""?a.html:" "}};this.$=function(a){return document.getElementById(a)};this.$$=function(a){return document.getElementsByTagName(a)};this.flipToNumber=function(a){if(_m_.frame.array[a]!==
44 | void 0)clearInterval(_m_.frame.interval),this.clearDisplay(),_m_.frame.num=a,this.callSlideFunc()};this.flipToSection=function(a){var c;for(c=0;c<_m_.frame.array.length;c+=1)_m_.frame.array[c][2]&&_m_.frame.array[c][2]===a&&(_m_.self.flipToNumber(c-1),_m_.self.start())};this.clearBackground=function(a){if(this.$(a)!==null)this.$(a).style.backgroundImage="none",this.$(a).style.backgroundColor="transparent"};this.hideEmptyDisplay=function(){_m_.frame.current==="odd"?_m_.frame.even.style.display="none":
45 | _m_.frame.odd.style.display="none"};this.clearDisplay=function(){this.clearBackground(_m_.frame.oddid);this.clearBackground(_m_.frame.evenid)};this.clearStage=function(a){var c,e,g,b,d=[];c=this.$(_m_.label.stage);e=c.getElementsByTagName("div");switch(typeof a){case "undefined":c.innerHTML="";break;case "string":for(g=e.length-1;g>=0;g-=1)if(e[g].id!==a)try{c.removeChild(e[g])}catch(f){}break;case "object":if(a instanceof Array){for(g=0;g=0;g-=1)d[g]==="delete"&&c.removeChild(e[g])}}};this.callSlideFunc=function(){_m_.running===!0&&_ma_.hook.post!==null&&typeof _ma_.hook.post==="function"&&_ma_.hook.post();_ma_.hook.pre!==null&&typeof _ma_.hook.pre==="function"&&_ma_.hook.pre();if(_m_.frame.array[_m_.frame.num]!=="undefined"&&typeof _m_.frame.array[_m_.frame.num][1]!=="string")_m_.frame.array[_m_.frame.num][1]()};this.isOdd=function(a){return a%2};this.findPosY=function(a){var c=
47 | 0;if(a.offsetParent)for(;;){c+=a.offsetTop;if(!a.offsetParent)break;a=a.offsetParent}else a.y&&(c+=a.y);return c};this.findPosX=function(a){var c=0;if(a.offsetParent)for(;;){c+=a.offsetLeft;if(!a.offsetParent)break;a=a.offsetParent}else a.x&&(c+=a.x);return c};this.setOpacity=function(a,c){var e,g;e=c>1?1:c<0?0:c;g=this.$(a);if(g!==null)g.style.opacity=e,g.style.MsFilter="progid:DXImageTransform.Microsoft.Alpha(opacity="+e*100+")",g.style.filter="alpha(opacity="+e*100+")"};this.fadeIn=function(a,
48 | c,e){var g;for(g=0;g<=1;g+=1/e)setTimeout("_ma_.setOpacity('"+a+"', "+g+")",g*c)};this.fadeOut=function(a,c,e,g){var b;for(b=0;b<=g;b+=1/e)setTimeout("_ma_.setOpacity('"+a+"', "+(1-2*(1/e)-b)+")",b*c)};this.scenery=function(a){var c,e=document.createElement("div");a.className&&e.setAttribute(document.all?"className":"class",a.className);if(a.style)for(c in a.style)a.style.hasOwnProperty(c)&&(e.style[c]=a.style[c]);if(a.id)e.id=a.id,_ma_.$("stageframe").appendChild(e)};this.setPath=function(a){_m_.path=
49 | a};this.addScript=function(a){_ma_.javascripts.files+=1;var c,e;c=document.getElementsByTagName("head")[0];e=document.createElement("script");e.type="text/javascript";e.defer="defer";e.async=!1;e.src=a;e.onreadystatechange=function(){if(e.readyState==="loaded")e.onreadystatechange=null,_ma_.javascripts.loaded+=1};e.onload=function(){_ma_.javascripts.loaded+=1};c.appendChild(e)};this.isReady=function(a){var c=setInterval(function(){_ma_.javascripts.loaded>=_ma_.javascripts.files&&(a(),clearInterval(c))},
50 | 100)};this.addStylesheet=function(a){var c,e;c=document.getElementsByTagName("head")[0];e=document.createElement("link");e.type="text/css";e.rel="stylesheet";e.href=a+".css";c.appendChild(e)};this.addMashiStylesheets=function(){var a=_ma_.getBasePath().split("system")[0],c=a+"system/stylesheets/",e=a+"application/",b=document.getElementsByTagName("body")[0],d=document.createElement("img");d.src=a+"system/images/loader.gif";d.width="100px";d.height="100px";b.appendChild(d);_m_.reset&&_ma_.addStylesheet(c+
51 | "mashi.reset");_ma_.addStylesheet(c+"mashi");_Opera_?_ma_.addStylesheet(c+"mashi.hacks.opera"):_IE_&&_ma_.addStylesheet(c+"mashi.hacks.ie");_IE_6_?_ma_.addStylesheet(c+"mashi.hacks.ie6"):_IE_7_?_ma_.addStylesheet(c+"mashi.hacks.ie7"):_IE_8_&&_ma_.addStylesheet(c+"mashi.hacks.ie8");_ma_.distributed?_ma_.addStylesheet(MASHI_APP_PATH+"custom"):_ma_.addStylesheet(e+"custom")};this.getBasePath=function(){var a,c,e,b,d;a=this.$$("script");c=a.length;for(d=0;d1?(b=c[0]!==""?c[0]:"div",a=c[1]):b="div";
53 | _m_.stageframe=_ma_.$(_m_.label.stage);b=_m_.stageframe.getElementsByTagName(b);f=RegExp("(^|\\s)"+a+"(\\s|$)");for(c=a=0;a0&&(d.path+="/",d.name+="."),d.path+=d.parts[b],d.name+=d.parts[b],b>=0&&!this.loaded_modules[d.name]&&(this.loaded_modules[d.name]=!0,f=b===1&&d.parts.length===2?this.id+"/"+d.parts[0]+"/"+_m_.id+
56 | "."+d.name:this.id+"/"+_m_.id+"."+d.name,d.parts[0]!==this.id&&d.parts.length===3&&f.split("/").length===2||_m_.self.addScript(d.base+f+".js"))};mashi.timeline=function(){var f,d,b=this;this.frames=[];this.started=!1;this.num=this.startTime=this.timestamp=0;this.getTimestamp=function(){return(new Date).getTime()};this.call=function(b){b()};this.add=function(b,d){this.frames.push([b,d])};this.start=function(){this.frames.length>0&&(b=this,f=setInterval(function(){if(b.num]*>)|(]*>$)","gi"),"")};try{var b,h,j,k,i,l="";b=this.loadXMLDoc(f);if(window.ActiveXObject){h=b.selectNodes(d);k=h.length;for(i=0;i
294 | Copyright (C)
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | , 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
340 |
--------------------------------------------------------------------------------
/system/javascripts/mashi/mashi.modules.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Mashi - Javascript Timeline Toolkit
3 | * All modules minified
4 | *
5 | * Version : 1.0.0-0021
6 | * Build time : Mon Jun 13 12:32:47 CEST 2011
7 | * Repository : http://github.com/up/mashi
8 | * Website : http://mashi.tv/
9 | *
10 | * Copyright (c) 2008-2011 Uli Preuss. All rights reserved.
11 | *
12 | * Mashi is free software; you can redistribute it and/or modify it under the
13 | * terms of the version 2 of the GNU General Public License as published by the
14 | * Free Software Foundation. See http://mashi.tv/LICENSE.md for licensing options.
15 | *
16 | * This program is distributed in the hope that it will be useful, but WITHOUT
17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
19 | *
20 | */
21 |
22 | var _mhelper_;
23 | (function(){if(typeof mashi.application.helper==="undefined")_mhelper_=mashi.application.prototype.helper=function(){},_mhelper_.array_unique=function(a){var b,c,d=[];b=0;a:for(;b0&&(b=document.cookie.indexOf(a+"="),b!==-1)){b=b+a.length+1;a=document.cookie.indexOf(";",b);if(a===-1)a=document.cookie.length;return unescape(document.cookie.substring(b,a))}return""},_mhelper_.findPosY=function(a){var b=0;if(a.offsetParent)for(;;){b+=a.offsetTop;if(!a.offsetParent)break;
26 | a=a.offsetParent}else a.y&&(b+=a.y);return b},_mhelper_.findPosX=function(a){var b=0;if(a.offsetParent)for(;;){b+=a.offsetLeft;if(!a.offsetParent)break;a=a.offsetParent}else a.x&&(b+=a.x);return b},_mhelper_.clearAllIntervals=function(){for(var a in _m_.intervals)_m_.intervals.hasOwnProperty(a)&&clearInterval(_m_.intervals[a])},_mhelper_.addEvent=function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,!1);else{if(!c.$$guid)c.$$guid=_mhelper_.addEvent.guid+=1;if(!a.events)a.events={};var d=a.events[b];
27 | d||(d=a.events[b]={},a["on"+b]&&(d[0]=a["on"+b]));d[c.$$guid]=c;a["on"+b]=_mhelper_.handleEvent}},_mhelper_.addEvent.guid=1,_mhelper_.removeEvent=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.events&&a.events[b]&&delete a.events[b][c.$$guid]},_mhelper_.handleEvent=function(a){var b,c,d=!0,a=a||_mhelper_.fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);b=this.events[a.type];for(c in b)if(b.hasOwnProperty(c))this.handleEvent=b[c],this.handleEvent(a)===
28 | !1&&(d=!1);return d},_mhelper_.fixEvent=function(a){a.preventDefault=_mhelper_.fixEvent.preventDefault;a.stopPropagation=_mhelper_.fixEvent.stopPropagation;return a},_mhelper_.fixEvent.preventDefault=function(){this.returnValue=!1},_mhelper_.fixEvent.stopPropagation=function(){this.cancelBubble=!0},String.prototype.trim=function(){return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1")}})();
29 | var _map_;
30 | (function(){if(typeof mashi.application.preloader==="undefined")mashi.min===!1&&mashi.module("helper"),_map_=mashi.application.prototype.preloader=function(){},_map_.init=function(){var a,b;a=document.getElementById("stageframe");parseFloat(_mhelper_.getStyle("stageframe","height"));_map_.PI=document.createElement("div");_map_.PI.setAttribute("id","progressIndicator");_map_.PI.style.position="relative";_map_.PI.style.top="40%";_map_.PI.style.height="100%";_map_.PI.innerHTML=" ";a.appendChild(_map_.PI);this.progress=
31 | 0;this.image_array=this.getImages();if(this.image_array.length===0)this.preloadCallback(1E3);else{this.addPreloadLayer();a="";for(b=0;b=this.image_array.length&&this.preloadCallback(300)},_map_.preloadCallback=function(a){setTimeout(function(){_map_.PI.parentNode&&_map_.PI.parentNode.removeChild&&
34 | _map_.PI.parentNode.removeChild(_map_.PI);_m_.start===!0&&window[_m_.namespace].start();_ma_.$("mashi-controls").style.display="block"},a)}})();
35 | var _mac_;
36 | (function(){if(typeof mashi.application!=="undefined")mashi.application.prototype.controls=function(){},_mac_=mashi.application.prototype.controls;_mac_.create=function(){var f,e,b,a,d,c;f=["first|ǀ<","prev|<<","start|>","stop|❙❙","next|>>","last|>ǀ"];switch(_m_.buttons.type){case "single":e="start stop";break;case "movie":e="start stop";break;case "slideshow":e="first prev next last";break;case "all":e="first prev start stop next last";break;default:e=
37 | ""}if(_m_.buttons.type!=="none"){b=document.createElement("div");b.id="mashi-controls";b.setAttribute("class",_m_.id);if(_m_.buttons.horizontal==="center")b.style.textAlign="center";a=_m_.frame.odd.parentNode;a.appendChild(b);a=document.createElement("div");a.style.position="absolute";a.style.zIndex="200";if(_m_.buttons.vertical==="top")a.style.top=_IE_6_7_?"5px":"0px";else if(_m_.buttons.vertical==="bottom")a.style.bottom=_IE_6_7_?"5px":"0px";else if(_m_.buttons.vertical==="middle")a.style.bottom=
38 | (void 0).offsetHeight/2-5+"px";if(_m_.buttons.horizontal==="right")a.style.right="5px";else if(_m_.buttons.horizontal==="left")a.style.left="5px";else if(_m_.buttons.horizontal==="center")a.style.width="99%";b.appendChild(a);for(b=0;bd)a.horizontal="2left";if(parseInt(this.oy,10)>c)a.vertical="2top";g||(g=parseInt(this.ox,10));f||(f=parseInt(this.oy,10));this.diff.left=g-d;this.leftStep=parseInt(this.diff.left/this.steps,10);this.diff.top=f-c;this.topStep=parseInt(this.diff.top/this.steps,10);this.diff.left>0&&this.diff.left-this.leftStep>=this.leftStep?(e.style.left=g-this.leftStep+
51 | "px",this.continueSlide=!0):this.diff.left<0&&this.diff.left-this.leftStep<=this.leftStep?(e.style.left=g-this.leftStep+"px",this.continueSlide=!0):e.style.left=g+"px";this.diff.top>0&&this.diff.top-this.topStep>=this.topStep?this.position.top===!0?(e.style.top=f-this.topStep+"px",this.continueSlide=!0):e.style.bottom=f+this.topStep+"px":this.diff.top<0?this.position.top===!0?e.style.top=f-this.topStep+"px":e.style.bottom=f-this.topStep+"px":this.position.top===!0?e.style.top=f+"px":e.style.bottom=
52 | f+"px";a.horizontal==="2right"&&this.diff.left<=this.steps*-1||a.horizontal==="2left"&&this.diff.left>=this.steps||a.vertical==="2bottom"&&this.diff.top<=this.steps*-1||a.vertical==="2top"&&this.diff.top>=this.steps?h.m=setTimeout(function(){h.moveTo({left:d,top:c,delay:i,callback:b,ox:parseFloat(h.obj.style.left),oy:parseFloat(h.obj.style.top)})},i):(_m_.object.moving="false",clearTimeout(h.m),typeof b==="function"&&b())},mashi.object.prototype.scrollTo=function(a){var d,c;d=parseInt(a.left,10);
53 | c=parseInt(a.top,10);a=a.delay!==void 0?parseInt(a.delay,10):void 0;this._scrollTo(d,c,a)},mashi.object.prototype._scrollTo=function(a,d,c,b){var i,g,f=this,h=this.obj;f.m=f.id;if(_m_.buttons.type==="single")_ma_.$("controls-button-start").style.display="none",_ma_.$("controls-button-stop").style.display="none";i=this.delay=c?c:1;g=this.steps=b?b:1;this.ox=parseInt(h.style.left,10);h.style.left=this.ox-this.steps+"px";if(aa.duration)c.style[a.property]=a.finish,clearInterval(b.ival),a.callback!==void 0&&a.callback()},1)},Math.linearTween=function(a,c,b,d){return b*a/d+c},Math.easeInQuad=function(a,c,b,d){return b*(a/=
57 | d)*a+c},Math.easeOutQuad=function(a,c,b,d){return-b*(a/=d)*(a-2)+c},Math.easeInOutQuad=function(a,c,b,d){if((a/=d/2)<1)return b/2*a*a+c;return-b/2*(--a*(a-2)-1)+c},Math.easeInCubic=function(a,c,b,d){return b*(a/=d)*a*a+c},Math.easeOutCubic=function(a,c,b,d){return b*((a=a/d-1)*a*a+1)+c},Math.easeInOutCubic=function(a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a+c;return b/2*((a-=2)*a*a+2)+c},Math.easeInQuart=function(a,c,b,d){return b*(a/=d)*a*a*a+c},Math.easeOutQuart=function(a,c,b,d){return-b*((a=a/d-
58 | 1)*a*a*a-1)+c},Math.easeInOutQuart=function(a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a+c;return-b/2*((a-=2)*a*a*a-2)+c},Math.easeInQuint=function(a,c,b,d){return b*(a/=d)*a*a*a*a+c},Math.easeOutQuint=function(a,c,b,d){return b*((a=a/d-1)*a*a*a*a+1)+c},Math.easeInOutQuint=function(a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a*a+c;return b/2*((a-=2)*a*a*a*a+2)+c},Math.easeInSine=function(a,c,b,d){return-b*Math.cos(a/d*(Math.PI/2))+b+c},Math.easeOutSine=function(a,c,b,d){return b*Math.sin(a/d*(Math.PI/2))+
59 | c},Math.easeInOutSine=function(a,c,b,d){return-b/2*(Math.cos(Math.PI*a/d)-1)+c},Math.easeInExpo=function(a,c,b,d){return a===0?c:b*Math.pow(2,10*(a/d-1))+c},Math.easeOutExpo=function(a,c,b,d){return a===d?c+b:b*(-Math.pow(2,-10*a/d)+1)+c},Math.easeInOutExpo=function(a,c,b,d){if(a===0)return c;if(a===d)return c+b;if((a/=d/2)<1)return b/2*Math.pow(2,10*(a-1))+c;return b/2*(-Math.pow(2,-10*--a)+2)+c},Math.easeInCirc=function(a,c,b,d){return-b*(Math.sqrt(1-(a/=d)*a)-1)+c},Math.easeOutCirc=function(a,
60 | c,b,d){return b*Math.sqrt(1-(a=a/d-1)*a)+c},Math.easeInOutCirc=function(a,c,b,d){if((a/=d/2)<1)return-b/2*(Math.sqrt(1-a*a)-1)+c;return b/2*(Math.sqrt(1-(a-=2)*a)+1)+c},Math.easeInElastic=function(a,c,b,d,e,f){e===void 0&&(e=10);f===void 0&&(f=25);if(a===0)return c;if((a/=d)===1)return c+b;f||(f=d*0.3);e"&&this.inTag?(this.tagBuffer+=">",this.inTag=!1,this.cText+=this.tagBuffer,this.curChar+=1,this.init()):this.inTag?(this.tagBuffer+=this.html.charAt(this.curChar),this.curChar+=1,this.init()):this.html.charAt(this.curChar)==="&"&&!this.inHTMLEntity?(this.HTMLEntityBuffer="&",this.inHTMLEntity=!0,this.curChar+=1,this.init()):this.html.charAt(this.curChar)===";"&&this.inHTMLEntity?(this.HTMLEntityBuffer+=";",this.inHTMLEntity=!1,this.curChar+=1,this.cText+=this.HTMLEntityBuffer,this.init()):this.inHTMLEntity?
67 | (this.HTMLEntityBuffer+=this.html.charAt(this.curChar),this.curChar+=1,this.init()):(this.cText+=this.html.charAt(this.curChar),a.innerHTML=this.cText,a.innerHTML+=this.curChar '+h+"",a.innerHTML=b;else if(d.length!==2&&d.length!==3&&d.length===4){e=c.split(",");for(f in e)e.hasOwnProperty(f)&&/-/.test(e[f])===!1&&(g=f);e=e[g].split(" ");f=e[0];g=e[1];c=e[2];d=e[3];b=' '+h+"
";a.innerHTML=b}},_mIEhacks_.pngChildHack=function(a,c){var b=document.createElement("div");b.id=a.id+"_child";b.className="isChild";b.style.width=a.style.width;b.style.height=a.style.height;if(c!=="")b.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader( src="+c+")";a.appendChild(b)},_mIEhacks_.addHTML=function(a,c){var b;
72 | if(document.getElementById(a.id+"_child")!==null){b=document.createElement("div");b.id=a.id+"_text";b.style.padding=a.style.padding;if(_IE_6_)b.style.width=a.style.width;else if(_IE_7_8_&&a.style.width!=="")b.style.width=parseInt(a.style.width,10)-parseInt(a.style.padding,10)*2+"px";b.style.height=a.style.height;a.style.marginLeft="-"+a.style.padding;a.style.marginTop="-"+a.style.padding;b.style.lineHeight=a.style.lineHeight;b.style.fontSize=a.style.fontSize;b.innerHTML=c;b.style.filter="alpha(opacity=100)";
73 | document.getElementById(a.id+"_child").appendChild(b)}else document.getElementById(a.id).innerHTML=c}})();
74 |
--------------------------------------------------------------------------------