/*
 *	Custom jQuery Functions
 *  By Anthony Ryan-Lorraine (Anthony@AnthonysWeb.com)
*/

var j = jQuery.noConflict();

j(document).ready(function(){  	
	simpleSlide({
		'set_speed': 200,
	    'status_width': 20,
    	'status_color_outside': '#aaa',
	    'status_color_inside': '#fff',
    	'fullscreen': 'false',
	    'swipe': 'false',
    	'callback': function() {},
		'moveCallback': function(rel_no, to_page){
			j('#featured-thumbs .jump-to').each(function(){
				if(j(this).attr('alt') == to_page){
					j(this).addClass('currentThumb');
				} else {
					j(this).removeClass('currentThumb');
				}
			});
		}
	});
	var interval = null;
	
	j('.simpleSlide-window').each( function() {
		var related_group = j(this).attr('rel');
		interval = window.setInterval("simpleSlideAction('.right-button', '" + related_group + "');", 5000);
	});

	j('.left-button, .right-button, .jump-to').live('click', function() {
		window.clearInterval(interval);
	});

});

