$(document).ready(function(){
	// site tooltip
	$('a[title],img[title],input[title]').not('.template_item_photo, .pricing_versions_item_params_a, .pricing_modadd_item_content_a, .consultantbox').tooltip({ 
				track: true,
    				delay: 0,
  				showURL: false,
  				showBody: "---- ",
    				extraClass: "sitetooltip", 
    				fixPNG: true,
    				opacity: 1,
    				left: -120
   	});

	$('.template_item_photo').mouseover(function(){
		if($(this).find('.templatetooltipimage img').attr('src') == '') {
			$(this).find('.templatetooltipimage img').attr('src', $(this).find('.templatetooltipimage img').attr('srctmp'));
			$(this).find('.templatetooltipimage img').removeAttr('srctmp');
		}
	});

	// pricing tooltip
	$('.pricing_versions_item .params a, .pricing_modadd_item .content a').tooltip({ 
				     track: true,
    				     delay: 0,
  				     showURL: false,
  				     showBody: "---- ",
    				     extraClass: "pricing_tooltip",
    				     fixPNG: true,
    				     opacity: 1,
    				     left: -120,
				     bodyHandler: function(){
					     return $(this).find('div.tooltip_content').html();
				     }
	});

	// consultant tooltip
	$('.consultantbox').tooltip({ 
				     track: true,
    				     delay: 0,
  				     showURL: false,
  				     showBody: "---- ",
    				     extraClass: "consultanttooltip",
    				     fixPNG: true,
    				     opacity: 1,
    				     left: -120,
				     bodyHandler: function(){
					     return $(this).find('div.tooltip_content').html();
				     }
	});
});

$(window).load(function(){
	// template tooltip
	$('.template_item_photo').tooltip_tpl({ 
				          track: false,
    				          delay: 1000,
  				          showURL: false,
  				          showBody: "---- ",
    				          extraClass: "templatetooltip",
    				          fixPNG: true,
    				          opacity: 1,
    				          left: 50,
					  top: 0,
				          bodyHandler: function(){
					      return $(this).find('div.tooltip_content').html();
				          }
	});
});
