
var clientLoc = window.location.toString();
clientLoc = clientLoc.replace("http://", "");
var clientUrlParts = clientLoc.split("/");
var clientUrl = clientUrlParts[0];

if(clientUrl == 'www.yogastick.info'){

  
$(function() {

//dhtmlLoadScript('http://api.yogastick.info/js/jquery.lightbox-0.5.pack.js');

$('head').append("<link rel=\"stylesheet\" type=\"text/css\" href=\"http://yogastick.info/test/css/jquery.lightbox-0.5.css\" media=\"screen\" />");

	$('.yogastick-asana').each(
      function(i)
      {
		var asana_code = this.innerHTML;
		var link_html = '<a href="http://api.yogastick.info/asana_photo/'+asana_code+'" class="lightbox">';
			link_html += '<img src="http://api.yogastick.info/asana/'+asana_code+'" border="0">';
			link_html += '</a>';
		$(this).html('');
		$(this).append(link_html);
	  });
	

	$('.yogastick-vinyasa').each(
      function(i)
      {
	  
		var vinyasa_id = this.innerHTML;
		var element_id = vinyasa_id+'_'+i;
		$(this).attr('id', element_id);
		
		var link_html = '<script src="http://api.yogastick.info/vinyasa_widget.php?vid='+vinyasa_id+'&div='+element_id+'&max_w=400" language="JavaScript" type="text/JavaScript"></';
			link_html += 'script>';	
		$(this).html();
		$(this).append(link_html);		
	  });

	
	$("a[rel='*lightbox']").lightBox();
	$('area').lightBox(); // Select all links in object with gallery ID
	$('a.lightbox').lightBox(); // Select all links with lightbox class
});

} else {
	alert('Get Api Key for your domain');
}


   function dhtmlLoadScript(url)
   {
      var e = document.createElement("script");
	  e.src = url;
	  e.type="text/javascript";
	  document.getElementsByTagName("head")[0].appendChild(e);	  
   }
     function staticLoadScript(url)
   {
      document.write('<script src="', url, '" type="text/javascript"><\/script>');
   }    