             db.feeds = Set<String>(feeds.map { $0.0.rawValue + ":" + $0.1.pattern })
             db.pages = Set<Int>(pages)
             db.style = style.rawValue
-            db.media = media
+			db.media = "\(id):\(media)"
 
             return db
         }

}

func ==(lhs: Advertisement, rhs: Advertisement) -> Bool {
	return lhs.administration == rhs.administration && lhs.media == rhs.media
}


	let pages: [Int]
	let style: Style
	let media: String

	private let id: Character
    
	init(administration: String, media: String, id: Character, feeds: FeedMask, pages: [Int], style: Style = .Page) {
        self.administration = administration
		self.feeds = feeds
		self.pages = pages
		self.style = style
		self.media = media
		self.id = id

		Advertisement.ads.insert(self)
    }
