diff --git a/galleria.module b/galleria.module
index 21fdfa9..53cac37 100644
--- a/galleria.module
+++ b/galleria.module
@@ -95,7 +95,7 @@ function galleria_field_formatter_view($entity_type, $entity, $field, $instance,
   
   if (count($items) > 0) {
     $element['#theme'] = 'galleria_container';
-    galleria_includes();
+    $element['#attached'] = galleria_includes();
   }
  
   foreach ($items as $delta => $item) {
@@ -130,13 +130,23 @@ function galleria_includes() {
     $path = drupal_get_path('module', 'galleria');
     
     // include files
-    drupal_add_css($path . '/galleria.container.css');
-    drupal_add_js($path . '/js/jquery.galleria.js');
-    drupal_add_js($path . '/js/themes/classic/galleria.classic.js');
-    drupal_add_js($path . '/js/galleria.load.js');
+    $js = $css = array();
+    $css[] = $path . '/galleria.container.css';
+    $js[] = $path . '/js/jquery.galleria.js';
+    $js[] = array(
+      'data' => array('galleria' => array( 'path' => $path )),
+      'type' => 'setting',
+      'scope' => JS_DEFAULT
+    );
+
+    $js[] = $path . '/js/galleria.load.js';
+    
     
     $included = TRUE;
+    return array('js' => $js, 'css' => $css);
   }
+  // Return an empty array if already included
+  return array();
 }
 
 /**
diff --git a/js/galleria.load.js b/js/galleria.load.js
index 1215623..bd5c0a5 100644
--- a/js/galleria.load.js
+++ b/js/galleria.load.js
@@ -15,6 +15,7 @@
 		    //min_scale_ratio: 1,
 		    show_info:true
 	    };
+			Galleria.loadTheme('/' + settings.galleria.path + '/js/themes/classic/galleria.classic.js');
 	    $('.galleria-content', context).galleria(opt);
     }
   }
