var page_movement = 0;
var page_landingpage = 1;
var movement		= 506;

$(document).ready(function() {



$("a[rev='spot_right']").click( function() {
			

page_movement++;

if(page_movement >= number_of_spots)
	page_movement = number_of_spots -1;

move_spot(page_movement);

});

$("a[rev='spot_left']").click( function() {

page_movement--;

if(page_movement <= 0)
	page_movement =0;
	
move_spot(page_movement);

});

function move_spot(page_movement)
	{
	page_movement_px = -page_movement * movement;

	
		$(".spot_content_y").animate({ 
        marginLeft: page_movement_px+"px"
      }, 1000 );
	}
	


$(".spot_content_inner_box").click( function() {
	
	id = $(this).attr("id").split("-");
	id = id[1];
	
	
	_picture = picture["dynamic"]["picture-"+id]["picture"]
	_text = picture["dynamic"]["picture-"+id]["text"]
	
	picture_temp = url; /*+'assets/general/img/landingpage/mode-accessories/spot/'*/
	
	//alert(picture_temp+"L_"+_picture);
	
	$(".frame_l_picture").css("background-image" , "url("+picture_temp+"L_"+_picture+")");
	$(".frame_s_picture").css("background-image" , "url("+picture_temp+"s_"+_picture+")");
	$("#frame_text").html(_text);
	
	//alert(_picture + " " + _text + " " +picture_temp);
	});

});