index.html 4.2 KB
<!DOCTYPE html>
    <head>
    
        <meta charset="utf-8">
        <title>HTML5 GSAP Ad</title>
        <meta name="ad.size" content="width=970,height=250">
        <script type="text/javascript">
            
            // IAB source: modified to allow link testing
            var clickTag = "http://westperthvillage.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>
        
        <style>
            
            body{
                margin: 0;
                padding: 0;
                width: 970px;
                height: 250px;
                line-height: 1.2;
                font-size: 27px;
                letter-spacing: 0;
                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: 970px;
                height: 250px;
                border: 1px solid black;
                background-color: black;/* #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;
            }
            .txt{
                position: absolute;
                left:65px;
                top:58px;
            }
            #txt1 {
                opacity: 0;
            }
            #txt2 {
            	left:975px;/* 314px */
            	top:96px;
            }
            #txt3 {
            	top:255px;/* 59px */
            }
            #txt4 {
            	top:275px;/* 100px */
            }
            
            #logo{
                position: absolute;
                right: 68px;/* 68px */
                top:125px;
            }
            
            
        </style>
    </head>
    
    <body>
        <a id="click-tag" href="javascript:window.open(window.clickTag)">
        <div id="border">
            <div id="img" class="img"><img src="assets/img.jpg" alt="img" width="970"></div>

            <img id="txt1" class="txt"  src="assets/txt1@2x.png" alt="Finding the right lawyer in Lambton County" width="488">
            <img id="txt2" class="txt"  src="assets/txt2@2x.png" alt="just got easier." width="488">
            <img id="txt3" class="txt"  src="assets/txt3@2x.png" alt="Siskinds – now in Sarnia." width="517">
            <img id="txt4" class="txt"  src="assets/txt4@2x.png" alt="siskinds.com  877.672.2121" width="517">
            
            <img id="logo" src="assets/logo@2x.png" alt="Siskinds The Law Firm" width="270">
        </div>
        </a>

    <!-- GREENSOCK-->
        <script src="assets/TweenMax.min.js"></script>
        
        <script>
            
            var tl = new TimelineMax({repeat:2, repeatDelay:0});
            var d=10;
            
            tl.to("#img", d, {top:-52 , ease:Linear.easeNone});// , ease:Linear.easeNone
            d=d*-1;
            
            tl.to("#txt1", .5, {opacity:1, ease:Power1.easeOut, delay:d+=.25});
            tl.to("#txt2", .5, {left:314, ease:Power1.easeOut, delay:d+=1});

            tl.to("#txt1", .5, {top:-100, ease:Power1.easeIn, delay:d+=2.4});
            tl.to("#txt2", .5, {top:-80, ease:Power1.easeIn, delay:d});

            tl.to("#txt3", .5, {top:59, ease:Power1.easeOut, delay:d+=.3});
            tl.to("#txt4", .5, {top:100, ease:Power1.easeOut, delay:d+=.2});
            
        	console.log( "time: " + tl.totalDuration() );
            
        
        </script>
       
    </body>

</html>