var j = jQuery;
j(function() {
	var firstImg = j('.flash img:first');
	firstImg.css('visibility', 'visible');	
	j('.flash').cycle({
		timeout: 5000,
		before: function(){			
				this.style.visibility = "visible";
		}
	});
/*	j('.catimg').cycle();
	j('#deals').cycle({
		pause: 1,
		//sync: 0,
		speed: 1000,
		timeout: 6000,
		height: 50,
		scroll:1,
		fx: 'scrollUp'

	});

	j('#close').click(function(){
		j(this).fadeOut('slow');
		j('#tooltip').fadeOut('slow');
	});
	j('#tooltip').draggable({ containment: '.flash', revert: true});*/
	var s = jQuery('#s');
	s.blur(function(){
		if(s.val('')) {
			s.val('..חפש');
		}
	});
	s.focus(function(){
		if(s.val('..חפש')) {
			s.val('');
		}
	});
	
	if (j('.alignleft').length > 0) {		
		if(j('.catleft').length < 1) {
			j('.post').append('<div class="catleft"></div>');
		}
		j('#google_map').appendTo('.catleft');
		if (j('a').has('.alignleft').length > 0) {				
			j('a').has('.alignleft').appendTo('.catleft');
		} else {
			jQuery('.alignleft').appendTo('.catleft');	
		}
		j('.catleft').height('auto');
	}
	
	if(j.browser.msie && parseFloat(j.browser.version) <= 7)
		j('.dealstitle').css('margin', '-5px 0 0 0');
		
	j('#facebook iframe').attr('allowTransparency', 'true');

});
