﻿function slideMoveRightPro() {
    var position = $(".js_contp").position();
    var position_left = position.left - 10;
    if (position_left > -$(".js_contp").attr("max-width")) $(".js_contp").css("left", position_left);
}


function slideMoveLeftPro() {
    var position = $(".js_contp").position();
    var position_left = position.left + 10;
     if (position_left < 10) $(".js_contp").css("left", position_left);
}


$(document).ready(function() {

    $(".image").click(function() {
    
       var image = $(this).attr("rel");
        
       
        $("#gallery").animate({ opacity: "0.0" }, 300, function() {
        $("#gallery").html('<img src="' + image  + '" />');        });
        $("#gallery").animate({ opacity: "1.0" }, 300);
               
       
        return false;
    
    });


	$("#slider").easySlider({
		prevId: 'prevBtn',
		prevText: '',
		nextId: 'nextBtn',	
		nextText: '',
		controlsShow: false,
		controlsBefore: '',
		controlsAfter: '',	
		controlsFade: true,			
		vertical: false,
		speed: 800,
		auto: true,
		pause: 800,
		continuous: true
	});
	
	$(".NameValue").defaultValue("שם מלא");
	$(".EmailValue").defaultValue("דוא''ל");
	$(".PhoneValue").defaultValue("טלפון");
	$(".StextValue").defaultValue("נושא");
	$(".last_line li:last a").css('background', 'none');
	
	$(".cubes_inner").hover(function(){
		$(".cubes_inner").stop(true,true);
		$(".cubes_inner").removeClass('active');
		$(".cube_inner").css('display','block');
		$(".cube_hover").css('top','200px');

		$(this).addClass('active');
		var cube_id = $(this).attr("id");
		
		$("#on_" + cube_id).css('display','none');
		$("#off_" + cube_id).css('top','0px');
			
		//$(this).cycle({
		//	fx: 'shuffle',
		//	autostop: 2,
		//	autostopCount: 2,
		//	speed:    350,
		//	timeout:  100,
		//	delay: -4000
		//});
		
    });
    

});


