/*
	Author: Jesse Thompson
	Date: February 23rd 2010
	Version: .1
	
	Supported list item attributes
	------------------------------
	data-value="0"					- fills INPUT field value, used to determine default value
	data-disabled="true"			- changes hover state (disables by default), removes click functionality
	data-href="/special-offers/"	- adds a linkout
	data-linktarget="_blank"		- sets a target for the linkout
*/

(function($){
		$.fn.pullQuote = function(list,options) {   
		var defaults = {
		};
		
		return this.each(function() {
			obj = $(this);
			var copy = $(".QuoteBody",this).text();
			var src = $(".QuoteSource",this).text();
			var size = $(".QuoteBody",this).css("font-size");
			var size2 = $(".QuoteSource",this).css("font-size");
			
			
			var str = "<img src='/images/quote_decor.jpg' style='float:left;' />";
				str += "<hr style='margin-top:2px;margin-bottom:2px;border-color:#b6a485'/>";
				if(src == "") {
					str += "<p class='quotecpy' style='font-size:"+size+";padding-top:5px;#311f0a;text-align:right;margin-top:15px;margin-bottom:0px'>"+copy+"</p>";
				} else {
					str += "<p class='quotecpy' style='font-size:"+size+";padding-top:5px;#311f0a;text-align:right;margin-top:0px;margin-bottom:0px'>"+copy+"</p>";
				}
				str += "<div style='clear:right;'></div>";
				if(src != "")
					str += "<p class='quotesrc' style='font-size:"+size2+"color:#4e3402;text-align:right;margin-top:5px;margin-bottom:0px'>-"+src+"</p>";
				str += "<div style='clear:left;'></div>";
				str += "<hr style='margin-top:2px;margin-bottom:2px;border-color:#b6a485'/>";
			
			obj.empty();
			obj.html(str);
			Cufon.replace('.quotecpy',{fontFamily:"BaliHai",fontStyle:"italic"});
			Cufon.replace('.quotesrc',{fontFamily:"BaliHai"});
		});
};
})(jQuery);
