// JavaScript Document
jQuery.noConflict();
jQuery(document).ready(function(){
	jQuery('a[rel^=progress_image]').each(function() {
		jQuery(this).colorbox();
	})
	jQuery('.jcarousel_gallery').jcarousel({wrap: 'circular', scroll: 2});
	jQuery('a[rel^=quarry_gallery]').colorbox();
	
	jQuery('a[rel^=stone_image]').each(function() {
		jQuery(this).colorbox();
	});
	
	/**/
	jQuery('.pics').cycle({fx:'fade', speed: 4000});
	jQuery(".samples_short").numeric();
	/**/
	jQuery('#slider li a').each(function (){
		jQuery(this).click(function(){
			jQuery("#gallery_full img").attr('src', $('img', this).attr("alt_src"));
			jQuery("#photo_info").html($('img', this).attr("alt"));
			//alert($('img', this).attr("alt_src"));
			return false;
		});
	});

	jQuery(".faq_answer_block").each(function(){
		jQuery(this).hide();
		jQuery("<div style='margin-top: 5px'></div><a href=\"#\" class=\"faq_switch_link arrow_right_link\" state=\"show\">Посмотреть ответ</a>").insertAfter(this);		
		jQuery(this).parent().children(".faq_switch_link").each(function(){
			jQuery(this).click(function(){
				if (jQuery(this).attr("state") == "show"){
					jQuery(this).parent().children(".faq_answer_block").slideDown("normal", function(){
						jQuery(this).parent().children(".faq_switch_link").html("Скрыть ответ").attr("state", "hide");
					});
				}
				if (jQuery(this).attr("state") == "hide"){
					jQuery(this).parent().children(".faq_answer_block").slideUp("normal", function(){
						jQuery(this).parent().children(".faq_switch_link").html("Посмотреть ответ").attr("state", "show");;
					});
				}					
			 return false;
			});
		});
	});

});
/*---------------------------------------*/
