/*
 * jQuery.BiggerLink v2.0.1
 * http://www.ollicle.com/eg/jquery/biggerlink/
 *
 * Copyright (c) 2009 Oliver Boermans
 * http://creativecommons.org/licenses/MIT/
 *
 * 2009-11-22 (22 Nov 2009)
*/ 
(function(a){a.fn.biggerlink=function(b){var c={biggerclass:"bl-bigger",hoverclass:"bl-hover",hoverclass2:"bl-hover2",clickableclass:"bl-hot",otherstriggermaster:true,follow:"auto"};if(b){a.extend(c,b)}a(this).filter(function(){return a("a",this).length>0}).addClass(c.clickableclass).css("cursor","pointer").each(function(g){var d=a(this).data("biggerlink",{hovered:false,focused:false,hovered2:false,focused2:false});var e={all:a("a",this),big:a(this),master:a("a:first",this).data("biggerlink",{status:"master"}).addClass(c.biggerclass),other:a("a",this).not(a("a:first",this)).data("biggerlink",{status:"other"})};a("a",this).andSelf().each(function(){var i=a.extend(a(this).data("biggerlink"),e);a(this).data("biggerlink",i)});var h=d.attr("title");var f=d.data("biggerlink").master.attr("title");if(f&&!h){d.attr("title",f)}d.mouseover(function(i){window.status=a(this).data("biggerlink").master.get(0).href;a(this).addClass(c.hoverclass);a(this).data("biggerlink").hovered=true}).mouseout(function(i){window.status="";if(!a(this).data("biggerlink").focused){a(this).removeClass(c.hoverclass)}a(this).data("biggerlink").hovered=false}).bind("click",function(i){if(!a(i.target).closest("a").length){a(this).data("biggerlink").master.trigger({type:"click",source:"biggerlink"});i.stopPropagation()}});e.all.bind("focus",function(){a(this).data("biggerlink").big.addClass(c.hoverclass);a(this).data("biggerlink").big.data("biggerlink").focused=true}).bind("blur",function(){if(!a(this).data("biggerlink").big.data("biggerlink").hovered){a(this).data("biggerlink").big.removeClass(c.hoverclass)}a(this).data("biggerlink").big.data("biggerlink").focused=false});e.master.bind("click",function(i){if(i.source=="biggerlink"){if(c.follow===true||c.follow=="auto"&&i.result!==false){window.location=a(this).attr("href")}else{i.stopPropagation()}}});if(c.otherstriggermaster){e.other.addClass(c.biggerclass).bind("click",function(i){a(this).data("biggerlink").master.trigger({type:"click",source:"biggerlink"});i.preventDefault();i.stopPropagation()})}else{e.other.bind("focus",function(){a(this).data("biggerlink").big.addClass(c.hoverclass2);a(this).data("biggerlink").big.data("biggerlink").focused2=true}).bind("blur",function(){if(!a(this).data("biggerlink").big.data("biggerlink").hovered2){a(this).data("biggerlink").big.removeClass(c.hoverclass2)}a(this).data("biggerlink").big.data("biggerlink").focused2=false}).bind("mouseover",function(i){a(this).data("biggerlink").big.addClass(c.hoverclass2);a(this).data("biggerlink").big.data("biggerlink").hovered2=true;i.stopPropagation()}).bind("mouseout",function(i){if(!a(this).data("biggerlink").big.data("biggerlink").focused2){a(this).data("biggerlink").big.removeClass(c.hoverclass2)}a(this).data("biggerlink").big.data("biggerlink").hovered2=false;i.stopPropagation()});if(!e.other.attr("title")){e.other.attr("title","")}}});return this}})(jQuery);

jQuery.noConflict();
jQuery(document).ready(function(){
  jQuery(".signin").click(function(e) {
                e.preventDefault();
                jQuery("fieldset#signin_menu").toggle();
                jQuery(".signin").toggleClass("menu-open");                
            });

            jQuery("fieldset#signin_menu").mouseup(function() {
                return false
            });
            jQuery(document).mouseup(function(e) {
                if(jQuery(e.target).parent("a.signin").length==0) {
                    jQuery(".signin").removeClass("menu-open");
                    jQuery("fieldset#signin_menu").hide();
                }
            });  
  
  jQuery("label:not('#tarifform label')").inFieldLabels();


  jQuery('.cond').hide();
 // toggles the slickbox on clicking the noted link
  jQuery('input[name="order[opt_duo_zustellung]"]').click(function() {
     jQuery('.entsorgung')[ this.checked ? "show" : "hide" ]();
  });
  jQuery('input[name="order[opt_nn_bar]"]').click(function() {
    jQuery('.value_nachname')[ this.checked ? "show" : "hide" ]();
    });
  //Big Links Produkte
  jQuery('#produkt .col_wrap div').biggerlink({hoverclass:"hover"});
  jQuery(".bl-hot, .bl-hot a").bind('click',function(){         
          jQuery(".clicked").removeClass("clicked");  
          jQuery(this).addClass("clicked");                                                                 
  });
  //Akkordeon
  

jQuery('#akk').bind('acc',function(){                        
              //jQuery('.akkcontent').hide();              
              //jQuery('.acc > h1').addClass('acc');              
              jQuery('.acc > h1:first').addClass('active').nextAll().show();                     
                });              
            jQuery('.acc').trigger('acc');
            jQuery('.acc > h1').click(function() {
                if( jQuery(this).nextAll().is(':hidden') ) { //If immediate next container is closed...
                  jQuery('.acc > h1').removeClass('active').nextAll().slideUp(); //Remove all "active" state and slide up the immediate next container
                  jQuery(this).toggleClass('active').nextAll().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
                }
                else if( jQuery(this).nextAll().is(':visible') ) { //If immediate next container is closed...
                  jQuery('.acc > h1').removeClass('active').nextAll().slideUp(); //Remove all "active" state and slide up the immediate next container
                  //jQuery(this).toggleClass('active').next().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
                }
                return false; //Prevent the browser jump to the link anchor
              });
jQuery('#content').bind('acc',function(){                        
              jQuery('.acc > h1').nextAll().hide();              
              //jQuery('.acc > h1').addClass('acc');              
              jQuery('.acc > h1:first').addClass('active').nextAll().show();                     
                });              
            jQuery('.acc').trigger('acc');
            jQuery('.acc > h1').click(function() {
                if( jQuery(this).nextAll().is(':hidden') ) { //If immediate next container is closed...
                  jQuery('.acc > h1').removeClass('active').nextAll().slideUp(); //Remove all "active" state and slide up the immediate next container
                  jQuery(this).addClass('active').nextAll().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
                }
                //else if( jQuery(this).siblings().is(':visible') ) { //If immediate next container is closed...
                //  jQuery('.acc > h1').removeClass('active').siblings().slideUp(); //Remove all "active" state and slide up the immediate next container
                  //jQuery(this).toggleClass('active').siblings().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
                //}
                return false; //Prevent the browser jump to the link anchor
              });
jQuery('.news-list-item').bind('acc',function(){                        
              jQuery('.news-list-item > h3').siblings().hide();              
              //jQuery('.acc > h1').addClass('acc');              
              //jQuery('.news-list-item > h3:first').addClass('active').siblings().show();                     
                });              
            jQuery('.news-list-item').trigger('acc');
            jQuery('.news-list-item > h3').click(function() {
                if( jQuery(this).next().is(':hidden') ) { //If immediate next container is closed...
                  jQuery('.news-list-item > h3').removeClass('active').siblings().slideUp(); //Remove all "active" state and slide up the immediate next container
                  jQuery(this).toggleClass('active').siblings().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
                }
                else if( jQuery(this).next().is(':visible') ) { //If immediate next container is closed...
                  jQuery('.news-list-item > h3').removeClass('active').siblings().slideUp(); //Remove all "active" state and slide up the immediate next container
                  //jQuery(this).toggleClass('active').siblings().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
                }
                return false; //Prevent the browser jump to the link anchor
              });  
            
  
});

