$(document).ready(function() {
	$("form#site_search div").hide();
	$("form#site_search h5").click(function()
	{
		$(this).toggleClass('opened').next("form#site_search div").toggle();	
	});
	
	$("div.toggle:not(:first)").hide(); 
	$("div.toggle:first").toggleClass('opened');
	$("h3").click(function()
	{
		$(this).toggleClass('opened').next("div.toggle").slideToggle("fast").siblings("div.toggle").slideUp("fast");	
	});	
	
	$("div.togglekit").hide(); 
	$("h3.toggler").click(function()
	{
		$(this).toggleClass('opened').next("div.togglekit").slideToggle("fast").siblings("div.togglekit").slideUp("fast");	
	});		

    $('#tabs').cycle({
        fx:     'scrollLeft',
        speed:  'fast',
        timeout: 0,
        pager:  '#tabnav',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#tabnav li:eq(' + (idx) + ') a';
        }
    });

    $('#features').cycle({
        fx:     'fade',
        speed:  'slow',
        timeout: 10000,
		pause:1, 
        pager:  '#featuresnav',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#featuresnav li:eq(' + (idx) + ') a';
        }
    });

    $('#gallery-big').cycle({
        fx:     'fade',
        speed:  'slow',
        timeout: 0,
        pager:  '#gallerynav',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#gallerynav li:eq(' + (idx) + ') a';
        }
    });	
	
	$("li.page-item-415 a").each(function(){
			$(this).text($(this).text().replace(/Proxi-Point /, ""));	
	});
	$("li.page-item-417 a").each(function(){
			$(this).text($(this).text().replace(/Proxi-Point /, ""));	
	});
	$("li.page-item-421 a").each(function(){
			$(this).text($(this).text().replace(/Proxi-Ring /, ""));	
	});
	$("li.page-item-423 a").each(function(){
			$(this).text($(this).text().replace(/Proxi-Ring /, ""));	
	});
});

