jQuery(document).ready(function(){

      jQuery('#video_side_bar a,.home #submenu a').click(function (eve) {
          eve.preventDefault();
          var clip_id = jQuery(this).attr('rel');
          var href = jQuery(this).attr('href');
		  var name = jQuery(this).attr('name');
          if (clip_id) {
              
          jQuery('#video').html('<div id="holder-content"></div><object width="471" height="317"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=' + clip_id + '&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=' + clip_id + '&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="471" height="317"></embed></object>');
          } else {
          jQuery('#video').html('<div id="holder-content"></div><img src="'+ href + '" width="471" height="317" style="display: inline"/>');
          }
		  jQuery.get(url+"/get_show_info.php",{id: name},
		  function(data){
			jQuery('#holder-content').html(data);

			sIFR.replace(itaintrocketscience, {
					selector: "h4",
					css: [
						'.sIFR-root { font-size:11px; font-weight:normal; color:#87586b;leading: -9; }'
					],
					wmode: 'transparent',
				tuneWidth: 2
				});
			sIFR.replace(gender, {
				selector: "h3",
				css: [
					'.sIFR-root { font-size:30px;text-transform:lowercase; font-weight:normal; color:#333333; }',
				],
				wmode: 'transparent'
			});

		  });
      });

      if(document.location.hash){
        jQuery.get(url+"/get_show_media.php",{id: document.location.hash.substr(1)},
		  function(data){
			jQuery('#video').html(data);
          });

        jQuery.get(url+"/get_show_info.php",{id: document.location.hash.substr(1)},
		  function(data){
			jQuery('#holder-content').html(data);

			sIFR.replace(itaintrocketscience, {
					selector: "h4",
					css: [
						'.sIFR-root { font-size:11px; font-weight:normal; color:#87586b;leading: -9; }'
					],
					wmode: 'transparent',
				tuneWidth: 2
				});
			sIFR.replace(gender, {
				selector: "h3",
				css: [
					'.sIFR-root { font-size:30px;text-transform:lowercase; font-weight:normal; color:#333333; }',
				],
				wmode: 'transparent'
			});
          });
      }

});
