/*
jquery.nm.iframedialog.js

Custom jquery plugin for vertical scrolling by Nevermore
Based on: jquery 1.4.2
*/

// Prepare selected elements for opening href in an iframe
$.fn.prepareIframeDialog = function() {
	return this.each(function() {
		var $iframeItem = $(this);
		$iframeItem.click(function(e) {
			e.preventDefault();
			var horizontalPadding = 0;
			var verticalPadding = 0;
	        $('<iframe frameborder="no" id="externalSite" src="' + this.href + '" />').dialog({
	            title: ($iframeItem.attr('title')) ? $iframeItem.attr('title') : 'Dialoog',
	            autoOpen: true,
	            width: 550,
	            height: 250,
	            modal: true,
	            resizable: false,
				autoResize: false
	        }).width(550 - horizontalPadding).height(250 - verticalPadding);
		});
	});
};
