/*!
 * BMIR Petrobank Colorbox Helper
 * Copyright (c) 2011 Bryan Mills Iradesso
 * Version: 1.1 (19-AUG-2011) 
 * Requires: jQuery v1.6.2 or later
 *
 *	This is a jquery plugin will take an image and convert it to the petrobank format for opening images via colorbox.. 	
 */

(function ($) {

    $.fn.ColorboxSetup = function (settings) {
	
		// ------	PLUGIN PARAMETERS   ------- 
        var _defaults = {  };
		//plugin parameters end --- Don't edit anything below this line.
		// --------------------------------------------------------------

		
        if (settings) $.extend(_defaults, settings);

        this.each(function () {           
            var $object = jQuery(this);			
			var imgSrc = $object.attr('src');			
			if(typeof $object.attr('title') !== "undefined"){	
				imgSrc = $object.attr('title');
			}
			$object.wrap('<a class="colorbox '+ $object.attr('class') +'" href="'+ imgSrc + '"/>');
			$object.removeAttr('class');
			$object.after('<span class="colorbox-indicator">Open Image</span>');
        });

        return this;

    };

})(jQuery);



