views_get_view_result in template.php? I want global variables using view results
The theme_preprocess() function is jused to preprocess EVERY SINGLE template. What you do by now: for EVERY SINGLE template you run a view (I am not sure if it gets chached during to a single page request - so it may be that you run the view a hundred times during one page request). This may hit your servers capabilities.

1.) It is bad practice to run any views in the theme layer. Please assure that on the theme level no data alteration or processing is done any more no matter if done in a preprocess function in template.php or - even worst - in a tpl-file.

2.) Please consider a better place where to add this information by views. Where exactly do you want to add the classes? Which element?