$(document).ready(function(){
	var steps = new Array('.step2','.step3','.step4');
	if($('.requestquote').length > 0 || $('.dealer-requestquote').length > 0){
		var t 		= 100;
		var l 		= 10;
		var bg		= 'small';
		var width	= 150;
		var height	= 100;
	}else{
		var t 		= 200;
		var l 		= 10;
		var bg		= 'large';
		var width	= 300;
		var height	= 200;
	}
	for(i=0; i<steps.length; i++){
		//CLICK ON STEP
		$(steps[i]).find('a',this).click(function(e){
			e.preventDefault();
			if($('body').find('.oops').length == 0){
				var a = $(this).offset();
				$('body').append('<div class="oops" style="top:'+(a.top-t)+'px; left: '+(a.left+l)+'px; width:'+width+'px; height:'+height+'px; background:url(\'images/components/articles/request/'+bg+'/oops.png\') no-repeat;">Oops! You need to start with step 1!</div>');
				setTimeout('remove();',2000);
				$(document).mousemove(function(e){
					$('.oops').css({
									 top: (e.pageY - t) + "px",
									 left: (e.pageX + l) + "px"
	
								   });
				});
			}
		});
		
		//WATCH VIDEO
		$('.presentation').hover(function(e){
			e.preventDefault();
			if($('body').find('.watch-presentation').length == 0){
				var a = $(this).offset();
				$('body').append('<div class="watch-presentation" style="top:'+(a.top-100)+'px; left: '+(a.left+10)+'px; width:150px; height:100px; background:url(\'images/components/articles/dealerapplication/clicktoplaypresentation.png\') no-repeat;">Click to Play Presentation!</div>');
				$(document).mousemove(function(e){
					$('.watch-presentation').css({
									 top: (e.pageY - 100) + "px",
									 left: (e.pageX + 10) + "px"
	
					});
				});
			}
		},function(){ 
			setTimeout('remove2();',2000);
		});
	}
});

function remove(){
	$('.oops').fadeOut('slow',function(){ $(this).remove(); });
}
function remove2(){
	$('.watch-presentation').fadeOut('slow',function(){ $(this).remove(); });
}