diff --git a/lib/redmine/themes.rb b/lib/redmine/themes.rb
index d0c90e3..b35e0cd 100644
--- a/lib/redmine/themes.rb
+++ b/lib/redmine/themes.rb
@@ -35,12 +35,14 @@ module Redmine
   
     # Class used to represent a theme
     class Theme
-      attr_reader :name, :dir, :stylesheets
+      attr_reader :name, :dir, :stylesheets, :images, :javascripts
       
       def initialize(path)
         @dir = File.basename(path)
         @name = @dir.humanize
         @stylesheets = Dir.glob("#{path}/stylesheets/*.css").collect {|f| File.basename(f).gsub(/\.css$/, '')}
+        @javascripts = Dir.glob("#{path}/javascripts/*.js").collect {|f| File.basename(f).gsub(/\.js$/, '')}
+        @images      = Dir.glob("#{path}/images/*.*").collect {|f| File.basename(f)}
       end
       
       # Directory name used as the theme id
@@ -73,4 +75,30 @@ module ApplicationHelper
   def path_to_stylesheet(source)
     stylesheet_path source
   end
-end
+
+  def image_path(source)
+    @current_theme ||= Redmine::Themes.theme(Setting.ui_theme)
+    super((@current_theme && @current_theme.images.include?(source)) ?
+      "/themes/#{@current_theme.dir}/images/#{source}" : source)
+  end
+  
+  def path_to_image(source)
+    image_path source    
+  end
+  
+  def javascript_path(source)
+    @current_theme ||= Redmine::Themes.theme(Setting.ui_theme)
+    super((@current_theme && @current_theme.javascripts.include?(source)) ?
+      "/themes/#{@current_theme.dir}/javascripts/#{source}" : source)
+  end
+  
+  def path_to_javascript(source)
+    javascript_path source
+  end
+  
+  # or if we wanted to 'catch all' and allow the theme to have it's own version of anything in public
+  # we could have just have compute_public_path look in the theme first
+  # def compute_public_path(source, dir, ext = nil, include_host = true)
+  # end
+  
+end
\ No newline at end of file
