jQuery (document).ready(function(){


	jQuery(".Details:not(.FullDescription):not(.Hardware)").each(
		function(){
			jQuery(this).qtip({
				content: jQuery(jQuery(this).attr('details')),
				style: {color:"#737373",
				padding: "1px", 
				border: { 
					width: 3, 
					radius: 0,
					color:"#c0bfbf" 
				}, 
				width: { max: 350 } 
			},
			position : {
				corner: { target: "topLeft", tooltip: "bottomLeft" },
				adjust: { screen: true }
			}
		})
	});

	jQuery(".Details.Hardware").each(
		function(){
			jQuery(this).qtip({
				content: jQuery(jQuery(this).attr('details')),
					style: {color:"#737373",
					padding: "1px",
					lineHeight : "120%",
					backgroundColor:"#E7E7E7",
					border: { 
						width: 0, 
						radius: 0,
						color:"#c0bfbf" 
					}, 
					width: { max: 260 } ,
				classes: {
					tooltip: 'qtip-hardware'
				}
				},
			position : {
				corner: { target: 'topRight', tooltip: 'bottomRight' },
				adjust: { screen: true }
			},
			show: { when: {  /* event: 'click' */ } },
			hide: { when: {  /* event: 'unfocus' */ }, fixed: false },
			api: {
				beforeShow: function(){
					jQuery(this.elements.target).addClass('on');

				},
				onHide: function(){
					jQuery(this.elements.target).removeClass('on');
				}
			}
		})
	});

	jQuery('.FullDescription').each (function(){
		
			jQuery(this).qtip({
				content: jQuery(jQuery(this).attr('details')),
				style: {padding: "1px",
				backgroundColor:"#E7E7E7",
				width: 475 ,
				classes: {
					tooltip: 'qtip-details'
				},
				border: {
					width: 0,
					radius: 0,
					color:"#c0bfbf"
				}
			},
			position : {
				corner: {
					target: 'bottomRight',
					tooltip: 'topRight'
				}
			},
			show: { when: {  /* event: 'click' */ } },
			hide: { when: {  /* event: 'unfocus' */ }, fixed: false },

			api: {
				beforeShow: function(){
					jQuery(this.elements.target).addClass('on');

				},
				onHide: function(){
					jQuery(this.elements.target).removeClass('on');
				}
			}
		});
		
		
	});

	jQuery(".free").each(
		function(){
			var arrAmt = jQuery(this).text().split(".");
			var cents = arrAmt[1];
			var dollars = arrAmt[0];
			jQuery(this).addClass("clear").html("<span class='dollars'>"+dollars+"</span><span class='cents'>"+cents+"<br /><span class='month'>/mo.</span></span>");
		}
	);

	jQuery(".priceDisplay").each(
		function(){
			var arrAmt = jQuery(this).text().split(".");
			var cents = parseInt(arrAmt[1]);
			cents = cents ? cents : "00";
			var dollars = arrAmt[0];
			jQuery(this).html("<span class='dollars'>"+dollars+"</span><span class='cents'>"+cents+"</span>");
		}
	);
	

});

