/* Author: 

*/
$(function(){
		
	if($('#slideshow').length > 0){
$('#slideshow').after("<div id='top-slideshow'></div><div id='top-slideshow-nav'></div>");
	/*$('#slideshow').remove();*/
	}
	
	if($('#top-slideshow').length > 0){
		
		var slidecontent = $('#top-slideshow');
		
		var images = $('.entry-content img');
		
		images.hide();
		
		images.each(function(){
			 slidecontent.append($(this));
			 $(this).wrap('<div class="slide"></div>');
			});
		images.show();
		$('#top-slideshow').cycle({
			pager:  '#top-slideshow-nav', 
    		speed:  1000,
			timeout: 5000
			});
	}

	
	//fading menu and content in
	//-------------------------------------------
	
	$('#content').hide();
	$('#content').fadeIn();
	
	/*$('#content').hide();
	if($('.sub-menu').length > 0 ){
		  	
			$('.sub-menu').hide();
			$('.sub-menu').has('.current-page-ancestor').show();
			$('.sub-menu').has('.current-menu-item').show();
			
				$('.sub-menu').show(function(){
		  		$('#content').fadeIn();
		  		});
			
		  
		 
		  
	  }else{
		  $('#content').fadeIn();
	  }*/
	
	
	
	
	
	//-------------------------------------------
	
	/*if (!$.browser.opera) {*/
    
			// select element styling
			$('select').each(function(){
				var title = $(this).attr('title');
				if( $('option:selected', this).val() != ''  ) title = $('option:selected',this).text();
				$(this)
					.css({'z-index':10,'opacity':0,'-khtml-appearance':'none'})
					.after('<span class="select">' + title + '</span>')
					.change(function(){
						val = $('option:selected',this).text();
						$(this).next().text(val);
						})
			});

		/*};*/
		
		
		
		
		
});
























