global variable for path
You can get the path using drupal default function drupal_get_path();

It return path to any module or theme from root of installation.

If i want to access path of any module e.g. mymodule

Then i just need to use,

$path = drupal_get_path('module','mymodule');   //path to module directory


If i want to access path of my theme e.g. mytheme

$path =  drupal_get_path('theme','mytheme');   //path to theme directory


Now you can make the path variable global..