jQuery(function() {

////////////////////////////
////// Central Avenue //////
////////////////////////////
	$('#crossfade').crossSlide({
		sleep: 4,
		fade: 2
	}, [
		//{ src: 'http://localhost/centralavenue.lt/wp-content/themes/centralavenue/images/header-img.jpg'  },
		//{ src: 'http://localhost/centralavenue.lt/wp-content/themes/centralavenue/images/header-img2.jpg' },
		//{ src: 'http://localhost/centralavenue.lt/wp-content/themes/centralavenue/images/header-img3.jpg' },
		//{ src: 'http://localhost/centralavenue.lt/wp-content/themes/centralavenue/images/header-img4.jpg' }
		
		// Pakeisit virsutines 4 eilutes i sias, kai bus ikeltas i serveri
		{ src: 'http://www.centralavenue.lt/wp-content/themes/centralavenue/images/header-img.jpg'  },
		{ src: 'http://www.centralavenue.lt/wp-content/themes/centralavenue/images/header-img2.jpg' },
		{ src: 'http://www.centralavenue.lt/wp-content/themes/centralavenue/images/header-img3.jpg' },
		{ src: 'http://www.centralavenue.lt/wp-content/themes/centralavenue/images/header-img4.jpg' }
		
		// test server 
		//{ src: 'http://centralavenue.lt.skudutis.serveriai.lt/wp-content/themes/centralavenue/images/header-img.jpg'  },
		//{ src: 'http://centralavenue.lt.skudutis.serveriai.lt/wp-content/themes/centralavenue/images/header-img2.jpg' },
		//{ src: 'http://centralavenue.lt.skudutis.serveriai.lt/wp-content/themes/centralavenue/images/header-img3.jpg' },
		//{ src: 'http://centralavenue.lt.skudutis.serveriai.lt/wp-content/themes/centralavenue/images/header-img4.jpg' }
	]);
    // Transform pages navigation widget
	var menu_html = $(".menu > ul").html();
	$(".menu").html(menu_html);
	$(".menu li").each(function(){
		var text = $(this).html(); //alert(text);
		$(this).children("a").remove();
		$(this).append("<h1>"+text+"</h1>");		
	});
	//
	
	// Extract ngg gallery pictures from default <div> block
	var gallery_html = $(".gallery > .ngg-widget").html();
	$(".ngg-widget").remove();
	$(".gallery").append(gallery_html);
	//
	
	// Add id="ReservationForm" to <form> tag
	$("form").attr("id", "ReservationForm");
	//
	
	// jQuery carousel gallery
	//$('.gallery').jcarousel({
        // Configuration goes here
    //});
	//
////////////////////////////////
////// End Central Avenue //////
////////////////////////////////

    // Transform footer bookmarks list
    $("div.section_w180").each(function()
    {
        var linkcat = $(this).children(".section_w180_content").children(".footer_menu_list").children("li.linkcat").children("h2").text();
        // Do not show section if it is empty
        if (linkcat == '') $(this).remove();
        var bookmarks = $(this).children(".section_w180_content").children(".footer_menu_list").children(".linkcat").children("ul.blogroll").html();
        $(this).children("div.header_05").text(linkcat);
        $(this).children("div.section_w180_content").children(".footer_menu_list").html(bookmarks);
    });

    //$("#navigation > li:first").addClass('first');
    $("#navigation > li:last > a").addClass('last');

    // Straipsniu spalvos
    $(".column_w300_section_01:odd").addClass('even_color');
});

