YAHOO.namespace("VIT");

YAHOO.VIT.Gallery = {
	/** Local Events **/
	Local: {
		name: "Local Events", folder: "local",
		list: [
			{ "image": "isofanna_pic1", "caption": "Attendees at the In Support of ANNA event at the Indo-American Community Center in Phoenix on September 2, 2011", "name": "Photograph: Picture courtesy of IAFA." },
			{ "image": "isofanna_pic2", "caption": "Attendees at the In Support of ANNA event at the Indo-American Community Center in Phoenix on September 2, 2011", "name": "Photograph: Picture courtesy of IAFA." },
			{ "image": "akshaypatragolf_1", "caption": "Akshay Patra Golf Tournament 2011", "name": "Photograph: Picture courtesy of IAFA." },
			{ "image": "akshaypatragolf_2", "caption": "Akshay Patra Golf Tournament 2011", "name": "Photograph: Picture courtesy of IAFA." },
			{ "image": "akshaypatragolf_3", "caption": "Akshay Patra Golf Tournament 2011", "name": "Photograph: Picture courtesy of IAFA. " },
			{ "image": "akshaypatragolf_4", "caption": "Akshay Patra Golf Tournament 2011", "name": "Photograph: Picture courtesy of IAFA." },
			{ "image": "relay251", "caption": " Thirty-eight students from New Vistas Center for Education participated in a Relay for Life to raise dollars for the American Cancer Society. They raised nearly six times their goal, which earned them a gold medal for Chandler team participants.", "name": "Photograph: Picture courtesy of New Vistas Center for Education" },
			{ "image": "relayforlife_1", "caption": " Thirty-eight students from New Vistas Center for Education participated in a Relay for Life to raise dollars for the American Cancer Society. They raised nearly six times their goal, which earned them a gold medal for Chandler team participants.", "name": "Photograph: Picture courtesy of New Vistas Center for Education" },
			{ "image": "kdance_1", "caption": " Kriti Dance&#39;s students performed at the Passport to Discovery in April 2011.", "name": "Photograph: Picture courtesy of Kriti Dance" },
			{ "image": "kdance_2", "caption": "Kriti Dance&#39;s students performed at the Passport to Discovery in April 2011.", "name": "Photograph: Picture courtesy of Kriti Dance" },
			{ "image": "ekta1", "caption": "Youngsters performed special cultural dances in celebration of Maha Shivratri at Ekta Mandir on March 2, 2011.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "ekta2", "caption": "Amarnath Cave at Ekta Mandir. Maha Shivratri on March 2, 2011.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "ekta3", "caption": "Abhishek to Main Shivling at Ekta Mandir on March 2, 2011.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "vsa1", "caption": "Attendees at the Shreenathji Temple of Phoenix Holi celebration took part in traditional folk dancing during the afternoon festivities.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "vsa2", "caption": "Attendees at the Shreenathji Temple of Phoenix Holi celebration enjoyed lunch after taking part in the various activities at the Mandir.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "iafa6", "caption": "Glimpse of the IAFA 2011 Mela.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "iafa1", "caption": "Glimpse of the IAFA 2011 Mela.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "iafa2", "caption": "Glimpse of the IAFA 2011 Mela.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "iafa3", "caption": "Glimpse of the IAFA 2011 Mela.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "iafa4", "caption": "Glimpse of the IAFA 2011 Mela.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "iafa5", "caption": "Glimpse of the IAFA 2011 Mela.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "iafa6", "caption": "Glimpse of the IAFA 2011 Mela.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "iafa7", "caption": "Glimpse of the IAFA 2011 Mela.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "kites-006", "caption": "People of all ages enjoyed flying their kites during the Uttrayan festival organized by IAFA, GCA, and BAPS.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "kites-009", "caption": "People of all ages enjoyed flying their kites during the Uttrayan festival organized by IAFA, GCA, and BAPS. ", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "kites014", "caption": "People of all ages enjoyed flying their kites during the Uttrayan festival organized by IAFA, GCA, and BAPS. ", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "kites040", "caption": "Attendees at the Kite Festival organized by IAFA, GCA, and BAPS, also had a chance to enjoy delicious food in between kite flying.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "kites060", "caption": "People of all ages enjoyed flying their kites during the Uttrayan festival organized by IAFA, GCA, and BAPS.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "Diwali2010-016", "caption": "Diwali Mela 2010 at Ekta Mandir, attended by thousands of devotees.", "name" : "Photograph: Picture courtesy of IAFA." },
			{ "image": "Diwali2010-017", "caption": "Diwali Mela 2010 at Ekta Mandir, attended by thousands of devotees.", "name" : "Photograph: Picture courtesy of IAFA." }
		]
	},
	
	/** Artwork by Arizona Artists **/
	Artwork: {
		name: "Artwork by Arizona Artists", folder: "artwork",
		list: [
			{ "image": "adrift" ,"caption": "Adrift, 12x48in, four panels, acrylic on canvas" ,"name": "Artist: JDG" },
			{ "image": "roughness-meets-class_ar" ,"caption": "AB - Roughness meets class" ,"name": "Artist: Aishwarya Ramachandran" },
			{ "image": "arr_jai-ho_ar" ,"caption": "ARR - Jai Ho" ,"name": "Artist: Aishwarya Ramachandran" },
			{ "image": "gandhi_symbol-of-nonviolence_ar" ,"caption": "Gandhi - symbol of nonviolence" ,"name": "Artist: Aishwarya Ramachandran" },
			{ "image": "kajol_sehra-sajake-rakhna-senorita_ar" ,"caption": "Kajol - sehra sajake rakhna senorita" ,"name": "Artist: Aishwarya Ramachandran" },
			{ "image": "kamal_a-cut-above-all_ar" ,"caption": "Kamal - A cut above all" ,"name": "Artist: Aishwarya Ramachandran" },
			{ "image": "ss_jdg" ,"caption": "Sunset Silhouette" ,"name": "Artist: JDG" },
			{ "image": "warliart1_mm" ,"caption": "Warli Art, an Acrylics on Canvas painting, 16\"x20\"" ,"name": "Artist: www.MeenakshiMatai.com" },
			{ "image": "warliart2_mm" ,"caption": "Warli Art, an Acrylics on Canvas painting, 24\"x30\"" ,"name": "Artist: www.MeenakshiMatai.com" },
			{ "image": "winterwhimsy_jdg", "caption": "Winter Whimsy, 16x12in, acrylic on canvas", "name": "Photographer: JDG"},
			{ "image": "cold-peaks_sb", "caption": "Cold Peaks, Oil on Canvas", "name": "Photographer: Shubhada Bendre"},
			{ "image": "untitled_sb", "caption": "Untitled, Oil on Canvas", "name": "Photographer: Shubhada Bendre"},
			{ "image": "firestorm", "caption": "Firestorm, 20x28in, Mixed media on canvas", "name": "Artist: Tulika Ladsariya" },
			{ "image": "untitled", "caption": "Untitled, 18x24in, Mixed media on canvas", "name": "Artist: Tulika Ladsariya" },
			{ "image": "vinesofmor", "caption": "Vines of Mor, 3x3ft, acrylic on canvas", "name": "Artist: JDG" },
			{ "image": "ommor", "caption": "Om Mor, 10x10in, acrylic on canvas", "name": "Artist: JDG" }
		]
	},
	
	/** Novice Photography **/
	Novice: {
		name: "Novice Photography", folder: "novice",
		list: [
			{ "image": "qutubminar_jdg", "caption": "Qutub Minar, Delhi, India", "name": "Photographer: JDG" },
			{ "image": "india2010_ang", "caption": "Shamlaji Mandir, Shamlaji, Gujarat, India", "name": "Photographer: Achal Gandhi" },
			{ "image": "aftm_wc", "caption": "Amer Fort. Located 11km from Jaipur in Amber. HDR photo (taken with 3 exposures) and stacked together for painting-like effect.. Adjusted in photoshop to bring out colors and lighting", "name": "Photographer: Weihua Chen" },
			{ "image": "aqm_wc", "caption": "At the Qutb Minar", "name": "Photographer: Weihua Chen" },
			{ "image": "siu_wc", "caption": "Sunset in Udaipur", "name": "Photographer: Weihua Chen" },
			{ "image": "lpu_wc", "caption": "Lake Palace in Udaipur", "name": "Photographer: Weihua Chen" },
			{ "image": "char_wc", "caption": "Choti Holi in Ajmer, Rajasthan", "name": "Photographer: Weihua Chen" },
			{ "image": "soas_wc", "caption": "My wife and I. Silhouette over a sunset.", "name": "Photographer: Weihua Chen" },
			{ "image": "elf_sp", "caption": "", "name": "Photographer: Swetha Patel" },
			{ "image": "s_sp", "caption": "", "name": "Photographer: Swetha Patel" },
			{ "image": "hol_sp", "caption": "", "name": "Photographer: Swetha Patel" },
			{ "image": "i_sp", "caption": "", "name": "Photographer: Swetha Patel" },
			{ "image": "ltbl_sp", "caption": "", "name": "Photographer: Swetha Patel" },
			{ "image": "h_jdg", "caption": "", "name": "Photographer: JDG" },
			{ "image": "g_ang", "caption": "", "name": "Photographer: Achal Gandhi" },
			{ "image": "t_ang", "caption": "Truth", "name": "Photographer: Achal Gandhi" },
			{ "image": "dl_jdg", "caption": "Dual Light", "name" : "Photographer: JDG" },
			{ "image": "hboc_ag", "caption": "Yaquina Bay Bridge, Newport, Oregon", "name" : "Photographer: Achal Gandhi" },
			{ "image": "oc_jdg", "caption": "Cresting Oregon Coast", "name" : "Photographer: JDG" },
			{ "image": "sg_jdg", "caption": "Seattle&#39;s Grey", "name" : "Photographer: JDG" },
			{ "image": "svtf_jdg", "caption": "Skagit Valley Tulip Festival 2009", "name" : "Photographer: JDG" },
			{ "image": "ba_pkv", "caption": "Beautiful Arizona", "name" : "Photographer: Pankaj Kumar Verma" },
			{ "image": "datp_pkv", "caption": "Day at the Park", "name" : "Photographer: Pankaj Kumar Verma" },
			{ "image": "ftm_pkv", "caption": "Framing the Moment", "name" : "Photographer: Pankaj Kumar Verma" },
			{ "image": "tvfml_pkv", "caption": "Tucson&#39;s view from Mt Lemmon", "name" : "Photographer: Pankaj Kumar Verma" },
			{ "image": "lb_map", "caption" : "Love blossoms", "name" : "Photographer: Mital Amit Patel" },
			{ "image": "i_map", "caption" : "Innocence", "name" : "Photographer: Mital Amit Patel" },
			{ "image": "ah_map", "caption" : "Amazing heights", "name" : "Photographer: Mital Amit Patel" },
			{ "image": "csb_pp", "caption" : "Conch shell, Bahamas December 2009", "name" : "Photographer: Poonam Patel" },
			{ "image": "gti_pp", "caption" : "Grand Turk Island, Turk & Caicos December 2009", "name" : "Photographer: Poonam Patel" }
		]
	},
	
	load: function(category) {
		var list = category.list;
		
		var html = "";
		html += "<ol id='carousel'>";
		for (var i = 0, j = list.length; i < j; i++) {
			html += "<li>";
			html += "<a href='" + category.folder + "/" + list[i].image + ".jpg" + "' rel='lightbox[" + category.folder +"]' title='" + list[i].caption + "<br/>" + list[i].name +"'>";
			html +=	"<img src='" + category.folder + "/" + list[i].image + "_thumb.jpg" + "' alt='' width='100' height='100' />";
			html += "</a>";
			html += "</li>";
		}
		html += "</ol>";
		YAHOO.util.Dom.get(category.folder).innerHTML = html;
		
		YAHOO.widget.Carousel.prototype.CONFIG.HORZ_MIN_WIDTH = 924;
		
		var carousel = new YAHOO.widget.Carousel(category.folder, {
			animation: { speed: 1.0 }, // set-up animation
			numVisible: [6,1] // specify number of columns and number of rows
		});
		carousel.render(); // get ready for rendering the widget
		carousel.show(); // display the widget
	},
	
	loadHome: function() {
		var list = null;
		var html = "";
		html += "<ol id='carousel'>";
		
		list = YAHOO.VIT.Gallery.Local.list;
		for (var i = 0, j = list.length; i < j; i++) {
			html += "<li>";
			html += "<a href='gallery/'>";
			html +=	"<img src='gallery/local/" + list[i].image + "_thumb.jpg" + "' alt='' width='100' height='100' />";
			html += "</a>";
			html += "</li>";
		}
		
		list = YAHOO.VIT.Gallery.Artwork.list;
		for (var i = 0, j = list.length; i < j; i++) {
			html += "<li>";
			html += "<a href='gallery/'>";
			html +=	"<img src='gallery/artwork/" + list[i].image + "_thumb.jpg" + "' alt='' width='100' height='100' />";
			html += "</a>";
			html += "</li>";
		}
		
		list = YAHOO.VIT.Gallery.Novice.list;
		for (var i = 0, j = list.length; i < j; i++) {
			html += "<li>";
			html += "<a href='gallery/'>";
			html +=	"<img src='gallery/novice/" + list[i].image + "_thumb.jpg" + "' alt='' width='100' height='100' />";
			html += "</a>";
			html += "</li>";
		}
		
		html += "</ol>";
		YAHOO.util.Dom.get("gallery-home").innerHTML = html;
		
		YAHOO.widget.Carousel.prototype.CONFIG.HORZ_MIN_WIDTH = 248;
		
		var carousel = new YAHOO.widget.Carousel("gallery-home", {
			autoPlayInterval: 3000,
			numVisible: [2,1],
			isCircular: true
		});
		carousel.render(); // get ready for rendering the widget
		carousel.show(); // display the widget
		carousel.startAutoPlay();
	}
}


