// JavaScript Document
$(function(){                
                              
                //assign your api key equal to a variable
           var apiKey = '2250bb886ea4bb254c8428a8eee5522c';
		   var icount = 0;
                
                //the initial json request to flickr
                //to get your latest public photos, use this request: http://api.flickr.com/services/rest/?&method=flickr.people.getPublicPhotos&api_key=' + apiKey + '&user_id=29096781@N02&per_page=15&page=2&format=json&jsoncallback=?
				$.getJSON('http://api.flickr.com/services/rest/?&method=flickr.people.getPublicPhotos&api_key=2250bb886ea4bb254c8428a8eee5522c&user_id=41865108@N08&format=json&jsoncallback=?',
                function(data){

                    //loop through the results with the following function
                    $.each(data.photos.photo, function(i,item){
                     if(icount<11) {
                        //build the url of the photo in order to link to it
                        var photoURL = 'http://farm' + item.farm + '.static.flickr.com/' + item.server + '/' + item.id + '_' + item.secret 
                        
                        //turn the photo id into a variable
                        var photoID = item.id;
                        
                                 
                           
                                
                            //create an imgCont string variable which will hold all the link location, title, author link, and author name into a text string
                            var imgCont = '<a href="'+photoURL+'.jpg" rel="shadowbox" class="sbx"><img id="flickrPic" src="'+ photoURL + '_m.jpg" height="44" onload="initi()" /></a>';
                            
                            //if there are tags associated with the image
                                                      
                            //append the 'imgCont' variable to the document
							
                        
						 $(imgCont).appendTo('#image-container');
						 icount++;
						}
						});
						  if(icount=11){
						 imgCont = '<a href="http://www.flickr.com/photos/41865108@N08/"><img src="morelnk.jpg" alt="Click for More Pics" height="44" /></a>';
						  $(imgCont).appendTo('#image-container');
						 
						  }
                        
                  });
                });
 
                //assign hover actions to each image
