$j = jQuery.noConflict();
$j(document).ready(function() {$j("#rps .paging").show();$j("#rps .paging a:first").addClass("active");
$j(".slide").css({"width" : 500});
$j("#rps .window").css({"width" : 500});
$j("#rps .window").css({"height" : 400});
$j("#rps .col").css({"width" : 498});
$j("#rps .col").css({"height" : 396});
$j("#rps .col p.post-title span").css({"color" : "#ffffff"});
$j("#rps .post-date").css({"top" : 380});
$j("#rps .post-date").css({"width" : 488});$j("#rps .col p.post-title").css({"background-color" : "#050505"});var imageWidth = $j("#rps .window").width();
//var imageSum = $j("#rps .slider div").size();
var imageReelWidth = imageWidth * 6;
//Adjust the image reel to its new size
$j("#rps .slider").css({"width" : imageReelWidth});
//Paging + Slider Function
rotate = function(){
var triggerID = $active.attr("rel") - 1; //Get number of times to slide
//alert(triggerID);
var sliderPosition = triggerID * imageWidth; //Determines the distance the image reel needs to slide
$j("#rps .paging a").removeClass("active");
$active.addClass("active");
//Slider Animation
$j("#rps .slider").stop(true,false).animate({
left: -sliderPosition
}, 500 );
};
var play;
//Rotation + Timing Event
rotateSwitch = function(){
play = setInterval(function(){ //Set timer - this will repeat itself every 3 seconds
$active = $j("#rps .paging a.active").next();
if ( $active.length === 0) { //If paging reaches the end...
$active = $j("#rps .paging a:first"); //go back to first
}
rotate(); //Trigger the paging and slider function
}, 7000);
};
rotateSwitch(); //Run function on launch
//On Hover
$j("#rps .slider a").hover(function() {
clearInterval(play); //Stop the rotation
}, function() {
rotateSwitch(); //Resume rotation
});
//On Click
$j("#rps .paging a").click(function() {
$active = $j(this); //Activate the clicked paging
//Reset Timer
clearInterval(play); //Stop the rotation
rotate(); //Trigger rotation immediately
rotateSwitch(); // Resume rotation
return false; //Prevent browser jump to link anchor
});
});
Follow Us!