jQuery(document).ready(function() {			
			jQuery("a.customzoom").fancybox({
				'autoScale'     	: false,
				'scrolling'			: 'no',
				'showCloseButton'	: true,	
				'overlayShow'		: false				
			});
            
            jQuery("a.popupcustomzoom").fancybox({
				'autoScale'     	: false,
				'scrolling'			: 'no',
				'showCloseButton'	: false,
                overlayOpacity		:	0.8,                
                overlayColor		:	'#2b2b2b',
                onComplete          : function(){                    
                    jQuery('#fancybox-outer').css('background','none');                    
                    jQuery("[id^=fancy-bg-]").remove();
                }
					
			});//for rounded corner in new popup
            
            jQuery("a.popupcustomzoom_missed_special").fancybox({
				'autoScale'     	: false,
				'scrolling'			: 'no',
                'removeOverflow'    : true,
				'showCloseButton'	: false,
                overlayOpacity		:	0.0,                
                overlayColor		:	'transparent',
                onComplete          : function(){                    
                    jQuery('#fancybox-outer').css('background','none');                    
                    jQuery("[id^=fancy-bg-]").remove();
                }
					
			});//for rounded corner in new popup
            
			if(jQuery('#openit').length>0)	
			{				
				jQuery('#openit').trigger('click');
				//setTimeout("closefancy();",10000);			
			}
			
			if(jQuery('#first_timepopup_button').length>0)	
			{				
				var firsttime_popup_cookie=getCookie('firsttime_popup_cookie');
				if (firsttime_popup_cookie!=null && firsttime_popup_cookie!="")
			  	{
			  		//do nothing;
			  	}
				else
				{
					setCookie('firsttime_popup_cookie',"already_done",365);					
				    jQuery('#first_timepopup_button').trigger('click');				//show popup
				}				
			}
		
	});
	
	
	function closefancy()
	{
		jQuery(document).ready(function() {		
			if(jQuery('#fancybox-close').length>0)
			{
				jQuery('#fancybox-close').trigger('click');			
			}
		});
	}
