

function plusTitle(cat_name) { 
	
	 // if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0) 
	//  { 
		//  var elem = document.getElementById(cat_name);
		//  var num_title = elem.getElementsByTagName("li").length;
		//  xmlHttp.open("GET", url+"?cat="+cat+"&num_title="+num_title, true);
	    //  xmlHttp.send(null); 
	 // } 
	 // else 
		// setTimeout('process()', 1000); 
		var elem = document.getElementById(cat_name);
		items = elem.getElementsByTagName("li");
		var l = items.length;
		//alert(l);
		var count = 0;
		var x = 0;
		for(x=0;x<l;x++){
			if(items[x].style.display=="block"){
				count ++;
			}
		}
		//alert(count);
		if(count<7){
			items[count].style.display = "block";
			//elem.removeChild(items[l-1]);
		}
		
		  //$.cookie("user_layout",null);
		  
		
	 return;	
		
		
	} 

function minusTitle(cat_name){
		var elem = document.getElementById(cat_name);
		items = elem.getElementsByTagName("li");
		var l = items.length;
		var count = 0;
		var x = 0;
		for(x=0;x<l;x++){
			if(items[x].style.display=="block"){
				count ++;
			}
		}
		//alert(count);
		if(count>1){
			items[count-1].style.display = "none";
			//elem.removeChild(items[l-1]);
		}
	 return;
	}
	

function formatText(index, panel) {
  return index + "";
}

$(function () {

    $('.anythingSlider').anythingSlider({
        easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
        autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
        delay: 8000,                    // How long between slide transitions in AutoPlay mode
        startStopped: false,            // If autoPlay is on, this can force it to start stopped
        animationTime: 100,             // How long the slide transition takes
        hashTags: true,                 // Should links change the hashtag in the URL?
        buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
		startText: "Старт",             // Start text
        stopText: "Стоп",               // Stop text
        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
    });
    
    $("#slide-jump").click(function(){
        $('.anythingSlider').anythingSlider(6);
    });
    
});

//search form function
$(function(){
	$('#rest_search_form_trigger').toggle(
	   function(){
		$('#rest_search_form').slideDown('slow');
		$('#rest_search_form_trigger').html('<img src="http://www.24online.mk/images/up_form.png"" />');
		$('#rest_search_form_trigger').attr('title', 'Затвори напредно пребарување');
	}, function(){
		$('#rest_search_form').slideUp('slow');
		$('#rest_search_form_trigger').html('<img src="http://www.24online.mk/images/down.png""/>');
		$('#rest_search_form_trigger').attr('title', 'Напредно пребарување');
		
	});
	
});