Browse Source

Code Migration

git 5 years ago
commit
009ef040b4

+ 48 - 0
404.html

@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>贝塔网</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
+    <script src="js/preloader.js"></script> 
+    <link rel="stylesheet" href="css/style.css">
+    <link href='http://fonts.googleapis.com/css?family=Finger+Paint' rel='stylesheet' type='text/css'>
+    <script type="text/javascript" src="js/css_browser_selector.js"></script>
+    <script type="text/javascript" src="js/plax.js"></script>
+    <script type="text/javascript" src="js/jquery.spritely-0.6.1.js"></script>
+    <script type="text/javascript" src="js/jquery-animate-css-rotate-scale.js"></script>
+    <script type="text/javascript" src="js/script.js"></script>
+</head>
+<body style="height:100%;background:#FFA620;">
+<div id="indicator"></div>
+<div class="wrapper">
+    <div class="sky init">
+        <div id="clouds" class="clouds init"> </div>
+    </div>
+    <div class="convas init">
+        <div id="mountain" class="mountain"></div>
+        <div class="ground"></div>
+        <div class="holder">
+            <div class="rocks"></div>
+            <div class="work-sign"></div>
+            <div class="text-sign">
+                <div class="text font" style="margin-top:38px;line-height:28px">
+                    Error:404 <br> <a href="./"><font color="#287FC6" size="4">Go Home</font></a>
+                    <br>
+                    <!-- Copyright &copy; CDBETA.CN All Rights Reserved.-->
+                    <a href="http://www.beian.miit.gov.cn/" target="_blank"><font color="#287FC6" size="4">蜀ICP备13024449号</font></a>
+                </div>
+            </div>
+            <div class="init hole">
+                <div class="sweat"></div>
+                <div class="worker swing "></div>
+                <div class="ground-bottom">
+                    <div class="cleaner"></div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+</body>
+</html>

+ 48 - 0
50x.html

@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>贝塔网</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
+    <script src="js/preloader.js"></script> 
+    <link rel="stylesheet" href="css/style.css">
+    <link href='http://fonts.googleapis.com/css?family=Finger+Paint' rel='stylesheet' type='text/css'>
+    <script type="text/javascript" src="js/css_browser_selector.js"></script>
+    <script type="text/javascript" src="js/plax.js"></script>
+    <script type="text/javascript" src="js/jquery.spritely-0.6.1.js"></script>
+    <script type="text/javascript" src="js/jquery-animate-css-rotate-scale.js"></script>
+    <script type="text/javascript" src="js/script.js"></script>
+</head>
+<body style="height:100%;background:#FFA620;">
+<div id="indicator"></div>
+<div class="wrapper">
+    <div class="sky init">
+        <div id="clouds" class="clouds init"> </div>
+    </div>
+    <div class="convas init">
+        <div id="mountain" class="mountain"></div>
+        <div class="ground"></div>
+        <div class="holder">
+            <div class="rocks"></div>
+            <div class="work-sign"></div>
+            <div class="text-sign">
+                <div class="text font" style="margin-top:38px;line-height:28px">
+                    Error:50x <br> <a href="./"><font color="#287FC6" size="4">Go Home</font></a>
+                    <br>
+                    <!-- Copyright &copy; CDBETA.CN All Rights Reserved.-->
+                    <a href="http://www.beian.miit.gov.cn/" target="_blank"><font color="#287FC6" size="4">蜀ICP备13024449号</font></a>
+                </div>
+            </div>
+            <div class="init hole">
+                <div class="sweat"></div>
+                <div class="worker swing "></div>
+                <div class="ground-bottom">
+                    <div class="cleaner"></div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+</body>
+</html>

+ 228 - 0
css/style.css

@@ -0,0 +1,228 @@
+@import url(http://fonts.googleapis.com/css?family=Finger+Paint);
+
+body{
+  margin: 0;
+  padding: 0;
+  width: 100%;
+  height: 100%;
+  overflow:hidden;
+}
+
+#layout {
+	background-color: #FFA620;
+	/*border: 2px solid #333333;*/
+	margin: 0 auto;
+	width: 100%;
+	height: 100%;
+}
+
+.init{
+  display: none;
+  
+}
+/* Mozilla based browsers */
+::-moz-selection {
+       background-color: #FFA620;
+       color: #fff;
+}
+
+/* Works in Safari */
+::selection {
+       background-color: #FFA620;
+       color: #fff;
+}
+
+.text-sign .text {
+    color: #9D4F00;
+    font-size: 23px;
+    margin-left: 47px;
+    margin-top: 50px;
+    	-moz-transform:rotate(-5deg);
+	-webkit-transform:rotate(-5deg);
+	-o-transform:rotate(-5deg);
+	-ms-transform:rotate(-5deg);
+}
+.webkit .sweat.show{
+     top: 90px!important;
+}
+.sweat.show{
+    opacity: 0;
+    top: 50px;
+     -webkit-transition: all 1.5s ease-in-out;
+	-moz-transition: all 1.5s ease-in-out;
+	-o-transition: all 1.5s ease-in-out;
+	-ms-transition: all 1.5s ease-in-out;
+	transition: all 1.5s ease-in-out;
+}
+
+.sweat {
+    background-image: url("../images/sweat.png");
+    background-repeat: no-repeat;
+    height: 42px;
+    left: 220px;
+    opacity: 1;
+    position: absolute;
+       
+    width: 94px;
+    top: 220px;
+}
+
+.work-sign {
+    background-image: url("../images/working-sign.png");
+    height: 339px;
+    width: 218px;
+    position: absolute;
+    z-index: 300;
+    top: 0;
+   right: 20px;
+}
+.text-sign {
+    background-image: url("../images/texty-sign.png");
+    height: 225px;
+    width: 250px;
+    position: absolute;
+    z-index: 300;
+    top: -120px;
+    left: 80px;
+    font-family: 'Finger Paint', cursive;
+}
+#indicator{
+    background-color: #fff;
+     border-radius: 5px;
+       padding: 10px;
+       margin: auto;
+        background-image:  url(../images/load.gif) ;
+        background-repeat: no-repeat;
+        background-position: center;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    position: absolute;
+    width: 64px;
+    height: 64px;
+}
+
+.sky{
+     background-image:  url(../images/sky-bg.jpg) ;
+     
+      background-repeat: repeat-x;
+}
+
+.ground {
+    background-image: url("../images/ground.png");
+    background-repeat: repeat-x;
+    min-height: 200px;
+    width: 100%;
+    top: -190px;
+    position: relative;
+}
+.convas{
+     background-color: #FFA620;
+     position: relative;
+      min-height: 991px;
+     
+}
+
+.holder {
+    margin: 0 auto;
+    position: relative;
+    width: 900px;
+    top: -380px;
+}
+.mountain {
+    background-image: url("../images/mountain.png");
+    background-repeat: repeat-x;
+    min-height: 172px;
+    top: -120px;
+    width: 100%;
+    left: 0px;
+    position: relative;
+    z-index: 0;
+}
+
+.rocks {
+    background-image: url("../images/rocks.png");
+    height: 455px;
+  left: -100px;
+    position: absolute;
+    width: 791px;
+    top: 0px;
+    z-index: 300;
+}
+
+.hole {
+    background-image: url("../images/hole.png");
+    height: 273px;
+    position: absolute;
+    top: 80px;
+    width: 807px;
+    z-index: 100;
+    left: 0;
+    right: 0;
+    margin: auto;
+}
+
+.worker {
+    background-image: url("../images/worker.png");
+    background-repeat: no-repeat;
+    height: 189px;
+    width: 242px;
+    position: absolute;
+    left: 190px;
+    top: 35px;
+
+}
+.webkit.worker{
+     left: 190px;
+    top: 70px;
+}
+.swing {
+	
+	  -webkit-transition: all 1.5s ease-in-out;
+	-moz-transition: all 1.5s ease-in-out;
+	-o-transition: all 1.5s ease-in-out;
+	-ms-transition: all 1.5s ease-in-out;
+	transition: all 1.5s ease-in-out;
+	-moz-transform:rotate(40deg);
+	-webkit-transform:rotate(40deg);
+	-o-transform:rotate(40deg);
+	-ms-transform:rotate(40deg);
+}
+.webkit.right{
+    top: 460px;
+     left: 280px;
+}
+.right {
+	-moz-transform:rotate(190deg);
+	-webkit-transform:rotate(190deg);
+	-o-transform:rotate(190deg);
+	-ms-transform:rotate(190deg);
+        left: 330px;
+    top: 430px;
+}
+
+.ground-bottom .cleaner {
+    background-color: #FFA620;
+    bottom: -70px;
+    height: 300px;
+    position: absolute;
+    width: 100%;
+}
+.ground-bottom {
+    background-image: url("../images/ground-bottom.png");
+    background-repeat: no-repeat;
+    height: 463px;
+    left: -297px;
+    position: absolute;
+    top: 148px;
+    width: 110%;
+    z-index: 200;
+}
+.clouds { 
+   
+    height: 300px;
+    
+    background: transparent url(../images/clouds.png) repeat-x;
+
+}

BIN
favicon.ico


BIN
images/clouds.png


BIN
images/ground-bottom.png


BIN
images/ground.png


BIN
images/hole.png


BIN
images/load.gif


BIN
images/mountain.png


BIN
images/rocks.png


BIN
images/sky-bg.jpg


BIN
images/sweat.png


BIN
images/texty-sign.png


BIN
images/worker.png


BIN
images/working-sign.png


+ 48 - 0
index.html

@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>贝塔网</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
+    <script src="js/preloader.js"></script> 
+    <link rel="stylesheet" href="css/style.css">
+    <link href='http://fonts.googleapis.com/css?family=Finger+Paint' rel='stylesheet' type='text/css'>
+    <script type="text/javascript" src="js/css_browser_selector.js"></script>
+    <script type="text/javascript" src="js/plax.js"></script>
+    <script type="text/javascript" src="js/jquery.spritely-0.6.1.js"></script>
+    <script type="text/javascript" src="js/jquery-animate-css-rotate-scale.js"></script>
+    <script type="text/javascript" src="js/script.js"></script>
+</head>
+<body style="height:100%;background:#FFA620;">
+<div id="indicator"></div>
+<div class="wrapper">
+    <div class="sky init">
+        <div id="clouds" class="clouds init"> </div>
+    </div>
+    <div class="convas init">
+        <div id="mountain" class="mountain"></div>
+        <div class="ground"></div>
+        <div class="holder">
+            <div class="rocks"></div>
+            <div class="work-sign"></div>
+            <div class="text-sign">
+                <div class="text font" style="margin-top:38px;line-height:28px">
+                    贝塔网<br>动画演示...
+                    <br>
+                    <!-- Copyright &copy; CDBETA.CN All Rights Reserved.-->
+                    <a href="http://www.beian.miit.gov.cn/" target="_blank"><font color="#287FC6" size="4">蜀ICP备13024449号</font></a>
+                </div>
+            </div>
+            <div class="init hole">
+                <div class="sweat"></div>
+                <div class="worker swing "></div>
+                <div class="ground-bottom">
+                    <div class="cleaner"></div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+</body>
+</html>

File diff suppressed because it is too large
+ 8 - 0
js/css_browser_selector.js


File diff suppressed because it is too large
+ 2 - 0
js/jquery-1.8.3.min.js


File diff suppressed because it is too large
+ 128 - 0
js/jquery-animate-css-rotate-scale.js


+ 542 - 0
js/jquery.spritely-0.6.1.js

@@ -0,0 +1,542 @@
+/*
+ * jQuery spritely 0.6.1
+ * http://spritely.net/
+ *
+ * Documentation:
+ * http://spritely.net/documentation/
+ *
+ * Copyright 2010-2011, Peter Chater, Artlogic Media Ltd, http://www.artlogic.net/
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Change history:
+ * Version 0.6.1
+ *   - added some refinements from Gary hussey (http://bossninja.com/). Thanks Gary.
+ *     spritely now correctly clears timeouts/intervals when destroying sprites.
+ *   - added a goToFrame() method so you can set the current frame at any point.
+ *   - fixed the .spStop method where the 'last FPS' value was not being set, and the user specified FPS being ignore when .spStart was called.
+ * Version 0.6
+ *   - added events to the .sprite() method: on_first_frame, on_last_frame, on_frame:
+ *     $('#sprite').sprite({
+ *         fps: 9, 
+ *         no_of_frames: 24, 
+ *         on_first_frame: function(obj) {
+ *             obj.spState(1); // change to state 1 (first row) on frame 1
+ *         }, 
+ *         on_last_frame: function(obj) {
+ *             obj.spStop(); // stop the animation on the last frame
+ *         },
+ *         on_frame: {
+ *             8: function(obj) {
+ *                 obj.spState(2); // change to state 2 (row 2) on frame 8
+ *             },
+ *             16: function(obj) {
+ *                 obj.spState(3); // change to state 3 (row 3) on frame 16
+ *             }
+ *         }
+ *     });
+ *   - added start_at_frame: $('#sprite').sprite({fps: 9, no_of_frames: 24, start_at_frame: 8});
+ * Version 0.5
+ *   - added a 'destroy()' method which will stop the element's sprite behaviour, without actually removing the element. Example: $('#my_sprite').destroy()
+ * Version 0.4
+ *   - add up/down for 'pan' method. <ricky.hewitt@artlogic.net>
+ *   - added 'dir' option for Sprites. This means a Sprite can be played in reverse.
+ *   - removed alert message regarding jQuery.draggable (now uses console.log, if available) <ricky.hewitt@artlogic.net>
+ * Version 0.3b
+ *   - added lockTo method for locking sprites to background images. $('#sprite').lockTo('#background, {'left': 380, 'top': -60, 'bg_img_width': 1110});
+ * Version 0.2.1
+ *   - animate function will stop cycling after play_frames has completed
+ * Version 0.2 beta
+ *   - added isDraggable method (requires jquery-ui) $('#sprite').sprite().isDraggable({start: null, stop: function() {alert('Ouch! You dropped me!')});
+ *   - sprites may be set to play a limited number of frames when instantiated, e.g. $('#sprite').sprite({fps: 9, no_of_frames: 3, play_frames: 30})
+ *   - sprite speed may be controlled at any point by setting the frames-per-second $('#sprite').fps(20);
+ *   - sprites with multiple rows of frames may have there 'state' changed, e.g. to make the second row of frames
+ *     active, use: $('#sprite').spState(2); - to return to the first row, use $('#sprite').spState(1);
+ *   - background element speed may be controlled at any point with .spSpeed(), e.g. $('#bg1').spSpeed(10)
+ *   - background elements may be set to a depth where 100 is the viewer (up close) and 0 is the horizon, e.g.:
+ *     $('#bg1').pan({fps: 30, speed: 2, dir: 'left', depth: 30});
+ *     $('#bg2').pan({fps: 30, speed: 3, dir: 'left', depth: 70});
+ *     relative speed of backgrounds may now be set in a single action with $('#bg1, #bg2').spRelSpeed(20);
+ *     which will make elements closer to the horizon (lower depths) move slower than closer elements (higher depths)
+ */
+
+(function($) {
+    $._spritely = {
+        // shared methods and variables used by spritely plugin
+        animate: function(options) {
+            var el = $(options.el);
+            var el_id = el.attr('id');
+            if (!$._spritely.instances[el_id]) {
+                return this;
+            }
+            options = $.extend(options, $._spritely.instances[el_id] || {});
+            if (options.play_frames && !$._spritely.instances[el_id]['remaining_frames']) {
+                $._spritely.instances[el_id]['remaining_frames'] = options.play_frames + 1;
+            }
+            if (options.type == 'sprite' && options.fps) {
+                var frames;
+                var animate = function(el) {
+                    var w = options.width, h = options.height;
+                    if (!frames) {
+                        frames = [];
+                        total = 0
+                        for (var i = 0; i < options.no_of_frames; i ++) {
+                            frames[frames.length] = (0 - total);
+                            total += w;
+                        }
+                    }
+                    if ($._spritely.instances[el_id]['current_frame'] == 0) {
+                        if (options.on_first_frame) {
+                            options.on_first_frame(el);
+                        }
+                    } else if ($._spritely.instances[el_id]['current_frame'] == frames.length - 1) {
+                        if (options.on_last_frame) {
+                            options.on_last_frame(el);
+                        }
+                    }
+                    if (options.on_frame && options.on_frame[$._spritely.instances[el_id]['current_frame']]) {
+                        options.on_frame[$._spritely.instances[el_id]['current_frame']](el);
+                    }
+                    if (options.rewind == true) {
+                        if ($._spritely.instances[el_id]['current_frame'] <= 0) {
+                            $._spritely.instances[el_id]['current_frame'] = frames.length - 1;
+                        } else {
+                            $._spritely.instances[el_id]['current_frame'] = $._spritely.instances[el_id]['current_frame'] - 1;
+                        };
+                    } else {
+                        if ($._spritely.instances[el_id]['current_frame'] >= frames.length - 1) {
+                            $._spritely.instances[el_id]['current_frame'] = 0;
+                        } else {
+                            $._spritely.instances[el_id]['current_frame'] = $._spritely.instances[el_id]['current_frame'] + 1;
+                        }
+                    }
+
+                    var yPos = $._spritely.getBgY(el);
+                    el.css('background-position', frames[$._spritely.instances[el_id]['current_frame']] + 'px ' + yPos);
+                    if (options.bounce && options.bounce[0] > 0 && options.bounce[1] > 0) {
+                        var ud = options.bounce[0]; // up-down
+                        var lr = options.bounce[1]; // left-right
+                        var ms = options.bounce[2]; // milliseconds
+                        el
+                            .animate({top: '+=' + ud + 'px', left: '-=' + lr + 'px'}, ms)
+                            .animate({top: '-=' + ud + 'px', left: '+=' + lr + 'px'}, ms);
+                    }
+                }
+                if ($._spritely.instances[el_id]['remaining_frames'] && $._spritely.instances[el_id]['remaining_frames'] > 0) {
+                    $._spritely.instances[el_id]['remaining_frames'] --;
+                    if ($._spritely.instances[el_id]['remaining_frames'] == 0) {
+                        $._spritely.instances[el_id]['remaining_frames'] = -1;
+                        delete $._spritely.instances[el_id]['remaining_frames'];
+                        return;
+                    } else {
+                        animate(el);
+                    }
+                } else if ($._spritely.instances[el_id]['remaining_frames'] != -1) {
+                    animate(el);
+                }
+            } else if (options.type == 'pan') {
+                if (!$._spritely.instances[el_id]['_stopped']) {
+                                        if (options.dir == 'up') {
+                                            $._spritely.instances[el_id]['l'] = $._spritely.getBgX(el).replace('px', '');
+                                            $._spritely.instances[el_id]['t'] = ($._spritely.instances[el_id]['t'] - (options.speed || 1)) || 0;
+                                        }
+                                        else if (options.dir == 'down') {
+                                            $._spritely.instances[el_id]['l'] = $._spritely.getBgX(el).replace('px', '');
+                                            $._spritely.instances[el_id]['t'] = ($._spritely.instances[el_id]['t'] + (options.speed || 1)) || 0;
+                                        }
+                    else if (options.dir == 'left') {
+                        $._spritely.instances[el_id]['l'] = ($._spritely.instances[el_id]['l'] - (options.speed || 1)) || 0;
+                                                $._spritely.instances[el_id]['t'] = $._spritely.getBgY(el).replace('px', '');
+                    } else {
+                        $._spritely.instances[el_id]['l'] = ($._spritely.instances[el_id]['l'] + (options.speed || 1)) || 0;
+                                                $._spritely.instances[el_id]['t'] = $._spritely.getBgY(el).replace('px', '');
+                    }
+
+                                        // When assembling the background-position string, care must be taken
+                                        // to ensure correct formatting.. <ricky.hewitt@artlogic.net>
+                                        var bg_left = $._spritely.instances[el_id]['l'].toString();
+                                        if (bg_left.indexOf('%') == -1) {
+                                            bg_left += 'px ';
+                                        } else { bg_left += ' '; }
+
+                                        var bg_top = $._spritely.instances[el_id]['t'].toString();
+                                        if (bg_top.indexOf('%') == -1) {
+                                            bg_top += 'px ';
+                                        } else { bg_top += ' '; }
+
+                    $(el).css('background-position', bg_left + bg_top);
+                }
+            }
+            $._spritely.instances[el_id]['options'] = options;
+            $._spritely.instances[el_id]['timeout'] = window.setTimeout(function() {
+                $._spritely.animate(options);
+            }, parseInt(1000 / options.fps));
+        },
+        randomIntBetween: function(lower, higher) {
+            return parseInt(rand_no = Math.floor((higher - (lower - 1)) * Math.random()) + lower);
+        },
+        getBgY: function(el) {
+            if ($.browser.msie) {
+                // fixme - the background-position property does not work
+                // correctly in IE so we have to hack it here... Not ideal
+                // especially as $.browser is depricated
+                var bgY = $(el).css('background-position-y') || '0';
+            } else {
+                var bgY = ($(el).css('background-position') || ' ').split(' ')[1];
+            }
+            return bgY;
+        },
+        getBgX: function(el) {
+            if ($.browser.msie) {
+                // see note, above
+                var bgX = $(el).css('background-position-x') || '0';
+            } else {
+                var bgX = ($(el).css('background-position') || ' ').split(' ')[0];
+            }
+            return bgX;
+        },
+        get_rel_pos: function(pos, w) {
+            // return the position of an item relative to a background
+            // image of width given by w
+            var r = pos;
+            if (pos < 0) {
+                while (r < 0) {
+                    r += w;
+                }
+            } else {
+                while (r > w) {
+                    r -= w;
+                }
+            }
+            return r;
+        }
+    };
+    $.fn.extend({
+        spritely: function(options) {
+            var options = $.extend({
+                type: 'sprite',
+                do_once: false,
+                width: null,
+                height: null,
+                fps: 12,
+                no_of_frames: 2,
+                stop_after: null
+            }, options || {});
+            var el_id = $(this).attr('id');
+            if (!$._spritely.instances) {
+                $._spritely.instances = {};
+            }
+            if (!$._spritely.instances[el_id]) {
+                if (options.start_at_frame) {
+                    $._spritely.instances[el_id] = {current_frame: options.start_at_frame - 1};
+                } else {
+                    $._spritely.instances[el_id] = {current_frame: -1};
+                }
+            }
+            $._spritely.instances[el_id]['type'] = options.type;
+            $._spritely.instances[el_id]['depth'] = options.depth;
+            options.el = this;
+            options.width = options.width || $(this).width() || 100;
+            options.height = options.height || $(this).height() || 100;
+            var get_rate = function() {
+                return parseInt(1000 / options.fps);
+            }
+            if (!options.do_once) {
+                window.setTimeout(function() {
+                    $._spritely.animate(options);
+                }, get_rate(options.fps));
+            } else {
+                $._spritely.animate(options);
+            }
+            return this; // so we can chain events
+        },
+        sprite: function(options) {
+            var options = $.extend({
+                type: 'sprite',
+                bounce: [0, 0, 1000] // up-down, left-right, milliseconds
+            }, options || {});
+            return $(this).spritely(options);
+        },
+        pan: function(options) {
+            var options = $.extend({
+                type: 'pan',
+                dir: 'left',
+                continuous: true,
+                speed: 1 // 1 pixel per frame
+            }, options || {});
+            return $(this).spritely(options);
+        },
+        flyToTap: function(options) {
+            var options = $.extend({
+                el_to_move: null,
+                type: 'moveToTap',
+                ms: 1000, // milliseconds
+                do_once: true
+            }, options || {});
+            if (options.el_to_move) {
+                $(options.el_to_move).active();
+            }
+            if ($._spritely.activeSprite) {
+                if (window.Touch) { // iphone method see http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/9 or http://www.nimblekit.com/tutorials.html for clues...
+                    $(this)[0].ontouchstart = function(e) {
+                        var el_to_move = $._spritely.activeSprite;
+                        var touch = e.touches[0];
+                        var t = touch.pageY - (el_to_move.height() / 2);
+                        var l = touch.pageX - (el_to_move.width() / 2);
+                        el_to_move.animate({
+                            top: t + 'px',
+                            left: l + 'px'
+                        }, 1000);
+                    };
+                } else {
+                    $(this).click(function(e) {
+                        var el_to_move = $._spritely.activeSprite;
+                        $(el_to_move).stop(true);
+                        var w = el_to_move.width();
+                        var h = el_to_move.height();
+                        var l = e.pageX - (w / 2);
+                        var t = e.pageY - (h / 2);
+                        el_to_move.animate({
+                            top: t + 'px',
+                            left: l + 'px'
+                        }, 1000);
+                    });
+                }
+            }
+            return this;
+        },
+        // isDraggable requires jQuery ui
+        isDraggable: function(options) {
+            if ((!$(this).draggable)) {
+                //console.log('To use the isDraggable method you need to load jquery-ui.js');
+                return this;
+            }
+            var options = $.extend({
+                type: 'isDraggable',
+                start: null,
+                stop: null,
+                drag: null
+            }, options || {});
+            var el_id = $(this).attr('id');
+            if (!$._spritely.instances[el_id]) {
+                return this;
+            }
+            $._spritely.instances[el_id].isDraggableOptions = options;
+            $(this).draggable({
+                start: function() {
+                    var el_id = $(this).attr('id');
+                    $._spritely.instances[el_id].stop_random = true;
+                    $(this).stop(true);
+                    if ($._spritely.instances[el_id].isDraggableOptions.start) {
+                        $._spritely.instances[el_id].isDraggableOptions.start(this);
+                    }
+                },
+                drag: options.drag,
+                stop: function() {
+                    var el_id = $(this).attr('id');
+                    $._spritely.instances[el_id].stop_random = false;
+                    if ($._spritely.instances[el_id].isDraggableOptions.stop) {
+                        $._spritely.instances[el_id].isDraggableOptions.stop(this);
+                    }
+                }
+            });
+            return this;
+        },
+        active: function() {
+            // the active sprite
+            $._spritely.activeSprite = this;
+            return this;
+        },
+        activeOnClick: function() {
+            // make this the active script if clicked...
+            var el = $(this);
+            if (window.Touch) { // iphone method see http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/9 or http://www.nimblekit.com/tutorials.html for clues...
+                el[0].ontouchstart = function(e) {
+                    $._spritely.activeSprite = el;
+                };
+            } else {
+                el.click(function(e) {
+                    $._spritely.activeSprite = el;
+                });
+            }
+            return this;
+        },
+        spRandom: function(options) {
+            var options = $.extend({
+                top: 50,
+                left: 50,
+                right: 290,
+                bottom: 320,
+                speed: 4000,
+                pause: 0
+            }, options || {});
+            var el_id = $(this).attr('id');
+            if (!$._spritely.instances[el_id]) {
+                return this;
+            }
+            if (!$._spritely.instances[el_id].stop_random) {
+                var r = $._spritely.randomIntBetween;
+                var t = r(options.top, options.bottom);
+                var l = r(options.left, options.right);
+                $('#' + el_id).animate({
+                    top: t + 'px',
+                    left: l + 'px'
+                }, options.speed)
+            }
+            window.setTimeout(function() {
+                $('#' + el_id).spRandom(options);
+            }, options.speed + options.pause)
+            return this;
+        },
+        makeAbsolute: function() {
+            // remove an element from its current position in the DOM and
+            // position it absolutely, appended to the body tag.
+            return this.each(function() {
+                var el = $(this);
+                var pos = el.position();
+                el.css({position: "absolute", marginLeft: 0, marginTop: 0, top: pos.top, left: pos.left })
+                    .remove()
+                    .appendTo("body");
+            });
+
+        },
+        spSet: function(prop_name, prop_value) {
+            var el_id = $(this).attr('id');
+            $._spritely.instances[el_id][prop_name] = prop_value;
+            return this;
+        },
+        spGet: function(prop_name, prop_value) {
+            var el_id = $(this).attr('id');
+            return $._spritely.instances[el_id][prop_name];
+        },
+        spStop: function(bool) {
+            $(this).each(function() {
+                var el_id = $(this).attr('id');
+                if ($._spritely.instances[el_id]['options']['fps']) {
+                    $._spritely.instances[el_id]['_last_fps'] = $._spritely.instances[el_id]['options']['fps'];
+                }
+                $._spritely.instances[el_id]['_stopped'] = true;
+                $._spritely.instances[el_id]['_stopped_f1'] = bool;
+                if ($._spritely.instances[el_id]['type'] == 'sprite') {
+                    $(this).spSet('fps', 0);
+                }
+                if (bool) {
+                    // set background image position to 0
+                    var bp_top = $._spritely.getBgY($(this));
+                    $(this).css('background-position', '0 ' + bp_top);
+                }
+            });
+            return this;
+        },
+        spStart: function() {
+            $(this).each(function() {
+                var el_id = $(this).attr('id');
+                var fps = $._spritely.instances[el_id]['_last_fps'] || 12;
+                if ($._spritely.instances[el_id]['type'] == 'sprite') {
+                    $(this).spSet('fps', fps);
+                }
+                $._spritely.instances[el_id]['_stopped'] = false;
+            });
+            return this;
+        },
+        spToggle: function() {
+            var el_id = $(this).attr('id');
+            var stopped = $._spritely.instances[el_id]['_stopped'] || false;
+            var stopped_f1 = $._spritely.instances[el_id]['_stopped_f1'] || false;
+            if (stopped) {
+                $(this).spStart();
+            } else {
+                $(this).spStop(stopped_f1);
+            }
+            return this;
+        },
+        fps: function(fps) {
+            $(this).each(function() {
+                $(this).spSet('fps', fps);
+            });
+            return this;
+        },
+        goToFrame: function(n) {
+            var el_id = $(this).attr('id');
+            if ($._spritely.instances && $._spritely.instances[el_id]) {
+                $._spritely.instances[el_id]['current_frame'] = n - 1;
+            }
+            return this;
+        },
+        spSpeed: function(speed) {
+            $(this).each(function() {
+                $(this).spSet('speed', speed);
+            });
+            return this;
+        },
+        spRelSpeed: function(speed) {
+            $(this).each(function() {
+                var rel_depth = $(this).spGet('depth') / 100;
+                $(this).spSet('speed', speed * rel_depth);
+            });
+            return this;
+        },
+        spChangeDir: function(dir) {
+            $(this).each(function() {
+                $(this).spSet('dir', dir);
+            });
+            return this;
+        },
+        spState: function(n) {
+            $(this).each(function() {
+                // change state of a sprite, where state is the vertical
+                // position of the background image (e.g. frames row)
+                var yPos = ((n - 1) * $(this).height()) + 'px';
+                var xPos = $._spritely.getBgX($(this));
+                var bp = xPos + ' -' + yPos;
+                $(this).css('background-position', bp);
+            });
+            return this;
+        },
+        lockTo: function(el, options) {
+            $(this).each(function() {
+                var el_id = $(this).attr('id');
+                if (!$._spritely.instances[el_id]) {
+                    return this;
+                }
+                $._spritely.instances[el_id]['locked_el'] = $(this);
+                $._spritely.instances[el_id]['lock_to'] = $(el);
+                $._spritely.instances[el_id]['lock_to_options'] = options;
+                $._spritely.instances[el_id]['interval'] = window.setInterval(function() {
+                    if ($._spritely.instances[el_id]['lock_to']) {
+                        var locked_el = $._spritely.instances[el_id]['locked_el'];
+                        var locked_to_el = $._spritely.instances[el_id]['lock_to'];
+                        var locked_to_options = $._spritely.instances[el_id]['lock_to_options'];
+                        var locked_to_el_w = locked_to_options.bg_img_width;
+                        var locked_to_el_h = locked_to_el.height();
+                        var locked_to_el_y = $._spritely.getBgY(locked_to_el);
+                        var locked_to_el_x = $._spritely.getBgX(locked_to_el);
+                        var el_l = (parseInt(locked_to_el_x) + parseInt(locked_to_options['left']));
+                        var el_t = (parseInt(locked_to_el_y) + parseInt(locked_to_options['top']));
+                        el_l = $._spritely.get_rel_pos(el_l, locked_to_el_w);
+                        $(locked_el).css({
+                            'top': el_t + 'px',
+                            'left': el_l + 'px'
+                        });
+                    }
+                }, options.interval || 20);
+            });
+            return this;
+        },
+        destroy: function() {
+            var el = $(this);
+            var el_id = $(this).attr('id');
+            if ($._spritely.instances[el_id] && $._spritely.instances[el_id]['timeout']){
+                window.clearInterval($._spritely.instances[el_id]['timeout']);
+            }
+            if ($._spritely.instances[el_id] && $._spritely.instances[el_id]['interval']) {
+                window.clearInterval($._spritely.instances[el_id]['interval']);
+            }
+            delete $._spritely.instances[el_id]
+            return this;
+        }
+    })
+})(jQuery);
+// Stop IE6 re-loading background images continuously
+try {
+  document.execCommand("BackgroundImageCache", false, true);
+} catch(err) {} 

+ 328 - 0
js/plax.js

@@ -0,0 +1,328 @@
+/* Plax version 1.3.1 */
+
+/*
+  Copyright (c) 2011 Cameron McEfee
+
+  Permission is hereby granted, free of charge, to any person obtaining
+  a copy of this software and associated documentation files (the
+  "Software"), to deal in the Software without restriction, including
+  without limitation the rights to use, copy, modify, merge, publish,
+  distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so, subject to
+  the following conditions:
+
+  The above copyright notice and this permission notice shall be
+  included in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+(function ($) {
+
+  var maxfps             = 25,
+      delay              = 1 / maxfps * 1000,
+      lastRender         = new Date().getTime(),
+      layers             = [],
+      plaxActivityTarget = $(window),
+      motionEnabled      = false,
+      motionMax          = 1,
+      motionAllowance    = .05,
+      movementCycles     = 0,
+      motionLowPassFilter= 0.05,
+      motionLastX        = 1,
+      motionLastY        = 1,
+      motionData         = {
+        "xArray"  : [0,0,0,0,0],
+        "yArray"  : [0,0,0,0,0],
+        "xMotion" : 0,
+        "yMotion" : 0
+      }
+
+  // Public Methods
+  $.fn.plaxify = function (params){
+
+    return this.each(function () {
+      var layerExistsAt = -1
+      var layer         = {
+        "xRange": $(this).data('xrange') || 0,
+        "yRange": $(this).data('yrange') || 0,
+        "invert": $(this).data('invert') || false,
+        "background": $(this).data('background') || false
+      }
+
+      for (var i=0;i<layers.length;i++){
+        if (this === layers[i].obj.get(0)){
+          layerExistsAt = i
+        }
+      }
+
+      for (var param in params) {
+        if (layer[param] == 0) {
+          layer[param] = params[param]
+        }
+      }
+
+      layer.inversionFactor = (layer.invert ? -1 : 1) // inversion factor for calculations
+
+      // Add an object to the list of things to parallax
+      layer.obj    = $(this)
+      if(layer.background) {
+        // animate using the element's background
+        pos = (layer.obj.css('background-position') || "0px 0px").split(/ /)
+        if(pos.length != 2) {
+          return
+        }
+        x = pos[0].match(/^((-?\d+)\s*px|0+\s*%|left)$/)
+        y = pos[1].match(/^((-?\d+)\s*px|0+\s*%|top)$/)
+        if(!x || !y) {
+          // no can-doesville, babydoll, we need pixels or top/left as initial values (it mightbe possible to construct a temporary image from the background-image property and get the dimensions and run some numbers, but that'll almost definitely be slow)
+          return
+        }
+        layer.startX = x[2] || 0
+        layer.startY = y[2] || 0
+      } else {
+
+        // Figure out where the element is positioned, then reposition it from the top/left
+        var position = layer.obj.position()
+        layer.obj.css({
+          'top'   : position.top,
+          'left'  : position.left,
+          'right' :'',
+          'bottom':''
+        })
+        layer.startX = this.offsetLeft
+        layer.startY = this.offsetTop
+      }
+
+      layer.startX -= layer.inversionFactor * Math.floor(layer.xRange/2)
+      layer.startY -= layer.inversionFactor * Math.floor(layer.yRange/2)
+      if(layerExistsAt >= 0){
+        layers.splice(layerExistsAt,1,layer)
+      } else {
+        layers.push(layer)
+      }
+      
+    })
+  }
+
+
+  // Get minimum value of an array
+  //
+  // arr - array to be tested
+  //
+  // returns the smallest value in the array
+
+  function getMin(arr){
+    return Math.min.apply({}, arr)
+  }
+
+
+  // Get maximum value of an array
+  //
+  // arr - array to be tested
+  //
+  // returns the largest value in the array
+
+  function getMax(arr){
+    return Math.max.apply({}, arr)
+  }
+
+
+  // Determine if the device has an accelerometer
+  //
+  // returns true if the browser has window.DeviceMotionEvent (mobile)
+
+  function moveable(){
+    return window.DeviceMotionEvent != undefined
+  }
+
+
+  // Determine if the device is actually moving. If it is, enable motion based parallaxing.
+  // Otherwise, use the mouse to parallax
+  //
+  // Parameters
+  //
+  //  e - devicemotion event
+  //
+  // returns nothing
+
+  function detectMotion(e){
+    if (new Date().getTime() < lastRender + delay) return
+
+    if(moveable()){
+      var accel= e.accelerationIncludingGravity,
+          x = accel.x,
+          y = accel.y
+
+      x = (x * motionLowPassFilter) + (motionLastX * (1.0 - motionLowPassFilter));
+      y = (y * motionLowPassFilter) + (motionLastY * (1.0 - motionLowPassFilter));
+
+      motionLastX = x;
+      motionLastY = y;
+
+      if(motionData.xArray.length >= 5){
+        motionData.xArray.shift()
+      }
+      if(motionData.yArray.length >= 5){
+        motionData.yArray.shift()
+      }
+      motionData.xArray.push(x)
+      motionData.yArray.push(y)
+
+      motionData.xMotion = Math.round((getMax(motionData.xArray) - getMin(motionData.xArray))*1000)/1000
+      motionData.yMotion = Math.round((getMax(motionData.yArray) - getMin(motionData.yArray))*1000)/1000
+
+      if((motionData.xMotion > 1.5 || motionData.yMotion > 1.5)) {
+        if(motionMax!=10){
+          motionMax = 10
+        }
+      }
+
+      // test for sustained motion
+      if(motionData.xMotion > motionAllowance || motionData.yMotion > motionAllowance){
+        movementCycles++;
+      } else {
+        movementCycles = 0;
+      }
+
+      if(movementCycles >= 5){
+        motionEnabled = true
+        $(document).unbind('mousemove.plax')
+        //window.ondevicemotion = function(e){plaxifier(e)}
+
+        $(window).bind('devicemotion', plaxifier(e))
+      } else {
+        motionEnabled = false
+        $(window).unbind('devicemotion')
+        $(document).bind('mousemove.plax', function (e) {
+          plaxifier(e)
+        })
+      }
+    }
+  }
+
+
+  // Move the elements in the `layers` array within their ranges, 
+  // based on mouse or motion input 
+  //
+  // Parameters
+  //
+  //  e - mousemove or devicemotion event
+  //
+  // returns nothing
+
+  function plaxifier(e) {
+    if (new Date().getTime() < lastRender + delay) return
+      lastRender = new Date().getTime()
+    var leftOffset = (plaxActivityTarget.offset() != null) ? plaxActivityTarget.offset().left : 0,
+        topOffset  = (plaxActivityTarget.offset()  != null) ? plaxActivityTarget.offset().top : 0,
+        x          = e.pageX-leftOffset,
+        y          = e.pageY-topOffset
+    if (
+      x < 0 || x > plaxActivityTarget.width() ||
+      y < 0 || y > plaxActivityTarget.height()
+    ) return
+
+
+    if(motionEnabled == true){
+          // portrait(%2==0) or landscape
+      var i = window.orientation ? (window.orientation + 180) % 360 / 90 : 2,
+          accel= e.accelerationIncludingGravity,
+          tmp_x = i%2==0 ? -accel.x : accel.y,
+          tmp_y = i%2==0 ? accel.y : accel.x
+      // facing up(>=2) or down
+      x = i>=2 ? tmp_x : -tmp_x
+      y = i>=2 ? tmp_y : -tmp_y
+
+      // change value from a range of -x to x => 0 to 1
+      x = (x+motionMax)/2
+      y = (y+motionMax)/2
+      
+      // keep values within range
+      if(x < 0 ){
+        x = 0
+      } else if( x > motionMax ) {
+        x = motionMax
+      }
+
+      if(y < 0 ){
+        y = 0
+      } else if( y > motionMax ) {
+        y = motionMax
+      }
+    }
+
+    var hRatio = x/((motionEnabled == true) ? motionMax : plaxActivityTarget.width()),
+        vRatio = y/((motionEnabled == true) ? motionMax : plaxActivityTarget.height()),
+        layer, i
+
+    for (i = layers.length; i--;) {
+      layer = layers[i]
+      newX = layer.startX + layer.inversionFactor*(layer.xRange*hRatio)
+      newY = layer.startY + layer.inversionFactor*(layer.yRange*vRatio)
+      if(layer.background) {
+        layer.obj.css('background-position', newX+'px '+newY+'px')
+      } else {
+        layer.obj
+          .css('left', newX)
+          .css('top', newY)
+      }
+    }
+  }
+
+  $.plax = {
+
+    // Begin parallaxing
+    //
+    // Parameters
+    //
+    //  opts - options for plax
+    //    activityTarget - optional; plax will only work within the bounds of this element, if supplied.
+    //
+    //  Examples
+    //
+    //    $.plax.enable({ "activityTarget": $('#myPlaxDiv')})
+    //    # plax only happens when the mouse is over #myPlaxDiv
+    //
+    // returns nothing
+    enable: function(opts){
+      $(document).bind('mousemove.plax', function (e) {
+        if(opts){
+          plaxActivityTarget = opts.activityTarget || $(window)
+        }
+        plaxifier(e)
+      })
+
+      if(moveable()){
+        window.ondevicemotion = function(e){detectMotion(e)}
+      }
+
+    },
+
+    // Stop parallaxing
+    //
+    //  Examples
+    //
+    //    $.plax.disable()
+    //    # plax no longer runs
+    //
+    // returns nothing
+    disable: function(){
+      $(document).unbind('mousemove.plax')
+      window.ondevicemotion = undefined
+    }
+  }
+
+  if (typeof ender !== 'undefined') {
+    $.ender($.fn, true)
+  }
+
+})(function () {
+  return typeof jQuery !== 'undefined' ? jQuery : ender
+}())

+ 29 - 0
js/preloader.js

@@ -0,0 +1,29 @@
+(function($) {
+	var imgList = [];
+	$.extend({
+		preload: function(imgArr, option) {
+			var setting = $.extend({
+				init: function(loaded, total) {},
+				loaded: function(img, loaded, total) {},
+				loaded_all: function(loaded, total) {}
+			}, option);
+			var total = imgArr.length;
+			var loaded = 0;
+			
+			setting.init(0, total);
+			for(var i in imgArr) {
+				imgList.push($("<img />")
+					.attr("src", imgArr[i])
+					.load(function() {
+						loaded++;
+						setting.loaded(this, loaded, total);
+						if(loaded == total) {
+							setting.loaded_all(loaded, total);
+						}
+					})
+				);
+			}
+			
+		}
+	});
+})(jQuery);

+ 115 - 0
js/script.js

@@ -0,0 +1,115 @@
+var slider;
+var images = [
+"images/ground.png",
+"images/clouds.png",
+"images/ground-bottom.png",
+"images/hole.png",
+"images/mountain.png",
+"images/rocks.png",
+"images/sky-bg.jpg",
+"images/sweat.png",
+"images/texty-sign.png",
+"images/worker.png",
+"images/working-sign.png"
+];
+
+var index = 0;
+var transitionSpeed = 500;
+var imageIntervals = 5000;
+
+var startIntervals;
+var intervalSetTime;
+var contentOpen = false;
+
+$(document).ready(function() {
+    
+
+
+           
+                                         
+	
+    $(function() {
+		
+        $.preload(images, {
+            init: function(loaded, total) {
+            		
+            },
+			
+            loaded_all: function(loaded, total) { 
+             
+                            
+                $('#indicator').fadeOut('slow', function() {
+                   
+                    function swing(){
+                                   if($('html').hasClass('ie')){
+                                   if(!$('.swing').hasClass('down')){
+                                   
+                           $('.swing').animate({rotate:'190deg', left: 330,
+    top: 430},1500,function(){
+    $('.swing').toggleClass('down');
+    });    
+                                   }else{
+                                   
+                                    $('.swing').animate({rotate:'40deg', left: 190,
+    top: 35},1500,function(){
+    $('.swing').toggleClass('down');
+    });    
+                                   
+                                   }}else{
+                                   $('.swing').toggleClass('right');
+                                   }
+                       
+         
+                        $('.sweat').toggleClass('show');
+                        
+                        setTimeout(swing, 1500);
+                    }
+                    swing(); 
+        
+                   
+                    $('#clouds').pan({
+                        fps: 30, 
+                        speed: 1.8, 
+                        dir: 'left', 
+                        depth: 300
+                    });
+                     
+                   
+                                
+                    $('.init').fadeIn(function(){
+                        $(this).removeClass('init');
+                      
+                            
+                        setTimeout(function(){
+                            
+                            $('.mountain').plaxify({
+                                "xRange":20,
+                                "yRange":0
+                            }) ;
+                                     
+                                        
+                              
+                            $.plax.enable(); 
+                            
+                           
+ 
+         
+                            
+                        },500)   
+                                  
+                                  
+                                      
+                                       
+                    })
+                                         
+                                        
+                                        
+					
+                });
+            }
+        });
+    });
+ 
+ 
+
+})