jQuery.fn.pbcards = function(options){
    return this.each(function(){
        var defaults = {
				hoverColor:'#ddd'
            },
			that = $(this),
			singleHref = true,
			linkDestination = null,
			currentHref = null;

        options = $.extend(defaults,options);

		that.find('a').each(function(){
			var h = $(this).attr('href');
			if(currentHref){
				if(currentHref != h){
					singleHref = false;
				}
			}
			currentHref = h;
		});

		if(singleHref){
			linkDestination = currentHref;
			that.hover(
				function(){
					that.css({backgroundColor:options.hoverColor,cursor:'pointer'});
				},
				function(){
					that.removeAttr('style');
				}
			);
			that.click(function(){
				window.location.href = linkDestination;
			});
		}
	});
};
