TOP画像 2枚目が有ればこのスクリプト 読み込む

<!---Top画像2があればこのスクリプトを読む-->
  <?php
$args = array(
		'posts_per_page' => -1,
'paged' => $paged,
'orderby' => 'menu_order',
'order' => 'ASC',
//'tax_query' => array(
//			'relation' => 'AND',
//			array(
//				'taxonomy' => 'event',
//				'field' => 'slug',
//				'terms' => array( 'トップ用', '予備' ),
//'operator'=>'NOT IN'
//				),
//),
'post_type' => 'd_midashi', //カスタム投稿名
	);
?>

<?php
	query_posts( $args );
?>
<!--★★★ループ基本-->
<?php
if ( have_posts () ) :
    while ( have_posts() ) :
        the_post();
?>  

<?php if(post_custom('toppage画像2')): ?>

<!--TOPフェード-->
<script type="text/javascript">
$(function(){
	var setImg = '#main_contents_top';
	var fadeSpeed = 1500;
	var switchDelay = 5000;

	$(setImg).children('img').css({opacity:'0'});
	$(setImg + ' img:first').stop().animate({opacity:'1',zIndex:'20'},fadeSpeed);

	setInterval(function(){
		$(setImg + ' :first-child').animate({opacity:'0'},fadeSpeed).next('img').animate({opacity:'1'},fadeSpeed).end().appendTo(setImg);
	},switchDelay);
});
</script>   
 <?php endif; ?> 
 
   <?php
    endwhile;
endif;
?>          
   <?php wp_reset_query(); ?>     
<!---/Top画像2があればこのスクリプトを読む-->

TOP スライダー 改ページフェード出ない様に

<div id="main_contents_top_fade">
<div id="main_contents_top">
<img src="img/top/jc_top2-04.jpg" width="1000" height="343">
<img src="img/top/jc_top2-01.jpg" width="1000" height="343">
<img src="img/top/jc_top2-03.jpg" width="1000" height="343">
<img src="img/top/jc_top2-02.jpg" width="1000" height="343">
<img src="img/top/jc_top2-05.jpg" width="1000" height="343">
<img src="img/top/jc_top2-08.jpg" width="1000" height="343">
<img src="img/top/jc_top2-07.jpg" width="1000" height="343">
<img src="img/top/jc_top2-06.jpg" width="1000" height="343"> 
</div id="main_contents_top">
</div id="main_contents_top">
#main_contents_top_fade {
	width: 1000px;
	height: 343px;
	margin-bottom: 20px;
	}
#main_contents_top {
	width: 1000px;
	margin-bottom: 20px;
	position: relative;
	overflow: hidden;
	height: 343px;	/*display: none;*/
	background-color: #FFF;
	display: none;
}
#main_contents_top img {
	top: 0;
	left: 0;
	position: absolute;
}
<!--TOPフェード-->
<script type="text/javascript">
$(function(){
	var setImg = '#main_contents_top';
	var fadeSpeed = 1500;
	var switchDelay = 5000;

	$(setImg).children('img').css({opacity:'0'});
	$(setImg + ' img:first').stop().animate({opacity:'1',zIndex:'20'},fadeSpeed);

	setInterval(function(){
		$(setImg + ' :first-child').animate({opacity:'0'},fadeSpeed).next('img').animate({opacity:'1'},fadeSpeed).end().appendTo(setImg);
	},switchDelay);
});
</script>   

<!--フェードイン-->
<script type="text/javascript">
$(document).ready(function() {
$('#main_contents_top').fadeIn(0);
});
</script>