/*------------------------------------------------------------------
[ Evident jQuery Library ]

Plug-in name:	printButton
Purpose:		Add a printbutton to your page
Usage:			
Version:		1.0
Last change:	04/02/08 (mb) []
Assigned to:	Marc Bruisten (mb)

--------------------------------------------------------------------*/

(function(jQuery){
	jQuery.fn.printButton = function(val) {
		
		var linkvalue = "print";
		if (val != undefined) linkvalue = val;
		
		var printlink =
			jQuery(document.createElement('div'))
			.addClass('printButton')
			.append(
				(jQuery(document.createElement('a'))
				.attr('href','javascript:void(0)')
				.attr('title','print deze pagina')
				.bind("mousedown", function(e){window.print();}))
				.append(jQuery(document.createTextNode(linkvalue)))
			)
		this.prepend(printlink)

	};
})(jQuery);
