window.thumbnails = {};
															thumbnails[4909001] = clik.newPhoto({"id":4909001,"src":"Afternoon_at_the_Grand_Canyon_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"'Afternoon at the Canyon'","height":247});
															thumbnails[4909011] = clik.newPhoto({"id":4909011,"src":"Canyon_at_Mid_morming_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Canyon at Mid Morning","height":262});
															thumbnails[4909015] = clik.newPhoto({"id":4909015,"src":"Bright_angel_trail_head_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"'Bright Angel Trailhead'","height":243});
															thumbnails[4909020] = clik.newPhoto({"id":4909020,"src":"Canyon_Showers_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"'Canyon Showers'","height":64});
															thumbnails[6285198] = clik.newPhoto({"id":6285198,"src":"Feed_Store_Cabover_thumb.JPG","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":194});
															thumbnails[1763423] = clik.newPhoto({"id":1763423,"src":"West Maui Golden Hour_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_1763423.html","width":130,"caption":"\" West Maui Golden Hour\"","height":98});
															thumbnails[2505914] = clik.newPhoto({"id":2505914,"src":"Olowalu II_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_2505914.html","width":130,"caption":"'Olowalu 2 '","height":98});
															thumbnails[3141308] = clik.newPhoto({"id":3141308,"src":"'Kula, even cow's know it's special' resized4_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_3141308.html","width":130,"caption":"'Kula , Even Cows Know it's Special '","height":98});
															thumbnails[3151094] = clik.newPhoto({"id":3151094,"src":"Towering Eucalyptus_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_3151094.html","width":130,"caption":"'Towering Eucalyptus '","height":195});
															thumbnails[3151120] = clik.newPhoto({"id":3151120,"src":"Keanae Taro patchs_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_3151120.html","width":130,"caption":"'Keanae Taro Patches '","height":81});
															thumbnails[3155932] = clik.newPhoto({"id":3155932,"src":"Tractor_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_3155932.html","width":130,"caption":" Lower Kula farm 2 '","height":83});
															thumbnails[3291965] = clik.newPhoto({"id":3291965,"src":"The Line Up_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_3291965.html","width":130,"caption":"The Line Up","height":95});
															thumbnails[3785070] = clik.newPhoto({"id":3785070,"src":"Late_Day_Color_Play_thumb.jpg","galleries_id":26383,"server_id":1,"link":"photo_3785070.html","width":130,"caption":"\"Late Day color play","height":69});
															thumbnails[3785118] = clik.newPhoto({"id":3785118,"src":"Road_into_Ukumehame_Valley_thumb.jpg","galleries_id":26383,"server_id":1,"link":"photo_3785118.html","width":130,"caption":"\" Road into Ukumehame Valley'","height":89});
															thumbnails[4128242] = clik.newPhoto({"id":4128242,"src":"Up_Waipoli__rd_resized_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_4128242.html","width":130,"caption":"Up Waipoli Road","height":142});
															thumbnails[4512257] = clik.newPhoto({"id":4512257,"src":"Beach_at_Olowalu_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_4512257.html","width":130,"caption":"'Beach at Olowalu'","height":98});
															thumbnails[4512260] = clik.newPhoto({"id":4512260,"src":"Grand_Wailea_Beach_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_4512260.html","width":130,"caption":"'Grand Wailea Beach'","height":96});
															thumbnails[4912060] = clik.newPhoto({"id":4912060,"src":"Passing_Showers_Coupeville_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_4912060.html","width":130,"caption":"'Passing Showers, Coupeville'","height":198});
															thumbnails[4918451] = clik.newPhoto({"id":4918451,"src":"Quarter_Horse_Lane_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_4918451.html","width":130,"caption":"'Quarter Horse Lane'","height":79});
															thumbnails[5049660] = clik.newPhoto({"id":5049660,"src":"Maui_Palms_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_5049660.html","width":130,"caption":"'Maui Palms'","height":83});
															thumbnails[5049668] = clik.newPhoto({"id":5049668,"src":"Wailea_Fisherman_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_5049668.html","width":130,"caption":"' Grand Wailea Fisherman'","height":71});
															thumbnails[5049669] = clik.newPhoto({"id":5049669,"src":"Makawao_Gecko_thumb.jpg","galleries_id":26383,"server_id":1,"link":"photo_5049669.html","width":130,"caption":"'Makawao Gecko'","height":84});
															thumbnails[5334639] = clik.newPhoto({"id":5334639,"src":"View_from_Mamas_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_5334639.html","width":130,"caption":"View From Mama's","height":66});
															thumbnails[5334640] = clik.newPhoto({"id":5334640,"src":"Spot_Light_on_Puunene_Mill_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_5334640.html","width":130,"caption":"Spotlight on Puunene Mill","height":76});
															thumbnails[6180511] = clik.newPhoto({"id":6180511,"src":"Lahaina_Harbor_1_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_6180511.html","width":130,"caption":"Lahaina Harbor ","height":86});
															thumbnails[6285158] = clik.newPhoto({"id":6285158,"src":"A_Slce_of_Aloha_2_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_6285158.html","width":130,"caption":"A Slice of Aloha","height":316});
															thumbnails[6285166] = clik.newPhoto({"id":6285166,"src":"DSC02770_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285166.html","width":130,"caption":"","height":173});
															thumbnails[6285167] = clik.newPhoto({"id":6285167,"src":"DSC03682_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285167.html","width":130,"caption":"","height":89});
															thumbnails[6285169] = clik.newPhoto({"id":6285169,"src":"DSC03803_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285169.html","width":130,"caption":"","height":107});
															thumbnails[6285170] = clik.newPhoto({"id":6285170,"src":"DSC04078_thumb.JPG","galleries_id":26383,"server_id":1,"link":"photo_6285170.html","width":130,"caption":"","height":173});
															thumbnails[6285171] = clik.newPhoto({"id":6285171,"src":"DSC06209_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285171.html","width":130,"caption":"","height":55});
															thumbnails[6285173] = clik.newPhoto({"id":6285173,"src":"DSC07211_thumb.JPG","galleries_id":26383,"server_id":1,"link":"photo_6285173.html","width":130,"caption":"","height":224});
															thumbnails[6285175] = clik.newPhoto({"id":6285175,"src":"DSC07366_thumb.JPG","galleries_id":26383,"server_id":1,"link":"photo_6285175.html","width":130,"caption":"","height":132});
															thumbnails[6285178] = clik.newPhoto({"id":6285178,"src":"DSC08789_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285178.html","width":130,"caption":"","height":272});
															thumbnails[6285180] = clik.newPhoto({"id":6285180,"src":"DSC08823_thumb.JPG","galleries_id":26383,"server_id":1,"link":"photo_6285180.html","width":130,"caption":"","height":57});
															thumbnails[6285182] = clik.newPhoto({"id":6285182,"src":"Kula_Temple_thumb.jpg","galleries_id":26383,"server_id":1,"link":"photo_6285182.html","width":130,"caption":"","height":237});
															thumbnails[6285184] = clik.newPhoto({"id":6285184,"src":"Lahainas_Mountains_thumb.jpg","galleries_id":26383,"server_id":1,"link":"photo_6285184.html","width":130,"caption":"","height":103});
															thumbnails[6285185] = clik.newPhoto({"id":6285185,"src":"Making_a_splash_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_6285185.html","width":130,"caption":"","height":100});
															thumbnails[6285188] = clik.newPhoto({"id":6285188,"src":"North_shore_afternoon_thumb.jpg","galleries_id":26383,"server_id":1,"link":"photo_6285188.html","width":130,"caption":"","height":60});
															thumbnails[6285189] = clik.newPhoto({"id":6285189,"src":"Olinda_Road_Spring_Pasture_thumb.jpg","galleries_id":26383,"server_id":1,"link":"photo_6285189.html","width":130,"caption":"","height":98});
															thumbnails[6285190] = clik.newPhoto({"id":6285190,"src":"The_Last_Sugar_Mill_thumb.jpg","galleries_id":26383,"server_id":1,"link":"photo_6285190.html","width":130,"caption":"","height":94});
															thumbnails[6285192] = clik.newPhoto({"id":6285192,"src":"Wailea_Spear_Fisher_thumb.jpg","galleries_id":26383,"server_id":1,"link":"photo_6285192.html","width":130,"caption":"","height":93});
															thumbnails[6285193] = clik.newPhoto({"id":6285193,"src":"West_Maui_Mtns_from_Wailea_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285193.html","width":130,"caption":"","height":97});
															thumbnails[6285197] = clik.newPhoto({"id":6285197,"src":"DSC08320_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285197.html","width":130,"caption":"","height":173});
															thumbnails[6285200] = clik.newPhoto({"id":6285200,"src":"Lakeview_Farm_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285200.html","width":130,"caption":"","height":109});
															thumbnails[6285201] = clik.newPhoto({"id":6285201,"src":"Shugg_Rd_view_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285201.html","width":130,"caption":"","height":171});
															thumbnails[6285204] = clik.newPhoto({"id":6285204,"src":"Warm_Springs_Rd_Vineyard_Vineyard_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285204.html","width":130,"caption":"Warm Springs Road vineyard - Sonoma CA","height":127});
															thumbnails[6285207] = clik.newPhoto({"id":6285207,"src":"Wolfe_House_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285207.html","width":130,"caption":"","height":113});
															thumbnails[6285208] = clik.newPhoto({"id":6285208,"src":"DSC06651_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285208.html","width":130,"caption":"","height":90});
															thumbnails[6285210] = clik.newPhoto({"id":6285210,"src":"DSC08582_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285210.html","width":130,"caption":"","height":81});
															thumbnails[6285211] = clik.newPhoto({"id":6285211,"src":"Haleakala_Ranch__Shop_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_6285211.html","width":130,"caption":"","height":213});
															thumbnails[6285231] = clik.newPhoto({"id":6285231,"src":"Kaonoulu_Ranch_Misty_Day_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285231.html","width":130,"caption":"","height":98});
															thumbnails[6285232] = clik.newPhoto({"id":6285232,"src":"Long_Shadows_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285232.html","width":130,"caption":"","height":62});
															thumbnails[6285233] = clik.newPhoto({"id":6285233,"src":"Old_Maui_High_Classroom-1_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285233.html","width":130,"caption":"","height":99});
															thumbnails[6285234] = clik.newPhoto({"id":6285234,"src":"Painting_Relentless_Surf_thumb.JPG","galleries_id":26383,"server_id":1,"link":"photo_6285234.html","width":130,"caption":"","height":173});
															thumbnails[6285340] = clik.newPhoto({"id":6285340,"src":"DSC08309_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6285340.html","width":130,"caption":"Watmaugh Bridge -Sonoma CA","height":86});
															thumbnails[6429424] = clik.newPhoto({"id":6429424,"src":"Paniolo_Country_2_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_6429424.html","width":130,"caption":"' Paniolo Country'","height":107});
															thumbnails[6507875] = clik.newPhoto({"id":6507875,"src":"DSC00272_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6507875.html","width":130,"caption":"Maui No Ka Oi","height":86});
															thumbnails[6560650] = clik.newPhoto({"id":6560650,"src":"DSC00106_thumb.JPG","galleries_id":26383,"server_id":1,"link":"photo_6560650.html","width":130,"caption":"Alau island near Sunset","height":62});
															thumbnails[6560703] = clik.newPhoto({"id":6560703,"src":"DSC00070_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_6560703.html","width":130,"caption":"Olowalu Valley","height":98});
															thumbnails[6560716] = clik.newPhoto({"id":6560716,"src":"DSC09887_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6560716.html","width":130,"caption":"Bright Lights","height":97});
															thumbnails[6560763] = clik.newPhoto({"id":6560763,"src":"Puamana_thumb.jpg","galleries_id":26748,"server_id":1,"link":"photo_6560763.html","width":130,"caption":"Puamana","height":198});
															thumbnails[6830600] = clik.newPhoto({"id":6830600,"src":"DSC00733_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6830600.html","width":130,"caption":"Ulupalakua Pastures","height":84});
															thumbnails[6830602] = clik.newPhoto({"id":6830602,"src":"DSC01231_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6830602.html","width":130,"caption":"Pali Shoreline ","height":62});
															thumbnails[6830605] = clik.newPhoto({"id":6830605,"src":"DSC01292_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_6830605.html","width":130,"caption":"In the Shadow of Haleakala","height":71});
															thumbnails[7150592] = clik.newPhoto({"id":7150592,"src":"DSC01505_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_7150592.html","width":130,"caption":"Daybreak at Hana Harbor","height":74});
															thumbnails[7150595] = clik.newPhoto({"id":7150595,"src":"DSC00272_AE54C20B-24E8-5EC4-4FD3E514A30FDD14_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_7150595.html","width":130,"caption":"Kanaha Canoe 2","height":86});
															thumbnails[7150596] = clik.newPhoto({"id":7150596,"src":"DSC01467_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_7150596.html","width":130,"caption":"Kau'iki Head and Kaihalulu Bay","height":84});
															thumbnails[7181688] = clik.newPhoto({"id":7181688,"src":"DSC06327_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_7181688.html","width":130,"caption":"","height":59});
															thumbnails[7460137] = clik.newPhoto({"id":7460137,"src":"DSC06978_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_7460137.html","width":130,"caption":"Jimmy on the Roadside","height":89});
															thumbnails[7460142] = clik.newPhoto({"id":7460142,"src":"DSC07542_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_7460142.html","width":130,"caption":"Keokea Sunrise","height":55});
															thumbnails[7460144] = clik.newPhoto({"id":7460144,"src":"DSC07445_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_7460144.html","width":130,"caption":"Makawao Street Scene","height":173});
															thumbnails[7460149] = clik.newPhoto({"id":7460149,"src":"DSC06869_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_7460149.html","width":130,"caption":"Out of the Blue","height":98});
															thumbnails[7460243] = clik.newPhoto({"id":7460243,"src":"DSC00348_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_7460243.html","width":130,"caption":"Wailea Beach on Maui","height":133});
															thumbnails[7501166] = clik.newPhoto({"id":7501166,"src":"DSC07535_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_7501166.html","width":130,"caption":"Glow Time","height":107});
															thumbnails[7501175] = clik.newPhoto({"id":7501175,"src":"DSC07543_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_7501175.html","width":130,"caption":"Lahaina Last Light","height":108});
															thumbnails[7501179] = clik.newPhoto({"id":7501179,"src":"DSC07601_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_7501179.html","width":130,"caption":"Lahaina Morning","height":99});
															thumbnails[7501181] = clik.newPhoto({"id":7501181,"src":"DSC06841_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_7501181.html","width":130,"caption":"\"No One Can Stare at the Glare'","height":101});
															thumbnails[7501182] = clik.newPhoto({"id":7501182,"src":"DSC07538_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_7501182.html","width":130,"caption":"'Launiupoko Surfers'","height":98});
															thumbnails[7659268] = clik.newPhoto({"id":7659268,"src":"DSC08465_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_7659268.html","width":130,"caption":"Flat Bread-Paia","height":79});
															thumbnails[7786173] = clik.newPhoto({"id":7786173,"src":"IMGP0477_thumb.jpg","galleries_id":29181,"server_id":1,"link":"photo_7786173.html","width":130,"caption":"C&H Puunene","height":88});
															thumbnails[7786205] = clik.newPhoto({"id":7786205,"src":"DSC08539_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_7786205.html","width":130,"caption":"View of Lanai from Olowalu","height":92});
															thumbnails[7786231] = clik.newPhoto({"id":7786231,"src":"DSC09221_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_7786231.html","width":130,"caption":"View of Maui from Lanai","height":98});
															thumbnails[7786283] = clik.newPhoto({"id":7786283,"src":"DSC08570_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_7786283.html","width":130,"caption":"Ukumehame Sunset","height":95});
															thumbnails[7786290] = clik.newPhoto({"id":7786290,"src":"DSC08754_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_7786290.html","width":130,"caption":"Mill Building on Lahainaluna Road","height":101});
															thumbnails[7786340] = clik.newPhoto({"id":7786340,"src":"DSC09050-1_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_7786340.html","width":130,"caption":"Lanai City Plantation Home","height":100});
															thumbnails[8036262] = clik.newPhoto({"id":8036262,"src":"Marks_Indian_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8036262.html","width":130,"caption":" Tribe Ride","height":98});
															thumbnails[8111883] = clik.newPhoto({"id":8111883,"src":"End_of_the_Day_Upcountry_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8111883.html","width":130,"caption":"\" End of the Day Upcountry \"","height":180});
															thumbnails[8111887] = clik.newPhoto({"id":8111887,"src":"Kula_colors_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8111887.html","width":130,"caption":"\" Kula Colors\"","height":98});
															thumbnails[8111888] = clik.newPhoto({"id":8111888,"src":"Maalaea_Harbor_Boat_Ramp_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8111888.html","width":130,"caption":"\" Maalaea Harbor Boat Ramp\"","height":95});
															thumbnails[8111889] = clik.newPhoto({"id":8111889,"src":"Maui_Country_Club_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8111889.html","width":130,"caption":"Maui Country Club","height":87});
															thumbnails[8111891] = clik.newPhoto({"id":8111891,"src":"Old_Kula_Dairy_Silo_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8111891.html","width":130,"caption":"\" Old Kula Dairy Silo\"","height":82});
															thumbnails[8111893] = clik.newPhoto({"id":8111893,"src":"On_the_Slopes_of_Haleakala_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8111893.html","width":130,"caption":"\" On the Slopes of Haleakala\"","height":115});
															thumbnails[8111894] = clik.newPhoto({"id":8111894,"src":"OO_Farms_Morning_Chores_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8111894.html","width":130,"caption":"O'O Farms Morning Chores \"","height":118});
															thumbnails[8111895] = clik.newPhoto({"id":8111895,"src":"Piiholo_Ranch_View_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8111895.html","width":130,"caption":"\"Piiholo Ranch View\"","height":98});
															thumbnails[8111911] = clik.newPhoto({"id":8111911,"src":"Plantation_Course-_Hole_11_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8111911.html","width":130,"caption":"Plantation Course Hole # 11","height":119});
															thumbnails[8111912] = clik.newPhoto({"id":8111912,"src":"Plantation_Course-_Hole_12_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8111912.html","width":130,"caption":"Plantation Course Hole # 12","height":68});
															thumbnails[8111913] = clik.newPhoto({"id":8111913,"src":"Ulupalakua_Cows_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8111913.html","width":130,"caption":"\" Ulupalakua Cows\"","height":89});
															thumbnails[8111914] = clik.newPhoto({"id":8111914,"src":"Shed_behind_Ulupalakua_Store_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8111914.html","width":130,"caption":"\" Shed behind Ulupalakua Store\"","height":174});
															thumbnails[8111915] = clik.newPhoto({"id":8111915,"src":"Ulupalakua_Sunrise_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8111915.html","width":130,"caption":"\"Ulupalakua Sunrise\"","height":85});
															thumbnails[8112054] = clik.newPhoto({"id":8112054,"src":"IMGP0486_thumb.jpg","galleries_id":29181,"server_id":1,"link":"photo_8112054.html","width":130,"caption":"\" New Paint on the Old Ranch\"","height":64});
															thumbnails[8112063] = clik.newPhoto({"id":8112063,"src":"DSC01033_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8112063.html","width":130,"caption":"4th of July Quick Draw","height":103});
															thumbnails[8118788] = clik.newPhoto({"id":8118788,"src":"_IGP0520_thumb.jpg","galleries_id":29181,"server_id":1,"link":"photo_8118788.html","width":130,"caption":"\"Flight Path'","height":163});
															thumbnails[8118790] = clik.newPhoto({"id":8118790,"src":"DSC00057_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8118790.html","width":130,"caption":"\"Kula Sunset colors\"","height":119});
															thumbnails[8118792] = clik.newPhoto({"id":8118792,"src":"DSC09550_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8118792.html","width":130,"caption":"\"Kaho'olawe and Molokin from Ulupalakua\"","height":109});
															thumbnails[8142327] = clik.newPhoto({"id":8142327,"src":"DSC01199_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8142327.html","width":130,"caption":"My Kind of Bling","height":92});
															thumbnails[8409194] = clik.newPhoto({"id":8409194,"src":"_IGP0630_thumb.JPG","galleries_id":29181,"server_id":1,"link":"photo_8409194.html","width":130,"caption":"Summer Swell West Maui","height":64});
															thumbnails[8409195] = clik.newPhoto({"id":8409195,"src":"_IGP0633_thumb.jpg","galleries_id":29181,"server_id":1,"link":"photo_8409195.html","width":130,"caption":"West Maui Shore Break","height":86});
															thumbnails[8409198] = clik.newPhoto({"id":8409198,"src":"_IGP0637_edited-1_thumb.jpg","galleries_id":29181,"server_id":1,"link":"photo_8409198.html","width":130,"caption":"Makena","height":199});
															thumbnails[8793682] = clik.newPhoto({"id":8793682,"src":"DSC04173_thumb.JPG","galleries_id":462970,"server_id":1,"link":"photo_8793682.html","width":130,"caption":"Triptych - Hana Sunrise","height":150});
															thumbnails[8793683] = clik.newPhoto({"id":8793683,"src":"DSC04633_thumb.JPG","galleries_id":462970,"server_id":1,"link":"photo_8793683.html","width":130,"caption":"Triptych- Hana Sunrise","height":88});
															thumbnails[8793684] = clik.newPhoto({"id":8793684,"src":"DSC04634_thumb.JPG","galleries_id":462970,"server_id":1,"link":"photo_8793684.html","width":130,"caption":"Triptych- Hana Sunrise","height":152});
															thumbnails[8793685] = clik.newPhoto({"id":8793685,"src":"DSC04556-1_thumb.JPG","galleries_id":462970,"server_id":1,"link":"photo_8793685.html","width":130,"caption":"Black Sand Beach Wainapanapa","height":43});
															thumbnails[8793686] = clik.newPhoto({"id":8793686,"src":"DSC04635_thumb.JPG","galleries_id":462970,"server_id":1,"link":"photo_8793686.html","width":130,"caption":"Hana Waterfall","height":242});
															thumbnails[8793687] = clik.newPhoto({"id":8793687,"src":"DSC04637_thumb.JPG","galleries_id":462970,"server_id":1,"link":"photo_8793687.html","width":130,"caption":"Back side road to Hana","height":243});
															thumbnails[8793688] = clik.newPhoto({"id":8793688,"src":"DSC04639_thumb.JPG","galleries_id":462970,"server_id":1,"link":"photo_8793688.html","width":130,"caption":"East  Maui  Forest","height":51});
															thumbnails[8793689] = clik.newPhoto({"id":8793689,"src":"DSC04636_thumb.JPG","galleries_id":462970,"server_id":1,"link":"photo_8793689.html","width":130,"caption":"Hana Shoreline Fisherman","height":171});
															thumbnails[8860945] = clik.newPhoto({"id":8860945,"src":"DSC05186_thumb.JPG","galleries_id":26748,"server_id":1,"link":"photo_8860945.html","width":130,"caption":"Michael and Jimmy","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[29181] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Fresh off the Easel","link":"gallery_29181.html","maxRecords":0.0,"photoIDs":[6560703.0,7150592.0,7460144.0,7460149.0,7501175.0,7501179.0,7501182.0,7659268.0,7786173.0,7786205.0,7786231.0,7786283.0,7786290.0,7786340.0,8036262.0,8111883.0,8111887.0,8111888.0,8111889.0,8111891.0,8111893.0,8111894.0,8111895.0,8111911.0,8111912.0,8111913.0,8111914.0,8111915.0,8112054.0,8112063.0,8118788.0,8118790.0,8118792.0,8142327.0,8409194.0,8409195.0,8409198.0],"skipIndex":0,"section_code":"gallery","featured_images":8409195.0,"id":29181,"singleSection":false});				  						galleries[462970] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Hotel Hana Maui","link":"gallery_462970.html","maxRecords":0.0,"photoIDs":[8793682.0,8793683.0,8793684.0,8793685.0,8793686.0,8793687.0,8793688.0,8793689.0],"skipIndex":0,"section_code":"gallery","featured_images":"8793689,8793688,8793687,8793686,8793685,8793684,8793683,8793682","id":462970,"singleSection":false});				  						galleries[26748] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sold Works","link":"gallery_26748.html","maxRecords":0.0,"photoIDs":[1763423.0,2505914.0,3141308.0,3151094.0,3151120.0,3155932.0,3291965.0,4128242.0,4512257.0,4512260.0,4912060.0,4918451.0,5049660.0,5049668.0,5334639.0,5334640.0,6180511.0,6285158.0,6285166.0,6285167.0,6285169.0,6285171.0,6285178.0,6285185.0,6285193.0,6285197.0,6285200.0,6285201.0,6285204.0,6285207.0,6285208.0,6285210.0,6285211.0,6285231.0,6285232.0,6285233.0,6285340.0,6429424.0,6507875.0,6560716.0,6560763.0,6830600.0,6830602.0,6830605.0,7150595.0,7150596.0,7181688.0,7460137.0,7460142.0,7460243.0,7501166.0,7501181.0,8860945.0],"skipIndex":0,"section_code":"gallery","featured_images":"6285204,3155932,3151120,3141308,1763423","id":26748,"singleSection":false});				  						galleries[26383] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery 1","link":"gallery_26383.html","maxRecords":0.0,"photoIDs":[3785070.0,3785118.0,5049669.0,6285170.0,6285173.0,6285175.0,6285180.0,6285182.0,6285184.0,6285188.0,6285189.0,6285190.0,6285192.0,6285234.0,6560650.0],"skipIndex":0,"section_code":"gallery","featured_images":6285182.0,"id":26383,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[155944] = '8409198,8409195,8409194,8142327,8118792,8118790,8118788,8111888,7460149,7460144,7460142,7460137,6180511';
imageSets[246288] = '8793689,8793688,8793687,8793686,8793685,8793684,8793683,8793682';
imageSets[155946] = '6285166,6285158';
imageSets[1] = '8409198,8409195,8409194,8142327,8118792,8118790,8111888,8111883,6285193,6285184,6285171,3155932,3151120,3141308,1763423';
imageSets[2] = '8793689,8793688,8793687,8793686,8793685,8793684,8793683,8793682,8409195,6285204,6285182,4909001,3155932,3151120,3141308,1763423';
imageSets[3] = '8409198,8409194,7460149,7460144,7460142,7460137';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/mauiclem/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/mauiclem/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Michael E. Clements Artist: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

