$(document).ready(function(){
    if(theme.OnlineList){
        if(theme.OnlineList.BackgroundType=='Image'){
         var image = 'url('+theme.OnlineList.BackgroundImage.Url+')'
          $('#onlinelist').css('background-image',image)
          $('#onlinelist').css('background-repeat',theme.OnlineList.BackgroundRepeat)
        }
        if(theme.OnlineList.BackgroundType=='Color'){
           
             $('#onlinelist').css('background-color',theme.OnlineList.BackgroundColor)
             $('#onlinelist').css('background-repeat',theme.OnlineList.BackgroundRepeat)
        }
     }
    if(theme.ChatRoom){
        if(theme.ChatRoom.BackgroundType=='Image'){
         var image = 'url('+theme.ChatRoom.BackgroundImage.Url+')'
          $('#body').css('background-image',image)
          $('#body').css('background-repeat',theme.ChatRoom.BackgroundRepeat)
        }
        if(theme.ChatRoom.BackgroundType=='Color'){
           
             $('#body').css('background-color',theme.ChatRoom.BackgroundColor)
             $('#body').css('background-repeat',theme.ChatRoom.BackgroundRepeat)
        }
     }
     if(theme.Room){
        if(theme.Room.BackgroundType=='Image'){
         var image = 'url('+theme.Room.BackgroundImage.Url+')'
          $('#Room').css('background-image',image)
          $('#Room').css('background-repeat',theme.Room.BackgroundRepeat)
        }
        if(theme.Room.BackgroundType=='Color'){
           
             $('#Room').css('background-color',theme.Room.BackgroundColor)
             $('#Room').css('background-repeat',theme.Room.BackgroundRepeat)
        }
     }

     if(theme.Public){
        if(theme.ChatRoom.BackgroundType=='Image'){
         var image = 'url('+theme.Public.BackgroundImage.Url+')'
          $('#chatinhalt').css('background-image',image)
          $('#chatinhalt').css('background-repeat',theme.ChatRoom.BackgroundRepeat)
        }
        if(theme.Public.BackgroundType=='Color'){
           
             $('#chatinhalt').css('background-color',theme.Public.BackgroundColor)
             $('#chatinhalt').css('background-repeat',theme.Public.BackgroundRepeat)
        }
     }
     if(theme.SendBox){
        if(theme.SendBox.BackgroundType=='Image'){
         var image = 'url('+theme.SendBox.BackgroundImage.Url+')'
          $('#form').css('background-image',image)
          $('#form').css('background-repeat',theme.SendBox.BackgroundRepeat)
        }
        if(theme.OnlineList.BackgroundType=='Color'){
             $('#form').css('background-color',theme.SendBox.BackgroundColor)
             $('#form').css('background-repeat',theme.SendBox.BackgroundRepeat)
        }
     }
     if(theme.LinkBox){
             $('#linkdooni').css('background-color',theme.LinkBox.BackgroundColor)
             $('#linkdooni').css('background-repeat',theme.LinkBox.BackgroundRepeat)    
     }

     if(theme.Icons.SendBox){
        $('#link_sagen').attr('src',theme.Icons.SendBox.Send.Url)
        $('#link_smileys').attr('src',theme.Icons.SendBox.Smiles.Url)
        $('#link_color').attr('src',theme.Icons.SendBox.Font.Url)
        $('#link_prop').attr('src',theme.Icons.SendBox.Setting.Url)
        $('#link_vip').attr('src',theme.Icons.SendBox.Vip.Url)
        $('#link_ranks').attr('src',theme.Icons.SendBox.Score.Url)
        $('#link_voice').attr('src',theme.Icons.SendBox.Voice.Url)
        $('#link_eraser').attr('src',theme.Icons.SendBox.Eraser.Url)
        $('#link_admin').attr('src',theme.Icons.SendBox.Panel.Url)
        $('#link_offlinemsg').attr('src',theme.Icons.SendBox.Offline.Url)
        $('#link_logout').attr('src',theme.Icons.SendBox.Close.Url)

     }



         
            
  
                    
          



})