$(document).ready(function() {
   		debtSolutions.init();
 });

var debtSolutions = 
{
	init: function(){
		var self=this;
		$('.imgs').cycle({ 
		    fx:    'fade',
		    timeout:  4000 
		 });
		setTimeout(this.arrows, 1500);
	},
	pauseIt: function(){
		$('.imgs').cycle('pause');
	},
	arrows: function(){
		var self = this;
		var clickbox = $('.clickbox');
		var offset = clickbox.offset();
		
		var arrow2 = $('#arrow2');
		arrow2.css('opacity', 0);
		
		var arrow3 = $('#arrow3');
		arrow3.css('opacity', 0);
		
		
		arrow2.css("left", offset.left - 57 + 'px');
		arrow2.css("top", offset.top + 230 + 'px');
		arrow2.animate({opacity: 1.0}, 2000);
		
		arrow3.css("left", offset.left + 216 + 'px');
		arrow3.css("top", offset.top + 230 + 'px');
		arrow3.animate({opacity: 1.0}, 2000);
	

		var resizeTimer = null;
   		$(window).bind('resize', function() 
			{
   				if (resizeTimer) clearTimeout(resizeTimer);
   				resizeTimer = setTimeout(debtSolutions.arrows, 50);
			})
	}
}
