//colorbox functionality code that opens spectrum of care and coverflow in a lightbox effect
$(document).ready(function(){
				$(".spectrum_of_care").colorbox({innerWidth:"95%", innerHeight:"95%", iframe:true, scrolling:false});
				$(".coverflow").colorbox({width:"852", height:"494", iframe:true, scrolling:false});			
				//embedd the logo scroller on the home page
				$("#flash-partners").jfe({ ver: "10,0,0", display: "both", timeout: 5000 });

				//javascript function to cross fade homepage images if flash was not detected
				//added for bug#533 on 5/19
				$('#nonflash-version').crossSlide({
					sleep: 2,
					fade: 1
				}, [
					{ src: '/assets/images/non-flash-images/Ross-Zafonte.jpg', href: '/Innovation-And-Leadership/Points-of-View/Continuum-Of-Care.aspx' },
					{ src: '/assets/images/non-flash-images/Tejal-Gandhi.jpg', href: '/Innovation-And-Leadership/Patient-Safety-Quality/Default.aspx ' },
                    { src: '/assets/images/non-flash-images/Dr-Stephanie-Moore.jpg', href: '/Innovation-And-Leadership/Technology/Connected-Cardiac-Care.aspx ' },
                    { src: '/assets/images/non-flash-images/Dr-Juan-Jaime-de-Zenotita.jpg', href: '/Community/Enhancing-Access/Building-Strong-Primary-Care.aspx ' }
                    //{ src: '/assets/images/non-flash-images/Amy-Belyea.jpg', href: 'http://stage-www.partners.org/About/Media/default.aspx' },
					//{ src: '/assets/images/non-flash-images/Andrea-Jackson-and-Ryan-Spencer.jpg', href: 'http://stage-www.partners.org/About/Media/default.aspx' },
					//{ src: '/assets/images/non-flash-images/Heidi-Rehm.jpg', href: 'http://stage-www.partners.org/About/Media/default.aspx' },					
				]);
				
                
                //replace cufon for all headers
				Cufon.replace('h2');
				Cufon.replace('h3');
				Cufon.replace('h4');
				Cufon.replace('h5');
				Cufon.replace('h6');

				//   Add the main flash file into the homepage
				//	 Adobe recommends that developers use SWFObject2 for Flash Player detection. 
				//   For more information see the SWFObject page at Google code (http://code.google.com/p/swfobject/).
				//   Information is also available on the Adobe Developer Connection Under "Detecting Flash Player versions and embedding SWF files with SWFObject 2".
				//   Set to minimum required Flash Player version or 0 for no version detection
				var swfVersionStr = "9.0.124";
				// xiSwfUrlStr can be used to define an express installer SWF. 
				var xiSwfUrlStr = "";
				var flashvars = {};
				var params = {};
				params.quality = "high";
				params.bgcolor = "#000000";
				params.play = "true";
				params.loop = "false";
				params.wmode = "opaque";
				params.scale = "showall";
				params.menu = "false";
				params.devicefont = "false";
				params.salign = "";
				params.allowscriptaccess = "sameDomain";
				params.base = "/assets/flash/video-slideshow";
				var attributes = {};
				attributes.id = "partnersvideo";
				attributes.name = "partnersvideo";
				attributes.align = "middle";
				swfobject.createCSS("html", "height:100%;");
				//swfobject.createCSS("body", "margin:0; padding:0; overflow:hidden; height:100%;");
				swfobject.createCSS("body", "margin:0; padding:0; height:100%; z-index:1;");
				swfobject.embedSWF(
	"/assets/flash/video-slideshow/partnersvideo.swf", "flashVideo",
	"960", "295",
	swfVersionStr, xiSwfUrlStr,
	flashvars, params, attributes);
			}); 
			
// function called from SWF when it wants to open a URL assoc to a known class. 
// passes an array where 0 is the (string) url and 1 is the (string) class name. 
    function swfOpenUrlWithClass(a)
        {
            var cssclass = $("." + a[1]);
            $(".scrollinglogo").colorbox({ innerWidth: "852", innerHeight: "494", href: a[0], iframe: true, scrolling: false });
            $(".scrollinglogo").click(); 
            //brightCove spectrum of care bug on homepage		
//            $('#main-content-col .middle-third').addClass('hide');
//            $('#main-content-col .middle-third').hide();
        }
        
//brightCove spectrum of care bug on homepage			
//$(document).ready(function(){
//    $('a.spectrum_of_care img').click(function(){
//    $('#main-content-col .middle-third').addClass('hide');
//    $('#main-content-col .middle-third').hide();
//    $("#Partners98257065900121382397").hide();
//    });

//    $('#cboxContent #cboxClose').click(function(){
//    $('#main-content-col .middle-third').removeClass('hide');
//    $('#main-content-col .middle-third').show();
//    $("#Partners98257065900121382397").show();
//    });       
//});

