$(document).ready(function(){
  	
	//FIX jquery 1.5 bug with IE9 beta:
	jQuery.support.noCloneEvent = !!window.addEventListener;
	
    // SERVICE PART SLIDE ANIMATION
    $("#luxSettings").click(function(event) { 
        event.preventDefault();
        $(".expand").toggle(); 
        $(".service-part").slideDown("fast"); 
        $('#username').focus();
    });
    $("#luxCloseSettings").click(function(event) { 
        event.preventDefault();
        $(".expand").toggle(); 
        $(".service-part").slideUp("fast"); 
    });
    
    // HORIZONTAL MENU CODE:
            $("ul.sf-menu").supersubs({ 
                minWidth:    12,   // minimum width of sub-menus in em units 
                maxWidth:    14,   // maximum width of sub-menus in em units 
                extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                                   // due to slight rounding differences and font-family 
            }).superfish({ delay: 400 });  
                             // call supersubs first, then superfish, so that subs are 
                             // not display:none when measuring. Call before initialising 
                             // containing tabs for same reason.                      
    $("a[rel='luxImage']").colorbox();
    
    // load tweet
    $.getJSON('http://api.twitter.com/1/statuses/user_timeline/@AZRAdoo.json?callback=?',function(tweet){ // get the tweets
        if (tweet[0] != null)
        {
            $("#luxlasttweet").html(tweet[0].text);    
        }
	});
});	
