﻿/*
if( window.clipboardData && clipboardData.setData )
{
	document.getElementById("d_clip_button").onclick = function() { 
	clipboardData.setData("Text", document.getElementById("hiddenLinks").innerHTML.replace(/<a[^>]*>/gi,'').replace(/<\/a[^>]*>/gi,'').replace(/<br[^>]*>/gi, '\r\n'));
	};
}
else
{
ZeroClipboard.setMoviePath( 'http://www.sinlesslinks.com/zeroclipboard/ZeroClipboard.swf' );
var clip = new ZeroClipboard.Client();



clip.setText( '' ); // will be set later on mouseDown
clip.setHandCursor( true );
clip.setCSSEffects( true );

clip.addEventListener( 'mouseDown', function(client) { 
		clip.setText( document.getElementById("hiddenLinks").innerHTML.replace(/<a[^>]*>/gi,'').replace(/<\/a[^>]*>/gi,'').replace(/<br[^>]*>/gi, '\r\n') );
		
		// alert("mouse down"); 
} );

clip.glue( "d_clip_button" );
}
*/

var tvEls,j,i,clip;
tvEls = getElementsByClass("copySeason");
j=0;
ZeroClipboard.setMoviePath( 'http://www.sinlesslinks.com/zeroclipboard/ZeroClipboard.swf' );
if(!(window.clipboardData && clipboardData.setData))
{
	clip = new ZeroClipboard.Client();
	clip.setHandCursor( true );
	clip.setCSSEffects( true );
}
for(i in tvEls)
{
	if( window.clipboardData && clipboardData.setData )
	{
		tvEls[i].onclick = function() { 
		clipboardData.setData("Text", document.getElementById("hiddenLinks"+this.id).innerHTML.replace(/<a[^>]*>/gi,'').replace(/<\/a[^>]*>/gi,'').replace(/<br[^>]*>/gi, '\r\n'));
		};
	}
	else
	{
		tvEls[i].onmouseover = function() { 
			clip.setText( document.getElementById("hiddenLinks"+this.id).innerHTML.replace(/<a[^>]*>/gi,'').replace(/<\/a[^>]*>/gi,'').replace(/<br[^>]*>/gi, '\r\n') );
			if (clip.div) {
				clip.receiveEvent('mouseout', null);
				clip.reposition(this);
			}
			else clip.glue(this);
			
			
			// gotta force these events due to the Flash movie
			// moving all around.  This insures the CSS effects
			// are properly updated.
			clip.receiveEvent('mouseover', null);
		};
	}
	j++;
}