index.html 8.85 KB
<!DOCTYPE html>
    <head>
    
  </script>
        <meta charset="utf-8">
        <title>HTML5 GSAP Ad</title>
        <meta name="ad.size" content="width=300,height=600">
        <script type="text/javascript">
            
            // IAB source: modified to allow link testing
            var clickTag = "https://huntsvillehospitalfoundation.ca";
            function getParameterByName(name)
            {
                var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
                if (match == null || match == ""){
                    return clickTag;
                } else{
                    return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
                }
            }
            clickTag = getParameterByName('clickTag');
            
        </script>
<!--
        <script type="text/javascript" src="https://quickresource.eyereturn.com/eyebuild/eyebuild_1_19.js"></script>
        <script type="text/javascript">
            window.onload = function() {
            	eyeBuild.initialize();
            }        
        </script>
-->
        
        
        <style>
            
            body{
                margin: 0;
                padding: 0;
                width: 300px;
                height: 600px;
                line-height: 1.2;
                font-size: 27px;
                letter-spacing: .4;
                color: #CD040B;
                font-family: "Neue Haas Grotesk", Arial, sans-serif;
                /*font-weight: 800;*/ /*BOLD-800, MEDIUM-600, ROMAN - 400*/
                font-style: normal;
            }
            
            a{
                text-decoration: none;
                color: inherit;
            }
            #border{
                position: absolute;
                width: 300px;
                height: 600px;
                border: 1px solid #3191b2;
                background-color: #017299;
                overflow: hidden;
                cursor: pointer;
				box-sizing: border-box;
/* 				background: url(img-50.jpg); */
/* 				background: url(guide2@2x.png) no-repeat center center; */
/* 				background-size: 300px 600px ; */
            }
            #border-rough{
                position: absolute;
                left: 13px;
                top: 16px;
                width: 270px;
                height: auto;
            }
            #img{
                opacity: 0;
            }
            
            .txt1 {
                position: absolute;
                height: auto;
                left: 45px;
                opacity: 0;
            }
            #txt1a{
                top:49px;
                width: 142px;
            }
            #txt1b{
                top:88px;
                width: 136px;
            }
            #txt1c{
                top:130px;
                width: 91px;
            }
            #txt1d{
                top:170px;
                left: 43px;
                width: 207px;
            }
            #txt1e{
                top:211px;
                width: 133px;
            }

            #blue{
                width:300px;
                height: 600px;
                background-color: #007298;
                opacity: 0;
            }

            .txt2 {
                position: absolute;
                height: auto;
                left: 49px;
                opacity: 0;
            }
            #txt2a{
                top:49px;
                left: 41px;
                width: 153px;
            }
            #txt2b{
                top:88px;
                left: 40px;
                width: 53px;
            }
            #txt2ba{
                top:87px;
                left: 105px;
                width: 129px;
            }
            #txt2c{
                top:129px;
                left: 40px;
                width: 87px;
            }
            #txt2d{
                top:129px;
                left: 135px;
                width: 110px;
            }
            #txt2e{ /* x-raying */
                top:172px;
                left: 37px;
                width: 121px;
            }
            #txt2f{
                top:172px;
                left: 167px;
                width: 87px;
            }
            #txt2g{
                top:216px;
                left: 40px;
                width: 228px;
            }

            #cta-btn{
                position: absolute;
                left: 29px;
                top:307px;

                opacity: 0;                
            }
            #cta{
                position: absolute;
                left: 73px;
                top:334px;
                opacity: 0;                
            }
            
            #logo{
                width: 198px;
                height: auto;
                position: absolute;
                left: 38px;
                bottom:40px;
                opacity: 0;
            }
            
            
        </style>
    </head>
    
    <body>
<!--         <a href="javascript:eyeBuild.doClick(0)" class="cta"> -->
        <a href="javascript:window.open(clickTag, '_blank');" class="cta">
        <div id="border">
            
            <img id="img" src="img-50.jpg" alt="A young boy and young girl happily jumping from a dock into a lake.">
            <img id="logo" src="logo_1@2x.png" alt="Huntsville Hospital Foundation logo. Healthcare for Life. Here.">
            
            <img id="txt1a" class="txt txt1" alt="Laughing," src="txt1-laughing@2x.png">
            <img id="txt1b" class="txt txt1" alt="splashing," src="txt1-splashing@2x.png">
            <img id="txt1c" class="txt txt1" alt="skiing," src="txt1-skiing@2x.png">
            <img id="txt1d" class="txt txt1" alt="wake-jumping," src="txt1-wakejumping@2x.png">
            <img id="txt1e" class="txt txt1" alt="climbing?" src="txt1-climbing@2x.png">
            
            
            <img id="txt2a" class="txt txt2" alt="We're ready"  src="txt2-were@2x.png">
            <img id="txt2b" class="txt txt2" alt="with"  src="txt2-with@2x.png">
            <img id="txt2ba" class="txt txt2" alt="mending,"  src="txt2-mending@2x.png">'
            
            <img id="txt2c" class="txt txt2" alt="fixing,"  src="txt2-fixing@2x.png">
            <img id="txt2d" class="txt txt2" alt="healing,"  src="txt2-healing@2x.png">
            <img id="txt2e" class="txt txt2" alt="x-raying,"  src="txt2-xraying@2x.png">
            <img id="txt2f" class="txt txt2" alt="caring"  src="txt2-caring@2x.png">
            <img id="txt2g" class="txt txt2" alt="at Huntsville Hospital Emergency." src="txt2-hhfe.svg">
            

            <img id="cta-btn" src="donatehereback.svg" alt="Donate Here">
            <img id="cta" src="donatehere.svg" alt="Donate Here">
            
            <img id="border-rough" src="border.svg" alt="decorative border">
            
            </div>
            
            
        </div>
        </a>

    <!-- GREENSOCK-->
        <script src="TweenMax.min.js"></script>
        
        <script>
            
            function stage1(){
            	var tl = new TimelineMax({repeat:1, repeatDelay:4}); /* {repeat:2, repeatDelay:2} */

                var d=.35;

                    
            	tl.to("#img", d, {opacity:1, ease:Power1.easeOut, delay:0 });
            	
            	tl.to("#txt1a", d, {opacity:1, ease:Power1.easeOut, delay:d });
            	tl.to("#txt1b", d, {opacity:1, ease:Power1.easeInOut, delay:d });
            	tl.to("#txt1c", d, {opacity:1, ease:Power1.easeInOut, delay:d });
            	tl.to("#txt1d", d, {opacity:1, ease:Power1.easeInOut, delay:d });
            	tl.to("#txt1e", d, {opacity:1, ease:Power1.easeInOut, delay:d });
                
                // phase 2

            	tl.to(".txt1", d, {opacity:0, ease:Power1.easeInOut, delay:2 });
            	tl.to("#img", d, {opacity:0, ease:Power1.easeInOut, delay:0 });
            	tl.to("#logo", .7, {opacity:1, ease:Power1.easeInOut, delay:-d });

            	tl.to("#txt2a", d, {opacity:1, ease:Power1.easeOut, delay:0 });
            	tl.to("#txt2b", d, {opacity:1, ease:Power1.easeInOut, delay:-d });
            	tl.to("#txt2ba", d, {opacity:1, ease:Power1.easeInOut, delay:d });
            	tl.to("#txt2c", d, {opacity:1, ease:Power1.easeInOut, delay:d });
            	tl.to("#txt2d", d, {opacity:1, ease:Power1.easeInOut, delay:-d });
            	tl.to("#txt2e", d, {opacity:1, ease:Power1.easeInOut, delay:d });
            	tl.to("#txt2f", d, {opacity:1, ease:Power1.easeInOut, delay:-d });
            	tl.to("#txt2g", d, {opacity:1, ease:Power1.easeInOut, delay:d });


             	tl.to("#cta-btn",       d, {opacity:1, ease:Linear.easeNone, delay:d });
             	tl.to("#cta",           d, {opacity:1, ease:Linear.easeNone, delay:0 });
            		
            	console.log( "time: " + tl.totalDuration() );
            }

            //---------------------
            stage1();

            
        
        </script>
       
    </body>

</html>