          $(function() {

                // initialize tabs
                $('#PromoContent').tabs({fxFade: true});

                // set up constant rotation
                (function() {
                    // rotation interval
                    var t = 0;
                    var tabs = $('li', '#PromoContent').size();
                    var rotation = setInterval(function() {
                        t = ++t <= tabs ? t : 1;
                        $('#PromoContent').triggerTab(t);
                    }, 20000);
                    // stop rotation on tab click
                    $('#PromoContent>ul:eq(0)>li>a').click(function(e) {
                        if (e.clientX && rotation) { // true mouse click ocurred
                            clearInterval(rotation);
                            rotation = null;
                        }
                    });
                })();
            });
  $(document).ready(function(){
    $("#tabs").tabs();

	$("#tabs").bind('tabsselect', function(event, ui) {
		document.location='#'+(ui.index+1);
	});
if(document.location.hash!='') {
        //get the index from URL hash
      	tabSelect = document.location.hash.substr(1,document.location.hash.length);
	$("#tabs").tabs('select',tabSelect-1);
}
	
  });
  
