<script language="javascript" type="text/javascript">

var baseURL = window.location.hostname;


$(function() {
  $( "#tabs" ).tabs();
});
  
$(function() {
  $( "#tabs" ).tabs({
    ajaxOptions: {
      error: function( xhr, status, index, anchor ) {
        $( anchor.hash ).html(
          "Couldn't load this tab. We'll try to fix this as soon as possible. " +
          "If this wouldn't be a demo." );
      }
    }
  });
});

/*$(function() {

  $("ul.tabs").tabs("div.contentHTML > div", {effect: 'ajax'});

});
*/

/*
     $("ul.tabs").click(function(href) {

                //var input = { "count": 10000 };
                var input = {};
                var url = href;
                var data = JSON.stringify(input);

        alert(href);

                var option = {
                    type: "GET",
                    error: function(request, status, error) {
                        alert("error:" + request.responseText);
                    },
                    dataType: "jsonp",
                    contentType: "application/json",
                    success: function(data, status, XMLHttpRequest) {
                        if (data.d)
                            $("#contentHTML").text(data.d);
                        else
                            $("#contentHTML").text(data);

                    },
                    data: input,
                    url: url
                };

                $.ajax(option);
            });
*/


/* This function will execute upon successful page load */
function init() {

}


function goURI(b, a)
   {
     b = b.toString();
     if (!a && window.PageTransitions && PageTransitions.isInitialized())
        {PageTransitions.go(b);} 
     else if (window.location.href == b)
        {window.location.reload();} 
     else {window.location.href = b;}
   }


window.onload = init;

function toggleDiv(el) {

        var id = document.getElementById(el);
        var content = document.getElementById('content');

        if( id.style.display == "none" ) {
                id.style.display = "block";
                /*content.style.width = "75%";
                content.style.padding = "5px";
                */
                $("#content").removeClass('contentFullView');

        } else {

                id.style.display = "none";

                $("#content").addClass('contentFullView');

                /*content.style.width = "98%";
                content.style.padding = "0px";
                */
        }


  }

  function displayNavigationMenu(el) {
        var id = document.getElementById(el);

        if( id.style.display == "none" ) {
                id.style.display = "block";
        } else {
                id.style.display = "none";
        }

  }

  function end() {
  alert( "5 seconds later?");
  }

  // Popup window code
  function newPopup(url) {
        popupWindow = window.open(
                url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
  }

  </script>

