$(document).ready(function() {

$("#slideshow-view-wrap").fadeIn(2000);//fade in from display:none first
//Slidesho params
$("#slideshow").cycle({
fx: 'scrollHorz',
pager: '#paginate-numbers',
prev: '#prev',
next: '#next',
easing: 'easeOutCubic',
speed: 500,
timeout: 6000,//pause between transitions
pause: '1',//pause on mouseover use 1 or 0 
cleartype: 1 // enable cleartype corrections in IE
});

//Slidesho params for ARTICLE VIEW-2 PAGE
$("#slideshow-view").cycle({
fx: 'scrollHorz',
speed: 500,
pager: '#pager-view',
prev: '#back-view',
next: '#next-view',
nowrap: true,
easing: 'easeOutCubic',
timeout: 6000,//pause between transitions
pause: '1',//pause on mouseover use 1 or 0 
cleartype: 1 // enable cleartype corrections in IE
});







//fade image out and back in again, all pages
$("div.top-story-sub a img, div.top-story-title-img a img, .trends-thumbnail img").hover(function(){
$(this).animate({opacity: 0.5});
}, function(){$(this).animate({opacity: 1.0});
});

//fade in/out next/back buttons over slideshow images. View page v2 only

$("#slideshow-view-wrap").hover(function(){
  $("#next-view, #back-view").fadeIn()
  },function(){$("#next-view, #back-view").fadeOut();
 });

//init fancy box
$("a.fancybox").fancybox();

//inti Scroll Pane
$('.scrollpane').jScrollPane({
	wheelSpeed: 18, 
	scrollbarWidth: 5, 
	showArrows:true
});

});