jQuery.noConflict();
jQuery(document).ready(function($) {    
  /* News Scrollable Startseite */
  $("div.scrollable").scrollable({         
    size: 3,         
    items: 'div#thumbs',           
    hoverClass: 'hover',
    loop: true,
    speed: 2000
  }).autoscroll({interval: 6000,autoplay: true}).circular(); 
  
	$('input[type=checkbox],input[type=radio]').prettyCheckboxes({
		checkboxWidth: 17, // The width of your custom checkbox
		checkboxHeight: 17, // The height of your custom checkbox
		className : 'prettyCheckbox', // The classname of your custom checkbox
		display: 'list' // The style you want it to be display (inline or list)
	}); 
	

  
  function calculateoptions() 
  {    
    var total = 0;
    
    jQuery('select').each(function () 
    {
      if(total == 0)
      {
        total = parseInt(total) + parseInt($(this).val());
      }
      else
      {
        total = parseInt(total) * parseInt($(this).val());
      }
    });
    
    $('#sum').html(total);
    $('#summe1').val(total);   
  }
  
  $('select').change
  (function () 
    {
      calculateoptions();
    }
  );
  
  calculateoptions();
  
  $(document).pngFix(); 
  
  $.getDocHeight = function(){
    var D = document;
    return Math.max(Math.max(D.body.scrollHeight,    D.documentElement.scrollHeight), Math.max(D.body.offsetHeight, D.documentElement.offsetHeight), Math.max(D.body.clientHeight, D.documentElement.clientHeight));
  };
 
  //alert(  );
  
  $('.testbg').css('height', $.getDocHeight());
  
  $('select#frackhemd').change
  (function () 
    {
      if($('select#frackhemd').val() == 'Nein' || $('select#frackhemd').val() == '-')
      {
        $('#frackhemd_preis').html('ab € 89,90');  
      }
      else if($('select#frackhemd').val() <= 46)
      {
        $('#frackhemd_preis').html('€ 89,90'); 
      }
      else
      {
        $('#frackhemd_preis').html('€ 99,90');   
      }
    }
  );
  
  $('select#frackweste').change
  (function () 
    {
      if($('select#frackweste').val() == 'Nein' || $('select#frackweste').val() == '-')
      {
        $('#frackweste_preis').html('ab € 69,90');  
      }
      else if($('select#frackweste').val() <= 58)
      {
        $('#frackweste_preis').html('€ 69,90'); 
      }
      else
      {
        $('#frackweste_preis').html('€ 79,90');   
      }
    }
  );
  
});
