﻿/* 	firstVisitPopup  - a jQuery Popup for first time visitor	version 1.0	required : jquery.fancybox, jquery.cookie		Philippe Ouellet*/
(function ($) {
	$.fn.extend({
		firstVisitPopup: function (options) {
			var defaults = {
				url: null,
				width: "75%",
				height: "75%",
				debug: false
			};
			options = $.extend(defaults, options);

			if ($.cookie("firstVisit") == null || options.debug) {
				$.cookie("firstVisit", 1, {expires:365});
				$.fancybox({
					href: options.url,
					type: "iframe",
					width: options.width,
					height: options.height
				});
			}

			return this;
		}
	});
})(jQuery);
