// JavaScript Document
(function($){

$.fn.centrarH = function(){

var element = this;

$(element).load(function(){

changeLeftPosition();

$(window).bind("resize", function(){
    changeLeftPosition();
});

function changeLeftPosition(){

    //var imageHeight = $(element).height();
    var imageWidth = $(element).width();
    var windowWidth = $(window).width();
	var x = (windowWidth - imageWidth) / 2;
    //var windowHeight = $(window).height();
    $(element).css({
        "position" : "absolute",
        "left" : x
        //"top" : windowHeight /2 - imageHeight / 2
    });
};
});

};

})(jQuery);
