/**
 * @author melvin
 */
$(function() {
	var msgs = new Object();
	//var offset = $(this).offset();
	
	var desiredTooltip;
	
	if ($.browser.webkit || $.browser.safari || $.browser.msie) {
		desiredTooltip = 'leftBottom';
		desiredTarget = 'bottomLeft';
	}
	else {
		desiredTooltip = 'topLeft';
		desiredTarget = 'bottomRight';
	}

	msgs = getMessages();
	$('a.free_auction_popup').qtip({
		content:'<h4>' + msgs['about_bid_for_free'] + '</h4>' +
				'<ul class="how_list">'+
					'<li class="no1">' + msgs['no_bids_used'] + '</li>'	+
					'<li class="no2">' + msgs['one_bid_per_3_mins'] + '</li>'	+
					'<li class="no3">' + msgs['accept_bid_once'] + '</li>' +
					'<li class="no4">' + msgs['pay_auction_price'] + '</li>' +
                    '<li class="no5">' + msgs['closing_time'] + '</li>' +
				'</ul>',
		position: {
			corner: {
				target: desiredTarget,
				tooltip: desiredTooltip
			}
		},
		style : {
			width: 250,
	     	padding: 2,
	      	background: '#c2e7f0',
	      	color: 'black',
	      	textAlign: 'left',
	      	border: {
	         	width: 7,
	         	radius: 5,
	         	color: '#c2e7f0'
	      	}
		},
		show: 'mouseover',
		hide: 'mouseout'
	});
	$('a.bid_agent_help').qtip({
		content:'<p><strong>' + msgs['bid_agent'] + '</strong> '+ msgs['agent_desc'] +'</p>'+
				'<p><strong>' + msgs['min_price'] + '</strong> '+msgs['min_price_desc']+'</p>'+
				'<p><strong>' + msgs['max_price'] + '</strong> ' + msgs['max_price_desc'] + '</p>'+
				'<p><strong>' + msgs['no_bids'] + '</strong> ' + msgs['bids_desc'] + '</p>',
		position: {
			corner: {
				target: 'topRight',
				tooltip: 'rightBottom'
			}
		},
		style : {
			width: 294,
	     	padding: 2,
	      	background: '#c2e7f0',
	      	color: 'black',
	      	textAlign: 'left',
	      	border: {
	         	width: 7,
	         	radius: 5,
	         	color: '#c2e7f0'
	      	}
		},
		show: 'mouseover',
		hide: 'mouseout'
	});
	$('a.cc_cvc').qtip({
		content:'<p>'+ msgs['control_number'] +'</p>' +
				'<img src="/themed/ziinga/img/cc_cvc.gif" />',
		position: {
			corner: {
				target: 'topRight',
				tooltip: 'rightBottom'
			}
		},
		style : {
			width: 280,
	     	padding: 2,
	      	background: '#c2e7f0',
	      	color: 'black',
	      	textAlign: 'left',
	      	border: {
	         	width: 7,
	         	radius: 5,
	         	color: '#c2e7f0'
	      	}
		},
		show: 'mouseover',
		hide: 'mouseout'
	});	
	
	/*READ MORE*/
	$('a.readmore_cj').qtip({
		content:'<p>' + msgs['terms_winners'] + '</p>' ,
		position: {
			corner: {
				target: 'topRight',
				tooltip: 'rightBottom'
			}
		},
		style : {
			width: 280,
	     	padding: 2,
	      	background: '#c2e7f0',
	      	color: 'black',
	      	textAlign: 'left',
	      	border: {
	         	width: 7,
	         	radius: 5,
	         	color: '#c2e7f0'
	      	}
		},
		show: 'mouseover',
		hide: 'mouseout'
	});	
});

/*
 * '<p><strong>Bid Agent</strong> is perfect for those who want to bid on products while they are not in front of their computer or who would like a little help bidding on multiple auctions.</p><p><strong>Minimun price:</strong> This is the minimum price you are willing to bid. Bid Agent will now start bidding until the product reaches this price.</p>' +
			'<p><strong>Maximum price:</strong> This is the maximum price you are willing to bid. Bid Agent will stop bidding once the product crosses this price.</p>'+
			'<p><strong>Bids:</strong> This is the maximum number of bids you are willing to use. If the maximum price is reached before all your bids are used, unused bids automotically go back to your account.</p>'
 * 
 */

