// SCONTO :: fnc.js 
function moebelCarouInit(carousel) {
    jQuery('#moebel-next').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('#moebel-prev').bind('click', function() {
        carousel.prev();
        return false;
    });
}; 

function dekoCarouInit(carousel) {
    jQuery('#deko-next').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('#deko-prev').bind('click', function() {
        carousel.prev();
        return false;
    });
}; 
  


jQuery(document).ready(function() {
  
  jQuery("#moebel-carousel").jcarousel({
      initCallback: moebelCarouInit,
      buttonNextHTML: null,
      buttonPrevHTML: null
    });
  
  jQuery("#deko-carousel").jcarousel({
      initCallback: dekoCarouInit,
      buttonNextHTML: null,
      buttonPrevHTML: null
    });

    
    // fixing ie6 restrictions on dropdown menu
    function addhover() {
    	var navli,i;
    	navli = document.getElementById('menumain').getElementsByTagName('li');
    	for(i=0;i<navli.length;i++) {
    		navli[i].onmouseover=function(){hover(this,'hover');};
    		navli[i].onmouseout=function(){hover(this,'');};
    	}
    }
    function hover(o,sClass) {
    	if (o) {
    		o.className = sClass;
    	}
    }
    addhover();

    //jQuery(document).pngFix();

    jQuery(function(){
    	jQuery('a').attr('onfocus','if(this.blur)this.blur()');
    });


    // tooltips
    jQuery(function() {
    jQuery('#moebel-carousel a').tooltip({
    	track: true,
    	delay: 0,
    	showURL: false,
    	fixPNG: true
      });
      
    jQuery('#deko-carousel a').tooltip({
    	track: true,
    	delay: 0,
    	showURL: false,
    	fixPNG: true
      });      
    });

  });  
