diff --git a/colorbox_node.js b/colorbox_node.js
index 3b14519..c27da0b 100644
--- a/colorbox_node.js
+++ b/colorbox_node.js
@@ -40,6 +40,7 @@
 				parse.href = href;
 				// Lets add our colorbox link after the base path if necessary.
 				var base_path = Drupal.settings.basePath;
+				var path_prefix = Drupal.settings.pathPrefix;
 				var pathname = parse.pathname;
 
 				// Lets check to see if the pathname has a forward slash.
@@ -49,9 +50,9 @@
 				}
 				
 				if(base_path != '/') {
-					var link = pathname.replace(base_path, base_path + 'colorbox/') + parse.search;
+					var link = pathname.replace(base_path, base_path + path_prefix + 'colorbox/') + parse.search;
 				} else {
-					var link = base_path + 'colorbox' + pathname + parse.search;
+					var link = base_path + path_prefix + 'colorbox' + pathname;
 				}
 				
 				// Bind Ajax behaviors to all items showing the class.
