d5eef4d3 by Dan Rempel

Bosco For approval - 1st set

1 parent 892f7b0c
Showing 32 changed files with 294 additions and 72 deletions
......@@ -8,8 +8,12 @@
.st1{fill:#E1C19C;}
.st2{fill:#FFFFFF;}
.st3{fill:#353F4A;}
.st4{clip-path:url(#eye-right-mask);}
.st4{clip-path:url(#clipPathId);}
.st5{fill:#F27658;}
#eye-right-lash, #e-large, #e-small{
opacity: 0;
}
</style>
<g id="face">
<g>
......@@ -33,8 +37,8 @@
<path class="st1" d="M60.2,22.7c-1.2-0.2-2-1.2-2-2.5c0,0-0.1,0-0.1,0c-1.5,0-2.7-1.1-2.9-2.5c-1.6,1.8-6.1,9-5.9,11.5
c0.3,2.9,4.6,3.5,6.9,7.2c2.4-1,2.7-2.6,2.2-6.1c0.3-2.3,1.7-3.9,1.8-6.2C60.2,23.6,60.2,23.2,60.2,22.7z"/>
<g id="face_x5F_crumbs">
<circle id="e-large" class="st0" cx="59.5" cy="12.8" r="2"/>
<circle id="e_x5F_small" class="st0" cx="61.2" cy="17.3" r="1.3"/>
<circle id="f-large" class="st0" cx="59.5" cy="12.8" r="2"/>
<circle id="f-small" class="st0" cx="61.2" cy="17.3" r="1.3"/>
</g>
</g>
<g id="eyes">
......@@ -47,23 +51,25 @@
<defs>
<path id="eye-right-mask" d="M54.8,42.7c0,2-1.6,3.6-3.6,3.6c-2,0-3.6-1.6-3.6-3.6c0-2,1.6-3.6,3.6-3.6
C53.2,39.1,54.8,40.7,54.8,42.7z"/>
<clipPath id="clipPathId">
<use xlink:href="#eye-right-mask" style="overflow:visible;"/>
</clipPath>
</defs>
<clipPath id="eye-right-lid">
<use xlink:href="#eye-right-white" style="overflow:visible;"/>
</clipPath>
<g id="eye-right" class="st4">
<use xlink:href="#eye-right-mask" style="overflow:visible;"/>
<path id="eye-right-white" class="st2" d="M54.8,42.7c0,2-1.6,3.6-3.6,3.6c-2,0-3.6-1.6-3.6-3.6c0-2,1.6-3.6,3.6-3.6
C53.2,39.1,54.8,40.7,54.8,42.7z"/>
<path id="eye-right-pupil" class="st3" d="M52.3,41.6c0,0,0,0.1,0,0.1c0,0.5-0.4,0.8-0.8,0.8c-0.5,0-0.8-0.4-0.8-0.8
c0-0.3,0.1-0.5,0.3-0.7c-0.1,0-0.2,0-0.3,0c-1.4,0-2.6,1.1-2.6,2.6c0,1.4,1.1,2.6,2.6,2.6c1.4,0,2.6-1.1,2.6-2.6
C53.3,42.8,52.9,42.1,52.3,41.6z"/>
</g>
<circle id="e-large" class="st3" cx="54" cy="42" r="0.6"/>
<circle id="e-small" class="st3" cx="54" cy="42" r="0.2"/>
<path id="eye-right-lash" class="st3" d="M48.1,43.6c-0.1,0-0.3,0-0.4-0.1c-0.3-0.2-0.5-0.7-0.2-1c0.8-1.3,2.2-2,3.7-2
c1.5,0,2.9,0.8,3.7,2c0.2,0.4,0.1,0.8-0.2,1c-0.4,0.2-0.8,0.1-1-0.2c-0.5-0.8-1.4-1.3-2.4-1.3s-1.9,0.5-2.4,1.3
C48.6,43.5,48.4,43.6,48.1,43.6z"/>
</g>
<circle id="e-large" class="st3" cx="54.1" cy="42.7" r="0.6"/>
<circle id="e-small" class="st3" cx="54.2" cy="42.8" r="0.2"/>
<path id="eye-right-lash" class="st3" d="M48.1,43.6c-0.1,0-0.3,0-0.4-0.1c-0.3-0.2-0.5-0.7-0.2-1c0.8-1.3,2.2-2,3.7-2
c1.5,0,2.9,0.8,3.7,2c0.2,0.4,0.1,0.8-0.2,1c-0.4,0.2-0.8,0.1-1-0.2c-0.5-0.8-1.4-1.3-2.4-1.3s-1.9,0.5-2.4,1.3
C48.6,43.5,48.4,43.6,48.1,43.6z"/>
</g>
<g id="tongue">
<circle id="cheek" class="st2" cx="39.8" cy="59.8" r="14.5"/>
......@@ -168,3 +174,5 @@
</g>
</g>
</svg>
......
......@@ -4,9 +4,13 @@
<meta charset="utf-8">
<title>HTML5 Ad</title>
<script type="text/javascript">
<!--
<script type="text/javascript">
// IAB source: modified to allow link testing
var clickTag = "https://boscoandroxys.com";
function getParameterByName(name)
{
......@@ -19,6 +23,9 @@
}
clickTag = getParameterByName('clickTag');
</script>
-->
<script type="text/javascript" src="https://quickresource.eyereturn.com/eyebuild/eyebuild_1_19.js"></script>
......@@ -46,7 +53,6 @@
overflow: hidden;
cursor: pointer;
box-sizing: border-box;
background-position: 0 -10px;
}
img {
position: absolute;
......@@ -62,6 +68,7 @@
#border{
border-top: 10px solid #323e48;
background-position: 0 -10px;
}
.box{
......@@ -92,17 +99,12 @@
}
#subscribe{
left: 167px;
top: 190px;
right: 15px;
bottom: 25px;
}
#eye-right-lash, #e-large, #e-small{
opacity: 0;
}
#pant{
}
</style>
</head>
......@@ -121,13 +123,14 @@
<img class="box" id="box-thanksgiving" src="assets/box-thanksgiving.jpg" alt="box-thanksgiving">
-->
<img id="txt" src="assets/txt.png" alt="txt"> <!-- width="238" height="215" -->
<img id="txt" src="assets/txt.png" alt="txt">
<div id="logo"></div>
<img id="subscribe" src="assets/subscribe.svg" alt="txt" width="114" height="33">
<a id="click-tag" href="javascript:window.open(window.clickTag)"></a>
<!-- <a id="click-tag" href="javascript:window.open(window.clickTag)"></a> -->
<a id="click-tag" href="javascript:eyeBuild.doClick(0)"></a>
</div>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
......@@ -140,6 +143,8 @@
* embed external svg using ajax
*/
eyeBuild.initialize();
var container = $("#logo");
var svgUrl = "assets/logo.svg";
......@@ -170,18 +175,34 @@
for (var i = 0 in box_arr) {
tl.to(box_arr[i], 0.6, {opacity:0, delay:0 });
}
console.log("boxes: " + tl.totalDuration());
/* console.log("boxes: " + tl.totalDuration()); */
// animate the logo
var eye_tl = new TimelineMax({repeat:12});
eye_tl.to("#eye-right-lid", 2, {scaleY:.1, transformOrigin:"0% 0%", delay:0 });
var eye_tl = new TimelineMax({repeat:3});
var winkTime = .3;
// close eye
eye_tl.to("#cheek", winkTime, {x:3, y:-1, delay:0 });
eye_tl.to("#eye-right-mask", winkTime, {scaleY:.001, transformOrigin:"50% 50%", delay:-winkTime });
eye_tl.to("#eye-right-lash", .1, {opacity:1, delay:0 });
eye_tl.to(["#e-small", "#e-large"], .1, {opacity:1, delay:0 });
var crumbTime = 1;
eye_tl.to("#e-large", crumbTime, {scale:3, x:11, y:-4, transformOrigin:"50% 50%", delay:0 });
eye_tl.to("#e-small", crumbTime, {scale:6, x:11, y:1, transformOrigin:"50% 50%", delay:-crumbTime });
eye_tl.to("#e-large", crumbTime/4, {scale:.001, opacity:0, transformOrigin:"50% 50%", delay:-crumbTime/2 });
eye_tl.to("#e-small", crumbTime/4, {scale:.001, opacity:0, transformOrigin:"50% 50%", delay:-crumbTime/2 });
console.log("eye_right: " + eye_tl.totalDuration());
// open eye
eye_tl.to("#eye-right-lash", .1, {opacity:0, delay:-winkTime*1.9 });
eye_tl.to("#cheek", winkTime, {x:0, y:0, delay:-winkTime*1.9 });
eye_tl.to("#eye-right-mask", winkTime, {scaleY:1, transformOrigin:"50% 50%", delay:-winkTime*2});
eye_tl.to("#eye-right-mask", winkTime, {scaleY:1, transformOrigin:"50% 50%", delay:5});
/* console.log("eye_right: " + eye_tl.totalDuration()); */
var tongue_tl = new TimelineMax();
var pantDuration = .3;
......@@ -192,7 +213,7 @@
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:3, delay:1 });
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:13, delay:1 });
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:13, delay:1 });
console.log("tongue: " + tongue_tl.totalDuration());
/* console.log("tongue: " + tongue_tl.totalDuration()); */
};
});
......
......@@ -8,8 +8,12 @@
.st1{fill:#E1C19C;}
.st2{fill:#FFFFFF;}
.st3{fill:#353F4A;}
.st4{clip-path:url(#eyewhite-right_1_);}
.st4{clip-path:url(#clipPathId);}
.st5{fill:#F27658;}
#eye-right-lash, #e-large, #e-small{
opacity: 0;
}
</style>
<g id="face">
<g>
......@@ -33,37 +37,39 @@
<path class="st1" d="M60.2,22.7c-1.2-0.2-2-1.2-2-2.5c0,0-0.1,0-0.1,0c-1.5,0-2.7-1.1-2.9-2.5c-1.6,1.8-6.1,9-5.9,11.5
c0.3,2.9,4.6,3.5,6.9,7.2c2.4-1,2.7-2.6,2.2-6.1c0.3-2.3,1.7-3.9,1.8-6.2C60.2,23.6,60.2,23.2,60.2,22.7z"/>
<g id="face_x5F_crumbs">
<circle id="e-large" class="st0" cx="59.5" cy="12.8" r="2"/>
<circle id="e_x5F_small" class="st0" cx="61.2" cy="17.3" r="1.3"/>
<circle id="f-large" class="st0" cx="59.5" cy="12.8" r="2"/>
<circle id="f-small" class="st0" cx="61.2" cy="17.3" r="1.3"/>
</g>
</g>
<g id="eyes">
<path id="eyewhite-left" class="st2" d="M31.9,42.7c0,2-1.6,3.6-3.6,3.6c-2,0-3.6-1.6-3.6-3.6c0-2,1.6-3.6,3.6-3.6
<path id="eye-left-white" class="st2" d="M31.9,42.7c0,2-1.6,3.6-3.6,3.6c-2,0-3.6-1.6-3.6-3.6c0-2,1.6-3.6,3.6-3.6
C30.3,39.1,31.9,40.7,31.9,42.7z"/>
<path id="eye-left-pupil" class="st3" d="M30.4,41.6c0,0,0,0.1,0,0.1c0,0.5-0.4,0.8-0.8,0.8c-0.5,0-0.8-0.4-0.8-0.8
c0-0.3,0.1-0.5,0.3-0.7c-0.1,0-0.2,0-0.3,0c-1.4,0-2.6,1.1-2.6,2.6c0,1.4,1.1,2.6,2.6,2.6c1.4,0,2.6-1.1,2.6-2.6
C31.4,42.8,31,42.1,30.4,41.6z"/>
<g id="eye-right_x5F_lid">
<g id="eye-right-group">
<defs>
<path id="eyewhite-right" d="M54.8,42.7c0,2-1.6,3.6-3.6,3.6c-2,0-3.6-1.6-3.6-3.6c0-2,1.6-3.6,3.6-3.6
<path id="eye-right-mask" d="M54.8,42.7c0,2-1.6,3.6-3.6,3.6c-2,0-3.6-1.6-3.6-3.6c0-2,1.6-3.6,3.6-3.6
C53.2,39.1,54.8,40.7,54.8,42.7z"/>
<clipPath id="clipPathId">
<use xlink:href="#eye-right-mask" style="overflow:visible;"/>
</clipPath>
</defs>
<clipPath id="eyewhite-right_1_">
<use xlink:href="#eyewhite_x002D_right" style="overflow:visible;"/>
</clipPath>
<g id="eye-right-pupil" class="st4">
<path id="eyewhite_x5F_right" class="st2" d="M54.8,42.7c0,2-1.6,3.6-3.6,3.6c-2,0-3.6-1.6-3.6-3.6c0-2,1.6-3.6,3.6-3.6
<g id="eye-right" class="st4">
<use xlink:href="#eye-right-mask" style="overflow:visible;"/>
<path id="eye-right-white" class="st2" d="M54.8,42.7c0,2-1.6,3.6-3.6,3.6c-2,0-3.6-1.6-3.6-3.6c0-2,1.6-3.6,3.6-3.6
C53.2,39.1,54.8,40.7,54.8,42.7z"/>
<path id="eye_x5F_right" class="st3" d="M52.3,41.6c0,0,0,0.1,0,0.1c0,0.5-0.4,0.8-0.8,0.8c-0.5,0-0.8-0.4-0.8-0.8
<path id="eye-right-pupil" class="st3" d="M52.3,41.6c0,0,0,0.1,0,0.1c0,0.5-0.4,0.8-0.8,0.8c-0.5,0-0.8-0.4-0.8-0.8
c0-0.3,0.1-0.5,0.3-0.7c-0.1,0-0.2,0-0.3,0c-1.4,0-2.6,1.1-2.6,2.6c0,1.4,1.1,2.6,2.6,2.6c1.4,0,2.6-1.1,2.6-2.6
C53.3,42.8,52.9,42.1,52.3,41.6z"/>
</g>
<circle id="e-large" class="st3" cx="54" cy="42" r="0.6"/>
<circle id="e-small" class="st3" cx="54" cy="42" r="0.2"/>
<path id="eye-right-lash" class="st3" d="M48.1,43.6c-0.1,0-0.3,0-0.4-0.1c-0.3-0.2-0.5-0.7-0.2-1c0.8-1.3,2.2-2,3.7-2
c1.5,0,2.9,0.8,3.7,2c0.2,0.4,0.1,0.8-0.2,1c-0.4,0.2-0.8,0.1-1-0.2c-0.5-0.8-1.4-1.3-2.4-1.3s-1.9,0.5-2.4,1.3
C48.6,43.5,48.4,43.6,48.1,43.6z"/>
</g>
<circle id="e-large_1_" class="st3" cx="54.1" cy="42.7" r="0.6"/>
<circle id="e-small" class="st3" cx="54.2" cy="42.8" r="0.2"/>
<path id="eye-right-lash" class="st3" d="M48.1,43.6c-0.1,0-0.3,0-0.4-0.1c-0.3-0.2-0.5-0.7-0.2-1c0.8-1.3,2.2-2,3.7-2
c1.5,0,2.9,0.8,3.7,2c0.2,0.4,0.1,0.8-0.2,1c-0.4,0.2-0.8,0.1-1-0.2c-0.5-0.8-1.4-1.3-2.4-1.3s-1.9,0.5-2.4,1.3
C48.6,43.5,48.4,43.6,48.1,43.6z"/>
</g>
<g id="tongue">
<circle id="cheek" class="st2" cx="39.8" cy="59.8" r="14.5"/>
......@@ -168,3 +174,5 @@
</g>
</g>
</svg>
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 83.3 83.3" style="enable-background:new 0 0 83.3 83.3;" xml:space="preserve">
<style type="text/css">
.st0{opacity:0.6;fill:#FFFFFF;}
</style>
<path class="st0" d="M41.7,4.1C20.9,4.1,4.1,20.9,4.1,41.6s16.8,37.6,37.6,37.6s37.6-16.8,37.6-37.6S62.3,4.1,41.7,4.1z M46.8,46.3
c1.5-2.3,1.5-5.2,0-7.4v-6.7c5.7,3.1,7.9,10.2,4.8,16c-1.1,2-2.8,3.7-4.8,4.8V46.3z M41.8,62.8L29.2,50.2H19.1V35.1h10.1l12.6-12.5
V62.8z M63.7,48.2C61.5,56.5,55,63,46.8,65.1v-5.4c9.5-3.1,14.6-13.2,11.6-22.7c-1.8-5.5-6.1-9.8-11.6-11.6v-5.2
C59.2,23.3,66.7,35.8,63.7,48.2z"/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 83.3 83.3" style="enable-background:new 0 0 83.3 83.3;" xml:space="preserve">
<style type="text/css">
.st0{opacity:0.6;fill:#FFFFFF;}
</style>
<title>mute</title>
<path class="st0" d="M41.6,4.1C20.9,4.1,4.1,20.9,4.1,41.6s16.8,37.6,37.6,37.6c20.8,0,37.6-16.8,37.6-37.6S62.4,4.1,41.6,4.1z
M46.8,32.6c3.9,1.8,6.4,5.8,6.3,10.1v1.8l-6.3-6.3V32.6z M41.8,22.5v10.6l-5.3-5.3L41.8,22.5z M61.1,65.5l-5-5
c-2.7,2.2-5.9,3.8-9.3,4.5v-5.3c2.1-0.7,4-1.7,5.8-3L41.8,46v16.8L29.2,50.2H19.1V35.1h11.8L19.1,23.3l3.3-3.3l19.4,19.7l22.6,22.6
L61.1,65.5z M61.9,53l-3.8-3.8c0.8-2.1,1.2-4.3,1.3-6.5c-0.1-7.8-5.1-14.7-12.6-17.1v-5.3c10.3,2.4,17.6,11.6,17.6,22.1
C64.5,46.1,63.6,49.8,61.9,53z"/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 83.3 83.3" style="enable-background:new 0 0 83.3 83.3;" xml:space="preserve">
<style type="text/css">
.st0{opacity:0.6;fill:#FFFFFF;}
</style>
<title>pause</title>
<path class="st0" d="M41.6,4.1C20.9,4.1,4.1,20.9,4.1,41.6s16.8,37.6,37.6,37.6s37.6-16.8,37.6-37.6S62.4,4.1,41.6,4.1z M36.6,59.9
H26.3V23.5h10.3V59.9z M57.2,59.9H46.9V23.5h10.3V59.9z"/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 83.3 83.3" style="enable-background:new 0 0 83.3 83.3;" xml:space="preserve">
<style type="text/css">
.st0{opacity:0.6;fill:#FFFFFF;}
</style>
<title>play</title>
<path class="st0" d="M42.3,21c-12,0-21.7,9.7-21.7,21.7s9.7,21.7,21.7,21.7c12,0,21.7-9.7,21.7-21.7S54.3,21,42.3,21z M37.3,52.6
V34.5l14.8,9L37.3,52.6z"/>
</svg>
......@@ -4,10 +4,14 @@
<meta charset="utf-8">
<title>HTML5 Ad</title>
<script type="text/javascript">
<!--
<script type="text/javascript">
// IAB source: modified to allow link testing
var clickTag = "https://businesstobruce.com/wiarton";
var clickTag = "https://boscoandroxys.com";
function getParameterByName(name)
{
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
......@@ -19,6 +23,9 @@
}
clickTag = getParameterByName('clickTag');
</script>
-->
<script type="text/javascript" src="https://quickresource.eyereturn.com/eyebuild/eyebuild_1_19.js"></script>
......@@ -41,7 +48,7 @@
position: relative;
width: 100%;
height: 100%;
border: 1px solid #939598;
border: 1px solid #323e48;
background-color: #FFFFFF;
overflow: hidden;
cursor: pointer;
......@@ -50,22 +57,56 @@
img {
position: absolute;
}
#logos {
right: 0px;
top: 185px;
opacity: 0;
}
/* Custom per ad */
body{
width: 300px;
height: 250px;
width: 728px;
height: 90px;
}
#blue {
left: -402px;
#border{
border-top: 10px solid #323e48;
background-position: 0 -10px;
}
.box{
left:20px;
top:1px;
opacity: 0;
}
#box-spoileddog{
opacity: 1;
}
#txt, #txt2{
left: 105px;
top: 27px;
-ms-transform: scale(.5); /* IE 9 */
-ms-transform-origin: 0% 0%; /* IE 9 */
-webkit-transform: scale(.5); /* Chrome, Safari, Opera */
-webkit-transform-origin: 0% 0%; /* Chrome, Safari, Opera */
transform: scale(.5);
transform-origin: 0% 0%;
}
#txt2{
left: 22px;
opacity: 0;
}
#logo{
position: absolute;
left: 548px;
top: -5px;
width:182px;
height:auto;
}
#subscribe{
right: 186px;
bottom: 22px;
opacity: 0;
}
</style>
......@@ -74,25 +115,117 @@
<body>
<div id="border">
<img id="img" src="assets/img.jpg">
<img id="blue" src="assets/blue.gif">
<img id="logos" src="assets/logos.gif">
<img id="triangle" src="assets/triangle.png">
<img id="check" src="assets/check.gif">
<a id="click-tag" href="javascript:window.open(window.clickTag)"></a>
<img class="box" id="box-spoileddog" src="assets/box-spoileddog.jpg" alt="box-spoileddog">
<img class="box" id="box-thanksgiving" src="assets/box-thanksgiving.jpg" alt="box-thanksgiving" style="left:110px">
<img class="box" id="box-xmas" src="assets/box-xmas.jpg" alt="box-xmas" style="left:200px">
<img class="box" id="box-winter" src="assets/box-winter.jpg" alt="box-winter" style="left:290px">
<img class="box" id="box-birthday" src="assets/box-birthday.jpg" alt="box-box-birthday" style="left:380px">
<img class="box" id="box-valentines" src="assets/box-valentines.jpg" alt="box-valentines" style="left:470px">
<img id="txt" src="assets/txt.png" alt="txt">
<img id="txt2" src="assets/txt2.png" alt="txt">
<div id="logo"></div>
<img id="subscribe" src="assets/subscribe.svg" alt="txt" width="114" height="33">
<!-- <a id="click-tag" href="javascript:window.open(window.clickTag)"></a> -->
<a id="click-tag" href="javascript:eyeBuild.doClick(0)"></a>
</div>
<!-- GREENSOCK-->
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script>
<script>
var tl = new TimelineMax({repeat:2});
tl.to("#check", 0.6, {left:-728, ease:Power1.easeInOut, delay:3.5 });
tl.to("#blue", 0.4, {left:0, ease:Power1.easeInOut, delay:3.3 });
tl.to("#img", 1.0, {opacity:0, ease:Power1.easeInOut, delay:-0.5 });
tl.to("#logos", 1.0, {opacity:1, ease:Power1.easeInOut, delay:0 });
tl.to("#logos", 1.0, {opacity:1, ease:Power1.easeInOut, delay:2 });
$( document ).ready(function() {
/*
* embed external svg using ajax
*/
eyeBuild.initialize();
var container = $("#logo");
var svgUrl = "assets/logo.svg";
$.get(svgUrl)
.then(injectSvg);
function injectSvg(xmlDoc) {
var svg = $(xmlDoc).find("svg");
container.append(svg);
animate();
}
/*
* animate
*/
function animate(){
// animate the boxes
var tl = new TimelineMax({repeat:1});
tl.to("#txt", .5, {opacity:0, delay:2 });
var d = .1;
var box_arr = ["#box-spoileddog", "#box-thanksgiving", "#box-xmas", "#box-winter", "#box-birthday", "#box-valentines"];
tl.staggerTo(box_arr, 5*d, { opacity: 1}, d);
tl.to("#box-spoileddog", .1, {opacity:1, delay:2 });
tl.staggerTo(box_arr, 5*d, { opacity: 0}, -d);
tl.to("#txt2", .5, {opacity:1, delay:0 });
tl.to("#subscribe", .5, {opacity:1, delay:0 });
tl.to("#txt2", .5, {opacity:1, delay:5 });
console.log("boxes: " + tl.totalDuration());
// animate the logo
var eye_tl = new TimelineMax({repeat:3});
var winkTime = .3;
// close eye
eye_tl.to("#cheek", winkTime, {x:3, y:-1, delay:0 });
eye_tl.to("#eye-right-mask", winkTime, {scaleY:.001, transformOrigin:"50% 50%", delay:-winkTime });
eye_tl.to("#eye-right-lash", .1, {opacity:1, delay:0 });
eye_tl.to(["#e-small", "#e-large"], .1, {opacity:1, delay:0 });
var crumbTime = 1;
eye_tl.to("#e-large", crumbTime, {scale:3, x:11, y:-4, transformOrigin:"50% 50%", delay:0 });
eye_tl.to("#e-small", crumbTime, {scale:6, x:11, y:1, transformOrigin:"50% 50%", delay:-crumbTime });
eye_tl.to("#e-large", crumbTime/4, {scale:.001, opacity:0, transformOrigin:"50% 50%", delay:-crumbTime/2 });
eye_tl.to("#e-small", crumbTime/4, {scale:.001, opacity:0, transformOrigin:"50% 50%", delay:-crumbTime/2 });
// open eye
eye_tl.to("#eye-right-lash", .1, {opacity:0, delay:-winkTime*1.9 });
eye_tl.to("#cheek", winkTime, {x:0, y:0, delay:-winkTime*1.9 });
eye_tl.to("#eye-right-mask", winkTime, {scaleY:1, transformOrigin:"50% 50%", delay:-winkTime*2});
eye_tl.to("#eye-right-mask", winkTime, {scaleY:1, transformOrigin:"50% 50%", delay:5});
/* console.log("eye_right: " + eye_tl.totalDuration()); */
var tongue_tl = new TimelineMax();
var pantDuration = .3;
var pantTongueLength = .9;
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:9, delay:0 });
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:3, delay:1 });
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:33, delay:1 });
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:3, delay:1 });
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:13, delay:1 });
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:13, delay:1 });
/* console.log("tongue: " + tongue_tl.totalDuration()); */
};
});
</script>
......