$(function() {
"use strict";
var body = $("body"),
active = $(".slider ol li, .slider .controll"),
controll = $(".slider .controll"),
playpause = $(".playpause"),
sliderTime = 1,
sliderWait = 10000,
i = 999, o,
slideStart = $(".slider ul li:first"),
autoRun,
stop = false;
slideStart.css("left", 0);
function slideGSAP(parent) {
"use strict";
var str = parent.find(".slide p"), arr = str.text().split(" ");
for (o = 0; o < arr.length; o++) {
arr[o] = "<span>" + arr[o] + "</span>";
}
str.html(arr.join(" "));
var tl = new TimelineLite();
tl
.set(parent.find(".slide"), { perspective: 400 })
.set(parent.find(".slide h2:first"), { x: 0, autoAlpha: 1 })
.set(parent.find(".slide h2:last"), { x: 0, autoAlpha: 1 })
.set(parent.find(".slide p span"), { cycle: { color: ["white", "white"] }, opacity:1, top: 0 })
.set(parent.find(".slide button:first"), { rotationY: 0, autoAlpha: 1 })
.set(parent.find(".slide button:last"), { rotationY: 0, autoAlpha: 1 })
.set(parent.find(".slide img"), { scale: 1, rotation: 1, borderRadius: 1, autoAlpha: 1 })
.from(parent.find(".slide h2:first"), 1.5, { x: -200, autoAlpha: 0 })
.from(parent.find(".slide h2:last"), 1.5, { x: 200, autoAlpha: 0 }, 0)
.staggerFrom(parent.find(".slide p span"), 1, { cycle: { color: ["red", "yellow"] }, opacity:0, position: 'relative', cycle: {top: [-80, -40]}, left: 50 }, 0.009, "-=1")