// all tracking clicks
$(function() {

  /** global tracking **/

  // contact form
	$("a.enquiry-form").click(function() {
		_gaq.push(['_trackPageview', '/contact/']);
		_gaq.push(['_trackEvent', 'Contact Form – '+site_environment+' Site', 'Viewed']);
	});
  // salon finder
	$("a.salon-finder").click(function() {
		_gaq.push(['_trackPageview', '/salon-finder/']);
	});
  // social footer links
	$("div.social-links ul li a").click(function() {
		var social_link = $(this).parent().attr("class");
		_gaq.push(['_trackPageview', '/social/'+social_link+'/']);
	});
  // footer link (privacty/terms etc.)
	$("ul.footer-links li a").click(function() {
		var footer_link = $(this).attr("href");
		_gaq.push(['_trackPageview', footer_link]);
	});

  /** consumer site tracking **/

  // homepage brand pods
  $("ul.brand-menu.consumer-home li a").click(function() {
    _gaq.push(['_trackPageview', '/homepage-pod/'+ $(this).attr("href")]);
  });
  // homepage promo pods
  $(".consumer-home.related-brands .brand .button a").click(function() {
    _gaq.push(['_trackPageview', '/homepage-pod/'+ $(this).attr("href")]);
  });
  // brand homepage related brands
  $("#container.homepage .related-brands .brand a").click(function() {
    _gaq.push(['_trackPageview', brand_url + 'pod' + $(this).attr("href")]);
  });
  // brand homepage pods
  $(".pods-holder .pod a").click(function() {
    _gaq.push(['_trackPageview', brand_url + 'pod/' + $(this).attr("href")]);
  });

  /** training site tracking **/

  // homepage banner
	$("#flash-area a").click(function() {
		_gaq.push(['_trackPageview', '/homepage-banner'+ $(this).attr("href")]);
	});
  // homepage brand pods
  $("ul.training-brands li .brand a").click(function() {
    _gaq.push(['_trackPageview', '/homepage-pod' + $(this).attr("href")]);
  });
  // brand page email link
	$("a.brand-email-link").click(function() {
		var email_addr = $(this).html();
		_gaq.push(['_trackPageview', full_url+'/mailto/'+email_addr]);
	});
  // enquiry from link from brand page
	$("a.enquiry-form.brand-enquiry").click(function() {
		_gaq.push(['_trackPageview', full_url+'enquiry/popup/']);
	});
  // enquiry from link from brand page
	$(".training-course a.enquiry-form").click(function() {
		_gaq.push(['_trackPageview', full_url+'enquiry/popup/']);
	});
});

