index.html 5.81 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: 728px;
                height: 90px;
                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: 728px;
                height: 90px;
                border: 1px solid #3191b2;
                background-color: #0077a0;/* #0077a0 */
                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 ; */
            }
            img{
                position: absolute;
            }
            .img{
                position: absolute;
                opacity: 0;
                width: 728px;
                height: 90px;
            }
            .txt{
                position: absolute;
                right:220px;
                top:10px;
                opacity: 0;
            }
            .txtb{
                position: absolute;
            }
            
            #img1{
                opacity: 1;
                background-color: #395252;
            }
            #img2{
                background-color: #3e403c;
            }
            #img3{
                background-color: #1e2226;
            }
            #txtb1{
                left:-400px;
                top:32px;
            }
            
            #cta{
                position: absolute;
                width: 157px;
                height: auto;
                left: 238px;
                top:20px;
                opacity: 0;                
            }
            
            #logo{
                position: absolute;
                width: 150px;
                height: auto;
                right: 35px;
                top:23px;
                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">

            <div id="img1" class="img"><img src="assets/img1.jpg" alt="img1@60" width="728"></div>
            <img id="txt1" class="txt" src="assets/txt1@2x.png" alt="txt1@2x" width="250">
            
            <div id="img2" class="img"><img src="assets/img2.jpg" alt="img2@60" width="728"></div>
            <img id="txt2" class="txt" src="assets/txt2@2x.png" alt="txt2@2x" width="250">
            
            
            <div id="img3" class="img"><img src="assets/img3.jpg" alt="img3@60" width="728"></div>
            <img id="txt3" class="txt" src="assets/txt3@2x.png" alt="txt3@2x" width="250">
            
            <img id="logo" src="assets/logo@2x.png" alt="Huntsville Hospital Foundation logo. Healthcare for Life. Here.">
            <img id="cta" src="assets/donate@2x.png" alt="Donate Now" width="157">            
            <img id="txtb1" class="txtb" src="assets/txtb1@2x.png" alt="txtb1@2x" width="234">
            
                        
            
        </div>
        </a>

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

            function stage1(){
                imgtxt("#img1", "#txt1");
                imgtxt("#img2", "#txt2");
                imgtxt("#img3", "#txt3");
                
                // phase 2

            	tl.to("#logo", .5, {opacity:1, delay:-.5 });
                tl.to("#txtb1", .5, {left:38, ease:Power1.easeOut, delay:-.5});
             	tl.to("#cta",  .5, {opacity:1, left:268, ease:Power1.easeOut, delay:.2 });
            		
            	console.log( "time: " + tl.totalDuration() );
            }
            
            function imgtxt(imgId, txtId){
                console.log( "img: " + imgId );
            	            	
            	tl.to(imgId, .5, {opacity:1, delay:-.5 });
            	tl.to(txtId, .7, {opacity:1, delay:0 });


            	tl.to(imgId, .5, {opacity:0, delay:.9 });
            	tl.to(txtId, .5, {opacity:0, delay:-.5 });

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

            
        
        </script>
       
    </body>

</html>