// make sure 5 flickr images per row

$(document).ready(function(){
  // Your code here...

	var flickr_div = $('#flickr');
  var img = $('#flickr li:first');
  var num_in_row = 5;

	// resize only if width is smaller than 5 images
  if (num_in_row * img.width() > flickr_div.width()) {

  	img_width = Math.floor(flickr_div.width() / num_in_row) - 4;
  	//console.log('wider ' + img_width);

		// set the widths of the images
  	$('#flickr li img').each(function(){
  		var i = $(this);
  		i.css('width', img_width);
  		i.css('height', img_width);
  	});
  }



});