function loadStylesheet()
 {
     $theme_query_string = http_parse_query(groupon_build_theme_array());
     $groupon_widget_stylesheet = WP_PLUGIN_URL . '/groupon-widget/widget.css.php?' . $theme_query_string;
     wp_register_style('groupon_widget_styles', $groupon_widget_stylesheet, array(), "1.0");
     wp_enqueue_style('groupon_widget_styles');
     wp_enqueue_script('groupon_widget', WP_PLUGIN_URL . '/groupon-widget/javascripts/widget.js');
 }
 function http_parse_query($array = null, $convention = "%s")
 {
     if (!$array || count($array) == 0) {
         return '';
     }
     $query = '';
     foreach ($array as $key => $value) {
         if (is_array($value)) {
             $new_convention = sprintf($convention, $key) . '[%s]';
             $query .= http_parse_query($value, $new_convention);
         } else {
             $key = urlencode($key);
             $value = urlencode($value);
             $query .= sprintf($convention, $key) . "={$value}&";
         }
     }
     return $query;
 }
 function http_build_query($array = NULL, $convention = '%s')
 {
     if (count($array) == 0) {
         return '';
     } else {
         if (function_exists('http_build_query')) {
             $query = http_build_query($array);
         } else {
             $query = '';
             foreach ($array as $key => $value) {
                 if (is_array($value)) {
                     $new_convention = sprintf($convention, $key) . '[%s]';
                     $query .= http_parse_query($value, $new_convention);
                 } else {
                     $key = urlencode($key);
                     $value = urlencode($value);
                     $query .= sprintf($convention, $key) . "={$value}&";
                 }
             }
         }
         return $query;
     }
 }
 function _httpParseQuery($aParam, $sConvention = '%s')
 {
     $sQuery = '';
     if (!function_exists('http_build_query')) {
         foreach ($aParam as $sKey => $sValue) {
             if (!is_array($sValue)) {
                 $sKey = urlencode($sKey);
                 $sValue = urlencode($sValue);
                 $sQuery .= sprintf($sConvention, $sKey) . "={$sValue}&";
             } else {
                 $sQuery .= http_parse_query($sValue, sprintf($sConvention, $sKey) . '[%s]');
             }
         }
     } else {
         $sQuery = http_build_query($aParam);
     }
     return $sQuery;
 }