j(function(){
    if (typeof j.flash != 'undefined' && true == j.flash.available) {
		ZeroClipboard.setMoviePath('/js/default/ZeroClipboard.swf');
		ZeroClipboard.setHint('<div class="codeOver disn">Click to Copy & Open Site</div>');

        clip = new ZeroClipboard.Client();
        clip.setHandCursor( true );

        j('a.couponcode, a.couponCode').mouseover(function(){
			var href = j(this).attr('href');
            clip.setText( this.innerHTML.replace(/\&amp;/g, "&") );
            if (clip.div) {
                clip.receiveEvent('mouseout', null);
                clip.reposition(this);
            } else {
                clip.glue(this);
            }
			clip.addEventListener('complete', function(client) { window.open (href);});
            clip.receiveEvent('mouseover', 	null);
        });   
    }
});

