/*
* 
* jquery div linker
* 
* easy make whole div clickable with just one <a> tag and no one SEO problem.
* more information here: http://plugins.jquery.com/project/divlinker
* 
* by leandro abdalla
* leandro.abdalla[at]gmail
* http://www.twitter.com/leabdalla
* http://www.facebook.com/leabdalla
* 
*/
(function($){
    $.fn.divlinker = function(){
        this.each(function(){
            var linkTag = $(this).find("a:first");
            if(linkTag.length == 1){
                $(linkTag).parent().css("position", "relative");
                $.fn.divlinker.drawSpacer(linkTag);
            }
        });
    };
    $.fn.divlinker.drawSpacer = function(linkTag){
        var spacer = $("<span id='divlinker'></span>").appendTo($(linkTag));
        spacer.css("position", "absolute");
        spacer.css("width", "100%");
        spacer.css("height", "100%");
        spacer.css("top", "0");
        spacer.css("left", "0");
        spacer.css("z-index", "10");
    };
})(jQuery);

