/*
 * Favicon Plugin for jQuery 1.1.2
 *
 * Copyright(C) 2007 LEARNING RESOURCE LAB.
 * http://postal-search-apis-and-solutions.blogspot.com/
 *
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 */
(function($) {

  // favicon
  $.fn.favicon = function(url) {
    var self = this;
	var dir = url.split('/').splice(0, 3).join('/');
	  // http://example.com/foo.html -> http://example.com

    self.hide();
	self.attr('width', 16);
    self.attr('height', 16);
	self.attr('src', dir + '/favicon.ico');
	self.one('load', function() {
	  self.show();
	});

    return self;
  };

})(jQuery); // function($)
