Copy & open script for couponsites (zeroclipboard)

Copy & open script for couponsites (zeroclipboard) simple method

HTML

<!DOCTYPE html>
<html>
    <head>
        <title>Page Title</title>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
        <script type="text/javascript" src="http://shopsheep.com/js/jquery.zclip.min.js"></script>
    </head>
    <body>
        <h1>Coupon</h1>
        <div>
            <a id="first" class="copy" href="http://gan.doubleclick.net/gan_click?lid=41000000035320131&pubid=21000000000358705">LIGHT3</a>
            <p>Save an Extra 15% off Lighting and Lamps with code:LIGHT3</p> 
            <p>Start date: 2011-03-29</p>
            <p>End date: 2011-03-30</p>
        </div>
        <div>
            <a id="second" class="copy" href="http://gan.doubleclick.net/gan_click?lid=41000000035272548&pubid=21000000000358705">3DAYSALE</a>
            <p>3-Days Online Only Exclusive Savings! EXTRA 5-10% off Almost Everything with 3DAYSALE</p> 
            <p>Start date: 2011-03-30</p>
            <p>End date: 2011-04-01</p>
        </div>
    </body>
</html>

JavaScript

$(function() {
    $('.copy').zclip({
        path: 'http://shopsheep.com/js/ZeroClipboard.swf',
        copy: $(this).text(),
        afterCopy: function() {
            window.open($(this).attr('href'));
        }
    });
});