$(document).ready(function(){
		// image rotator
		$('#rotator').cycle({ pager: '#Pager', fit: 1, speed: 1500 }).css('width','545px');
		$('#Pager').append('<div class="breaker"/>');
		$('#rotator div:first').fadeIn();
		//add youtube for iphone, everything else gets vimeo
		
		$('#TopContent .SingleCol').append('<object width="387" height="290"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="wmode" value="transparent" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8036802&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=8036802&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="387" height="290" wmode="transparent"></embed></object>');
		
		// end if statement for browser
		/* $('#Calendar').fullCalendar({
       		 events: 
			 $.fullCalendar.gcalFeed("http://www.google.com/calendar/feeds/2up3ms354su7djkphsjheo5blo@group.calendar.google.com/public/basic"),
			 eventClick: function(event) {
				// opens events in a popup window
				window.open(event.url, 'gcalevent', 'width=700,height=600');
				return false;
			},
			//height: 430
   		 });*/
		 // end calendar js
		 //$('#Gallery a').colorbox();
		 // ajax for the flickr photo set
		 var apiKey = '84a2dd0724ace8ff692d8dcdf94f5a7a';
		 var USER = '47141087@N03';
		 //console.log('http://api.flickr.com/services/rest/?method=flickr.people.getPublicPhotos&api_key='+ apiKey +'&user_id='+ USER+'&per_page=8&format=json&jsoncallback=?');

		$.getJSON('http://api.flickr.com/services/rest/?method=flickr.people.getPublicPhotos&api_key='+ apiKey +'&user_id='+ USER+'&per_page=8&format=json&jsoncallback=?', function(data){
																																												
						$.each(data.photos.photo, function(i,set){
							var photoSet = set.id;
							var photoSecret = set.secret;
							var photoFarm = set.farm;
							var photoTitle = set.title;
							var photoServer = set.server;
							//console.log("this one is " + photoSet + photoSecret + photoFarm + photoTitle);
							var photoUrl_thumbs = 'http://farm'+ photoFarm +'.static.flickr.com/'+ photoServer +'/'+ photoSet +'_'+ photoSecret +'_t.jpg';
							var photoUrl_Large = 'http://farm'+ photoFarm +'.static.flickr.com/'+ photoServer +'/'+ photoSet +'_'+ photoSecret +'.jpg';
							
							$('#Gallery').prepend('<a href="'+ photoUrl_Large +'" rel="hompageGallery" title="'+ photoTitle +'"><img src="'+ photoUrl_thumbs +'"/></a>');
						});
					//var Construct = 'http://farm{farm-id}.static.flickr.com/{server-id}/{id}_{secret}.jpg';
					$('#Gallery a').colorbox();
					});
																																														
																																													
																									
	});// JavaScript Document