$(document).ready(function() {
   // ganzen DIV anklickbar machen (Radio-Input)
   $('div[radioName][radioValue]').click(function(){
         $("input:radio[name="+$(this).attr('radioName')+"][value="+$(this).attr('radioValue')+"]").attr("checked","checked");
   }).mouseenter(function(){
         $(this).css({'cursor':'default'});
   });
   // ganzen DIV anklickbar machen (Checkbox-Input)
   $('div[checkboxName]').click(function(evt){
      var objTarget = $(evt.target);
      if(!objTarget.is("input[type='checkbox']")){
         if($("input:checkbox[name="+$(this).attr('checkboxName')+"]").attr("checked")==true)
            $("input:checkbox[name="+$(this).attr('checkboxName')+"]").attr("checked","");
         else
            $("input:checkbox[name="+$(this).attr('checkboxName')+"]").attr("checked","checked");
      }
   }).mouseenter(function(){
         $(this).css({'cursor':'default'});
   });
   
   
   /* ZIP-Datei download Tracken */
   $('a[href$=".zip"]').click(function(){
      _gaq.push(['_trackEvent', 'Download', 'Link zip-Datei', $(this).attr('href')]);
   });
   /* PDF-Datei download Tracken */
   $('a[href*=".pdf"]').click(function(){
      _gaq.push(['_trackEvent', 'Download', 'Link pdf-Datei', $(this).attr('href')]);
   });
   
   /* externe Links Tracken */
   $("a[href^='http://']:not([href*='http://www.tischkalender-shop.de']):not([href*='https://www.tischkalender-shop.de'])").click(function(){
      _gaq.push(['_trackEvent', 'externer Link', $(this).attr("href").replace("http://", "").replace("https://", "")+" (Klick)", document.URL.replace("http://", "").replace("https://", "")]);
   }); 
});
