function netlove_flash_popup(param) {
	
	jQuery.fancybox(
		{
		'href'			: param,
		'type' 			: 'iframe',
		'padding'		: 0,
		'overlayColor'	: '#000000',
		'overlayOpacity': 0.75,
		'width'			: 960,
		'height'		: 550,
		'hideOnContentClick': false
		}
	);

}

function init() {
	jQuery('#master_image img.hidden').removeClass('hidden');
}
window.onload = init; 

jQuery(document).ready(function(){
	jQuery('#carousel').jcarousel({
		scroll: 1
	});
	jQuery('.ngg-gallery-thumbnail a:first').addClass('active');
	jQuery('a[title],span[title]').qtip({
		style: {
			classes: 'ui-tooltip-shadow',
			tip: {
				corner: true,
				width: 18,
				height: 13,
				offset: 27
			}
		},
		position: {
			my: 'bottom right',
			at: 'top center'
		}
	});
	jQuery('#menu-item-25').each(function() {
		jQuery(this).qtip({
			style: {
				classes: 'ui-tooltip-shadow',
				tip: {
					corner: true,
					width: 18,
					height: 13,
					offset: 27
				}
			},
			hide: {
				delay: 300,
				event: 'unfocus mouseleave',
				fixed: true // Make sure we can interact with the qTip by setting it as fixed
			},
			content: jQuery(this).children('ul'),
			position: {
				 my: 'top left',
				 at: 'bottom center',
				 adjust: { x: -5 } // Make it overlap a little so we don't get flickering... may not be needed?
			}
		});
	});
	jQuery('.service_box').hover(function () {jQuery(this).addClass("hover");},function () {jQuery(this).removeClass("hover");});
	jQuery('.service_box').click(function() { window.location = jQuery('a',this).attr('href');});
	jQuery('.tag_icon').hover(function () {jQuery(this).addClass("hover");},function () {jQuery(this).removeClass("hover");});
	jQuery('.gal_img').click(function(event) {
		event.preventDefault();
		var link = jQuery(this).attr('href');
		jQuery('.ngg-gallery-thumbnail a').removeClass('active');
		jQuery(this).addClass('active');
		
		jQuery('#master_image img.active').addClass('last-active');
		
		jQuery('#master_image img[src="'+link+'"]').css({opacity: 0.0})
			.addClass('active')
			.animate({opacity: 1.0}, 300, function() {
            jQuery('#master_image img.last-active').removeClass('active last-active');
        });
		
		//jQuery('#master_image>img').fadeOut()
		//jQuery('#master_image>img').attr('src', link).fadeIn(); 
		//jQuery('#master_image>img').attr('src', link);
	});
});
