

/* home page gallery  */
    
   /* var max=($('.galleryCont').length);
    
    var width=max*500;
    if(max>1){
        var jGalleryRun=false;
        $('.galleryHolder').css({width:width+'px'});
        function rotate(){
                    
            $('.galleryHolder').animate({left:'-470px'},300,"swing",function(){
                    $(this).animate({left:'-500px'},600,'linear',function(){
                        var swap=$('.galleryHolder div:first-child').html();
                        $('.galleryHolder div:first-child').remove();
                        $('.galleryHolder').css('left','0px');
                        $('.galleryHolder').append('<div>'+swap+'</div>');
                        $('.galleryHolder div:last-child').addClass('galleryCont');    
                        
                    });
                    
            });
            
        }
        
        
        function timedCount(){
            jGalleryRun=true;
            rotate();
            t=setTimeout("timedCount()",5000);
        }     
        
        $(document).ready(function() {
            $('.galleryHolder').animate({dummy:1},3000,function(){
                timedCount();// initialize    
            });
        });
    }
                  */

                  
var max=($('.galleryCont').length);
    
    var width=max*500;
    if(max>1){
        var current=1,t,count=1,jGalleryRun=false;
        $('.galleryHolder').css({width:width+'px'});
        $('.paginationcon a').click(function(){
            
        
            var pos=$('.galleryHolder').position();
            var move=0;
            move=$(this).text()-current;
            
            if(move){
                $('.paginationcon a:nth-child('+(current)+')').removeClass("slct");
                $('.paginationcon a:nth-child('+$(this).text()+')').addClass("slct");
                count=$(this).text();
            }
            current=$(this).text();
            var distance=move*(-500);
            $('.galleryHolder').animate({left: pos.left+distance+'px'},300,function(){
                var jPos=$(this).position();
                var jExact=(current-1)*500;
                if(jPos.left!=jExact)$(this).css('left',"-"+jExact+'px');
            });
            
        });
        $('.paginationcon a:nth-child('+(7-current)+')').addClass("slct");
        
        function timedCount(){
            jGalleryRun=true;
            $('.paginationcon a:nth-child('+count+')').trigger('click');
            t=setTimeout("timedCount()",4000);
            count++;
            if(count>max)count=1;
        }     
        
        $('.paginationcon a').mousedown(function(){
                if(jGalleryRun){
                    clearTimeout(t);
                    jGalleryRun=false;
                }
                else timedCount();                 
                
                    
            });

        $(document).ready(function() {
            timedCount();// initialize
        });
    }

$('.catholder').mouseenter(function(){
    
    $('.catmenu').slideToggle('fast');
})

$('.catholder').mouseleave(function(){
    $('.catmenu').slideToggle('fast');    
});

var ob;
$('.avatar img').click(function(){
    $(this).css('border','1px solid #000');
    if(ob)ob.css('border','1px solid #F26522');
    ob=$(this);
});


$('.newsfb .facebook').attr('style','');
$('.cdcover .facebook').attr('style','');
$('.single .facebook').attr('style','float:none;');
$('.FBConnectButton_Simple').attr('style','font-size:11px;line-height:21px;');



 /*jQuery(function(){
            jQuery('form.rating').rating();
});*/



$('.music ul li a').tooltip({ 
    track: true, 
    delay: 0, 
    showURL: false, 
    opacity: 1, 
    fixPNG: true, 
    showBody: " - ", 
    extraClass: "pretty fancy", 
    top: -15, 
    left: 5 
}); 

$('.photoholder a').tooltip({ 
    track: true, 
    delay: 0, 
    showURL: false, 
    opacity: .5, 
    showBody: " - ", 
}); 





jQuery(document).ready(function($) {
  $('a[rel*=facebox]').facebox() 
})


       
 