var switchStatus = false;

$(function(){
    Cufon.replace('#top > ul > li > a',{
        fontFamily: 'Frutiger LT Std'
    }); 
    Cufon.replace('#foot > ul > li > a',{
        fontFamily: 'Frutiger LT Std'
    }); 
    Cufon.replace('#links > #right > .linkshare > spam',{
        fontFamily: 'Frutiger LT Std'
    }); 
    Cufon.replace('#links > #right > .buy > a',{
        fontFamily: 'Frutiger LT Std'
    }); 
    //    Cufon.replace('.itembanner h1',{
    //        fontFamily: 'Frutiger LT Std'
    //    }); 
    Cufon.replace('div.title > span.title',{
        fontFamily: 'Frutiger LT Std'
    }); 
    Cufon.replace('div.title_number',{
        fontFamily: 'Frutiger LT Std'
    }); 
    Cufon.replace('h3.title',{
        fontFamily: 'Frutiger LT Std'
    }); 
    Cufon.now();
   
    $('.scroll-panel').jScrollPane();
   
    if($('#tabs')){
        $('#tabs > a').click(function(){
            if(!$(this).hasClass('active')){
                $('#tabs > a').removeClass('active');
                $(this).addClass('active');
                $('.tabs').hide();
                $($(this).attr('href')).show();
            }
            return false;
        }); 
    }
    if($('#error')){
        $('#error a.close').click(function(){
            $('#error').remove(); 
            return false;
        });
    }
}); 

function builderViewLightbulds(){
    $(function(){
        $('#switchlink').click(function(){
            if($(this).hasClass('active')){
                $(this).removeClass('active');
                $('#switchoff').show();
                $('#switchon').hide();
                $('#switchon').hide();
                $('#switch_text').removeClass('light');
                $('.tooltip').removeClass('light');
                switchStatus = false;
            } else {
                $(this).addClass('active');
                $('#switchoff').hide();
                $('#switchon').show();
                $('#switch_text').addClass('light');
                $('.tooltip').addClass('light');
                switchStatus = true;
            } 
            return false;
        });
        $("#graybox a.plus").tooltip({
	        onBeforeShow: function() {
		        if(switchStatus)
		        {
			         this.getTip().addClass('light');
		        }
		        else
		        {
			         this.getTip().removeClass('light');
		        }
	        }
	     });
    });
}
function builderViewHome(){
    $(function(){
        $("#graybox").scrollable({
            circular: true
        });
        $("#graybox > .items").css('left', -840);
    });
}


