// onload
$(function() {
	$("body").addClass("js");

	if(!($.browser.msie) || ($.browser.msie && $.browser.version > 5.5)){
	
		$(".pages").handlePages();

		// window.onload
		$(window).bind("load", function(){
			$(".slideshow").handleSlideshow();
		});		
	}
});
jQuery.fn.handlePages = function(){
	if(this.size() > 0){
		var pageText = $(".menu .current_page_parent a, .menu .current_page_item a").text();
		$(".pages h2").text(pageText);
	}
	return this;
};
jQuery.fn.handleSlideshow = function(){
	if(this.size() > 0){
		var con = this;
		var path = "/wp-content/uploads/slideshow/";
		
			$.each(arrSlideshow, function(){
			
				// Create image
				$(document.createElement("img"))
					.attr("src", path + this)
					.prependTo(con);


			});
			con.cycle({ 
					fx:			'fade',
					speedIn:	600,
					speedOut:	600,
					speed:		(10000),
					cleartype:	true
			});
	}
	return this;
};