			function showInfoBar(caption){
				hideInfoBar();
				$(document.body).append("<div id='infoBar' style='width:100%;'><table width=100%><tr nowrap id=infoContent><td width=30></td><td align=left>" + caption + "</td><td width=60 align=left><div id=infoClose>[kapat]</div></td></tr></table></div>");
				//<%-- $("#infoClose").click(hideInfoBar); --%>
				$("#infoClose").click(function () {
					$("#infoBar").fadeOut(400)
					$("#infoBar").remove();
					$("#infoBarHiddenDiv").remove();
					$.get("./ajax/infoBar.jsp", function(responseText){});
				});
				$("#infoClose").css("border-color","#ffffff");
				$("#infoClose").css("border","7");
				$("#infoClose").css("cursor","hand");
				$("#infoBar").hide();
				$("#infoContent").css("font-weight","bold");
				$("#infoContent").css("font","15px Arial,Verdana,sans-serif;");
				$("#infoContent").css("color","white");
				$("#infoBar").css("background-color","#ff9900");
				$("#infoBar").css("position","absolute");
				$(window).resize(info_position);
				$(window).scroll(info_position);
				info_position();
				$("#infoBar").slideDown(400); //i like sliding in more than fade in this case. i think it catches the users attention more effectively
				//$("#infoBar").fadeIn(800); //if you like this more remark the previous line
			}
		
			function hideInfoBar(){
				$("#infoBar").fadeOut(400)
				$("#infoBar").remove();
			}
	
			function info_position() {
				var scrollPosition = $(window).scrollTop();
				$("#infoBar").css("top",scrollPosition +"px");
				$("#infoContent").css("height","45px");
				$("#infoBar").css("left","0px");
				//<%-- $("#infoBar").css("width",$(window).width()); --%>
			}




	$(function() {
		$.firsttime = false;
		//<%-- $(".demo").css('display','block'); --%>
		//<%-- $(".demo").css('visibility','visible'); --%>
		
		$("#tabs").tabs({
			select: function(event, ui) {
				if ($.firsttime) {
					if (ui.panel.id == 'tabs-8') { 
						return false;
					}else
					if (ui.panel.id != 'tabs-9') { 
						location.href=ui.tab.id;
						$('#diger_extra').css('visibility','hidden');
						return false;//<%-- return true; --%>
					}
				}
			}
		});

		$.hovering = false;
		var selected = $('#tabs').tabs('option', 'selected');
		if (js_topnavCategory == 36) {
					$('#tabs').tabs('option', 'selected', 4);
		}else if (js_topnavCategory == 37) {
				$('#tabs').tabs('option', 'selected', 1);			
		}else if (js_topnavCategory == 230) {
				$('#tabs').tabs('option', 'selected', 2);
		}else if (js_topnavCategory == 238) {
					$('#tabs').tabs('option', 'selected', 5);
		}else if (js_topnavCategory == 632) {
					$('#tabs').tabs('option', 'selected', 6);
		}else if (js_topnavCategory == 35) {
					$('#tabs').tabs('option', 'selected', 3);
		}else if (js_topnavCategory == 38) {
					$('#tabs').tabs('option', 'selected', 7);
		}else if (js_topnavCategory == 1319) {
					$('#tabs').tabs('option', 'selected', 8);
		}else if (js_topnavCategory == -1) {
					$('#tabs').tabs('option', 'selected', 0);
		}else {
					$('#tabs').tabs('option', 'selected', 10);
		}

		$.firsttime = true;
		
		if (js_query_dynamicTab==1) {
			$('#tabs').tabs('option', 'selected', 10); // <%-- 9 idi ### --%>
		}
		
		$('#tumkategori').hoverIntent({
				sensitivity: 3, 
				interval: 200, 
				timeout: 500, 
				over:  function() {
					
						$('#showAllCats').css('top',$('#tabs').position().top+42);
						//<%-- $('#showAllCats').css('width',$(this).parent().position().left + $(this).parent().width()); --%>
						$('#showAllCats').css('width',950);
						$('#showAllCats').css('left',$('#tabs').position().left+6);
						$('#showAllCats').css('display','block');
						$('#showAllCats').css('visibility','visible');
						$('#showAllCats').show();
         		        }, 
				out: function() { 
					  if(!$.hovering) {
						$('#showAllCats').hide();  } 
					}
			});

		$('#showAllCats').hover(
				function() {	
					$.hovering = true;
         		        }, 
				function() { 
					$.hovering = false;
					$('#showAllCats').hide();  } 
			);

		$('div[id^=tabs-]').css('height',25);
		$("#tabs-1").css("cursor","hand");
	});
