 	// MARK: UICollectionViewDelegate
 	
 	override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
-		selectedIndexes.insert(indexPath.row)
+		if selectedIndexes.contains(indexPath.row) {
+			selectedIndexes.remove(indexPath.row)
+			navigationItem.rightBarButtonItem?.enabled = selectedIndexes.count > 0 ? true : false
+		}
+		else {
+			navigationItem.rightBarButtonItem?.enabled = true
+			selectedIndexes.insert(indexPath.row)
+		}
 		collectionView.reloadItemsAtIndexPaths([indexPath])
 	}
 	

			
			checkMarkView = CheckMarkView(frame: CGRectMake(cell.contentView.frame.size.width - 3 - 28, 3, 28, 28))
			checkMarkView.backgroundColor = UIColor.clearColor()
			cell.contentView.addSubview(checkMarkView)
		}
		else {

		collectionView?.backgroundColor = UIColor.whiteColor()
		collectionView?.registerClass(UICollectionViewCell.classForCoder(), forCellWithReuseIdentifier: reuseIdentifier)
		
		navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Done", style: UIBarButtonItemStyle.Done, target: self, action: "doneAction")
		navigationItem.rightBarButtonItem?.enabled = false
		
		let scale = UIScreen.mainScreen().scale;
		let cellSize = flowLayout.itemSize
		assetGridThumbnailSize = CGSizeMake(cellSize.width * scale, cellSize.height * scale);
