var lightbox_settings = {
	imageLoading:			'/_media/images/lightbox/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
	imageBtnPrev:			'/_media/images/lightbox/lightbox-btn-prev.gif',			// (string) Path and the name of the prev button image
	imageBtnNext:			'/_media/images/lightbox/lightbox-btn-next.gif',			// (string) Path and the name of the next button image
	imageBtnClose:			'/_media/images/lightbox/lightbox-btn-close.gif',		// (string) Path and the name of the close btn
	imageBlank:				'/_media/images/lightbox/lightbox-blank.gif',
	txtImage:				'תמונה',	// (string) Specify text "Image"
	txtOf:					'מתוך'		// (string) Specify text "of"
};

$(document).ready(function(){
	$('.right-links li').hover(function(){
		$(this).addClass('hover');
	},function(){
		$(this).removeClass('hover');		
	})
	
	
	//a custom target=_blank
	$('a[rel=external]').click(function(){
		var href = $(this).attr('href');
		window.open(href);
		return false;
	});
});


(function($) {
	$(function() {
		$('.q_contact_input').bind('click', function(){
			$(this).find('input').val('');
		});
		
		/*QUICK CONTACT FORM*/
		$('#q_contact_submit').bind('click', function(){
			/*$('#form form').trigger('submit');*/
			var valid = true,
				i = function(id) { return $('#' + id)[0]; };
			
			if(!validate_required(i('fullname'))) {
				var fullname = true,
				valid = false;
			}
			if(!validate_required(i('address'))) {
				var address = true,
				valid = false;
			}
			if(!validate_phone(i('phone'))) {
				var phone = true;
				valid = false;
			}
			/*event.preventDefault();*/
			
			if(!valid) {
				if(fullname && address && phone ){
					alert('חובה למלא את כל השדות ');
				}
				else if(fullname || address || phone){
					alert('חובה למלא את כל השדות');
				}
			}else if(valid){
				$('#form form').trigger('submit');
			}
		});
		/*$('#form form').bind('submit', function(event) {
			
		});*/
	});
}(jQuery));

