function init() {
	
	/*
	 * WordPress friendly jQuery call
	 */
    jQuery(document).ready(function($) {
		
		/*
		 * Make ads open in new window
		 */
        $('.ad a').each(function() {
			
			$(this).attr('target', '_blank');
		});
		
		/*
		 * Auto open featured ad
		 */
		
		var cookieName = 'dontshowad';
	 	var cookieValue = 1;
		var cookieOptions = { path: '/', expires: 3 };	// Show ad every three days
		
        if (!$.cookie(cookieName)) {

			/*
			 * Show ad
			 */
           	$('#featured-ad-container .featured-ad-link:first').fancybox({ 
				'zoomSpeedIn'			:	300, 
				'zoomSpeedOut'			:	300, 
				'overlayShow'			:	true,
				'hideOnContentClick'	:	false,
				'frameWidth'			:	($(window).width() * 0.9),
				'frameHeight'			:	($(window).height() * 0.9)
			}).trigger('click');
			
			/*
			 * Set cookie
			 */
			$.cookie(cookieName, cookieValue, cookieOptions);
        }
		
		/*
		 * Fix PNG
		 */
		
		/*
		var fixPNG = function() {
			return $(#header).each(function () {
				var image = $(this).css('backgroundImage');

				if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) {
					image = RegExp.$1;
					$(this).css({
						'backgroundImage': 'none',
						'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=" + ($(this).css('backgroundRepeat') == 'no-repeat' ? 'crop' : 'scale') + ", src='" + image + "')"
					}).each(function () {
						var position = $(this).css('position');
						if (position != 'absolute' && position != 'relative')
							$(this).css('position', 'relative');
					});
				}
			});
		};
		*/
		
		/*
		$('#header').css({
			'backgroundImage': 'none',
			'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=" + ($('#header').css('backgroundRepeat') == 'no-repeat' ? 'crop' : 'scale') + ", src='" + $('#header').css('backgroundImage'); + "')"
		});
		*/
		
		$(document).pngFix();
    });
}

init();