﻿// JScript File



$(document).ready(function(){
    
        
    
        
        try
        {
            $('img#tagline').css({left:$('div#home ul').offset().left + 324  + "px",top:$('div#home ul').offset().top + 216  + "px"});
        }
        catch(err){}
        
        if(edit && auth)
        {
            $('#ctl00_rotator_rotator').attr("class", "welcome-box overflow");        
        
            $('.editbutton').show();
   
            $('span.editbreaks').show();
        }
        else
        {
            $('#ctl00_rotator_rotator').attr("class", "welcome-box rotator");  
        
            $('.editbutton').hide();
               
            $('span.editbreaks').hide();
        }
    
        $('img#logoButton').click(function(){
            
            var tsTimeStamp= new Date().getTime();
            
            if(edit && auth)
            {
                $('#ctl00_rotator_rotator').attr("class", "welcome-box overflow");  
            
                $('.editbutton').hide();
   
                $('span.editbreaks').hide();
                
                $.get('/edit.ashx',{edit:false,time: tsTimeStamp},function(data){;});
            }
            else
            {
                $('#ctl00_rotator_rotator').attr("class", "welcome-box rotator"); 
            
                $('.editbutton').show();
               
                $('span.editbreaks').show();
                
                $.get('/edit.ashx',{edit:true,time: tsTimeStamp},function(data){;});
            }
            
            edit = !edit;
        });
        
        $('li.invoiceaddress').click(function(){
        
            $('div.addressViewer').load('/invoice.ashx?id=' + this.id);
         
        });
        
        
        try
        {
            $('.rotator').innerfade({ speed: 'slow', timeout: 7000, type: 'sequence', containerheight: '256px' });
        }
        catch(err){}
        
        /*
        $('img.thumb').click(function(){
        
            $('img#screenimage').attr('src','/img/screenshots/' + this.id + '.gif');
            
        });*/
}); 


