$(document).ready(function() {  $('.faq_question').click(function() {    var was_active  = ($(this).hasClass('faq_question_active'));    $('.faq_question_active .faq_answer').slideToggle(250);    $('.faq_question_active').removeClass('faq_question_active');    if (was_active) return;    $('.faq_answer', this).slideToggle(250);    $(this).toggleClass('faq_question_active');  });  $('#startpage_teaser').click(function(){    $.scrollTo('#content');  });  // class="Call2Action Content_Button_ Solaranlage"  var c2aCounter  = new Object();  $('.Call2Action').each(function(){    if (typeof _gaq == 'undefined') return;    var cName = $(this).attr('class').substr($(this).attr('class').indexOf('Call2Action'));    var params  = cName.split(' ', 3);    var index = cName.indexOf(' ', cName.indexOf(' ') + 1);    params[2] = cName.substr(index + 1);    if (typeof c2aCounter[params[1]] == 'undefined')      c2aCounter[params[1]] = 1;    else      c2aCounter[params[1]]++;    var type  = params[1] + c2aCounter[params[1]];    var label = params[2];    $(this).click(function() {      _gaq.push(['_trackEvent', 'Call2Action', type, label]);    });  });  $('#call .email a').text("E-Mail");  $('.pngfix').pngfix();  if ( $('#productForm, #anbieterregistrierung').length ) {    $('#productForm form, #anbieterregistrierung form').validate({      errorContainer: '.errors',      errorLabelContainer: '.errors ul',      wrapper: 'span',      errorElement: 'span'    });    $('#productForm form').submit(function() {      if ($('#question_row_plz', this).length)        $('#question_row_plz input[type=text]').bind('change.check_plz', is_valid_zip).trigger('change');    });    $('#anbieterregistrierung form').submit(function(e){      if ($(this).valid()) {        $.post("/anbieter-werden/abschicken", $(this).serialize(), function(){          $('#anbieterregistrierung form').unbind().submit();        });        e.preventDefault();        return false;      }      e.preventDefault();    });  }  $('body.product #productpage .innercontent .text p').after('<div class="quickform"></div>');  $('.cycle').before('<div class="cycle-pager">').cycle({      fx:    'scrollHorz',      timeout: 5000,      speed:    500,      pager: '.cycle-pager',      pause: 1  });  $('a[href="#contactform"]').bind('click.contactform', function (e){                                                          $.scrollTo('#regform', 500, {offset: {top: -50}, onAfter: function(){                                                            $('#regform input[type="text"]:first').focus();                                                          }});                                                          e.preventDefault();                                                        });  $(".textwidget a[href^='http']").each(function(){    if ($(this).attr('rel').length) return;    $(this).attr('target','_blank').attr('rel', 'nofollow').css('cursor', 'default').css('text-decoration', 'none');  })});function is_valid_zip (input) {  if (!$(this).valid()) {    $(this).parents('#question_row_plz').addClass('row_error');  } else {    $(this).parents('#question_row_plz').removeClass('row_error');  }}
