$(document).ready(function(){	
	$("area[rel^='prettyPhoto']").prettyPhoto();
	
	$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'facebook',slideshow:3000, autoplay_slideshow: true});
	$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'fast',slideshow:10000, hideflash: true});
	
	var getoph1link = "#logo";
	$(getoph1link).each(function(){
		$(this).click(function(){
			if($(this).hasClass("english")==true){
				window.location = "http://1home.co.il/en-index.html";
			}else{
				window.location = "http://1home.co.il";
			}
		});
	});
	
});


function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 2,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});

$(document).ready(function(){			
	$(".gallery a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'slow',theme:'facebook', slideshow:10000, hideflash: true});
});
