$(document).ready(function() {
	$("a#inline").fancybox({
		
		'zoomSpeedIn'			: 600,
		'zoomSpeedOut'			: 500,
		'padding'		        : 20,
		'frameWidth'            : 700,
		'frameHeight'           : 400,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack',
		'hideOnContentClick': false
	});
	$("a#inline_ref").fancybox({
		
		'zoomSpeedIn'			: 600,
		'zoomSpeedOut'			: 500,
		'padding'		        : 20,
		'frameWidth'            : 400,
		'frameHeight'           : 320,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack',
		'hideOnContentClick': false
	});
	$("a#inline_reference").fancybox({
		
		'zoomSpeedIn'			: 600,
		'zoomSpeedOut'			: 500,
		'padding'		        : 20,
		'frameWidth'            : 400,
		'frameHeight'           : 250,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack',
		'hideOnContentClick': false
	});
	$("a.inline").fancybox({
		
		'zoomSpeedIn'			: 600,
		'zoomSpeedOut'			: 500,
		'padding'		        : 20,
		'frameWidth'            : 700,
		'frameHeight'           : 400,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack',
				'hideOnContentClick': false
	});
	$("a.inline_gc").fancybox({
		
		'zoomSpeedIn'			: 600,
		'zoomSpeedOut'			: 500,
		'padding'		        : 20,
		'frameWidth'            : 600,
		'frameHeight'           : 200,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack',
				'hideOnContentClick': false
	});
	$("a.inline_membership").fancybox({
		
		'zoomSpeedIn'			: 600,
		'zoomSpeedOut'			: 500,
		'padding'		        : 20,
		'frameWidth'            : 700,
		'frameHeight'           : 650,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack',
				'hideOnContentClick': false
	});
	
	$("a.iframe").fancybox({
		'hideOnContentClick': false,
		'frameWidth': 920,
		'frameHeight':500
		
	});
	
	$("a.mailfriend").fancybox({
		'hideOnContentClick': false,
		'frameWidth': 320,
		'frameHeight':420
		
	});
	
	function handleTabSelect(event, tab) {
        if (tab.index == 0) {
		    // tab 1 selected
            $('img#imgTab1').attr({ src: "http://www.marrywell.org/layout/themes/mw/img/about_select.jpg" });
            $('img#imgTab2').attr({ src: "http://www.marrywell.org/layout/themes/mw/img/photos_nonselect.jpg" });
	    	$('img#imgTab3').attr({ src: "http://www.marrywell.org/layout/themes/mw/img/reference_nonselect.jpg" });

        }
        else if (tab.index == 1) {
            // tab 2 selected
            $('img#imgTab2').attr({ src: "http://www.marrywell.org/layout/themes/mw/img/photos_select.jpg" });
            $('img#imgTab1').attr({ src: "http://www.marrywell.org/layout/themes/mw/img/about_nonselect.jpg" });
	    	$('img#imgTab3').attr({ src: "http://www.marrywell.org/layout/themes/mw/img/reference_nonselect.jpg" });
        }
		else if(tab.index == 2) {
    		$('img#imgTab3').attr({ src: "http://www.marrywell.org/layout/themes/mw/img/reference_select.jpg" });
          $('img#imgTab1').attr({ src: "http://www.marrywell.org/layout/themes/mw/img/about_nonselect.jpg" });
		    $('img#imgTab2').attr({ src: "http://www.marrywell.org/layout/themes/mw/img/photos_nonselect.jpg" });
		}
     }
     
	 // Set Tab Constructor values & initialize tabs
     //$('#tabs').tabs({ selected: '0', fx: { opacity: 'toggle', duration: 'slow' }, select: handleTabSelect });
	 $('#tabs > ul').tabs({ fx: { opacity: 'toggle' }, select: handleTabSelect }); 

 

});
