$(document).ready(function ()   {
	
	$('#hp-tabs ul.tabs li a').click(function(){
		$('#hp-tabs ul.tabs li a').removeClass('active');
		$(this).addClass('active');
		var id=$(this).attr('href');
		$(id).siblings('div:visible').hide();
		$(id).show();
		
		return false;
	});
	$('#hp-tabs ul.tabs li a[href="'+location.hash+'"]').click();	

	
	$('#product-detail-tab').tabs();
	$('#social').append("<fb:like layout=\"button_count\" action=\"recommend\" font=\"arial\"></fb:like>");
	$(".akce-ico").each(function()	{
	   $(this).qtip({
			content: $(this).html(),
			show: 'mouseover',
			hide: 'mouseout',
			position: {
				type: 'absolute',
				target: 'mouse',
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
				}
			},
			style: {
				'background-color' : '#66a3d7',
				'color' : '#fff',
				border: {
					width: 2,
		            radius: 5,
		            color: '#fff'
		        },
				name: 'cream',
				padding: '0 10px',
				tip: true
			}
		});
   });
   if($('.detail_rating_text').length>0)	{
	   $('.detail_rating_text').hide();
	   $('.product-detail-rating').qtip({
			content: $('.detail_rating_text').html(),
			show: 'mouseover',
			hide: 'mouseout',
			position: {
				type: 'absolute',
				target: 'mouse',
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
				}
			},
			style: {
				'background-color' : '#66a3d7',
				'color' : '#fff',
				border: {
					width: 2,
			        radius: 5,
			        color: '#fff'
			    },
				name: 'cream',
				padding: '0 10px',
				tip: true
			}
		});   
   }  
});




