 var RecaptchaOptions = {
    theme : 'clean',
    lang : 'ru'
 };
var site_url = 'http://indigalplus.ru/';
var shkOptions = {
    stuffCont: 'div.shk-item',
    lang: 'russian-UTF8',
    currency: 'руб.',
    orderFormPage: 'index.html',
    cartTpl: ['shopCartSmall','@FILE:assets/snippets/shopkeeper/chunks/ru/chunk_shopCartRow.tpl',''],
    priceTV: 'price',
	cartType: 'small',
	style:'default'
};
$(document).ready(function(){try{$(shkOptions.stuffCont).shopkeeper();}catch(e){}});
$(function(){
      $('.shk-image').attr('height','170');
       try{$("a[rel='plus']").colorbox();}catch(e){}
	$('.button').hover(function(){
	  if($(this).attr('id')!==undefined){
                $('.main_pic').hide();
                var pic = $(this).attr('id');
				var ind = pic.indexOf("-");
                while (ind != -1){
					pic = pic.replace("-","/" )
					ind = pic.indexOf("-");
				}
				$('.main_pic').css('background-image','url('+pic+')');
                $('.main_pic').fadeIn(400);
	  }
      $(this).removeClass('button');
      $(this).addClass('button_activated');
	},function(){
      if($(this).attr('id')==undefined) $('.main_pic').hide();
      $(this).removeClass('button_activated');
      $(this).addClass('button');
	});
	$('.menu2').hover(function(){$(this).css('font-weight','bold');},function(){$(this).css('font-weight','normal');});
    $('#link_overlay').click(function(){$(location).attr('href','/');});
    $('#indi_overlay').click(function(){$(location).attr('href','/indigal');});
    $('#plus_overlay').click(function(){$(location).attr('href','/indigal-plus');});
    $('#cart_overlay').click(function(){$(location).attr('href','/shop/internet-magazin');});
    $('.twitter_button').click(function(){$(location).attr('href','http://twitter.com/timeline/home?status='+document.title+'%20'+window.location.href+window.location.hash);});
    $('.facebook_button').click(function(){$(location).attr('href','http://www.facebook.com/share.php?u='+window.location.href+window.location.hash);});
    $('.vkontakte_button').click(function(){$(location).attr('href','http://vkontakte.ru/share.php?url='+window.location.href+window.location.hash+'&title='+document.title);});
    $('.odnoklassniki_button').click(function(){$(location).attr('href','http://odnoklassniki.ru/dk?st.cmd=addShare&st.s=1000&st._surl='+window.location.href+window.location.hash+'&tkn=3009');});
    $('.livejournal_button').click(function(){$(location).attr('href','http://www.livejournal.com/update.bml?mode=full&subject='+document.title+'&event='+window.location.href+window.location.hash);});
    $('img[src="assets/images/prostatit/_rez_54.jpg"]').hide();
    $('a:contains("Подробнее")').hide();
});

//Online Test
$(document).ready(function() {
	$('#get_results').click(function() {
		$('#otvet_0, #otvet_1, #otvet_2').hide();
		var count = 0;
		
		$('.selected').each(function() {
			count += parseInt($(this).attr('value'));
		});
		
		if (count < 5) {
			$('#otvet_0').slideDown();
		} else if (count >= 5 && count <= 8) {
			$('#otvet_1').slideDown();
		} else if (count >= 9) {
			$('#otvet_2').slideDown();
		}
		return false;
	});
	$('.one').click(function() {
		$('.one').each(function() {
			$(this).removeClass('selected');
		})
		$(this).addClass('selected');
	});
	$('.two').click(function() {
		$('.two').each(function() {
			$(this).removeClass('selected');
		})
		$(this).addClass('selected');
	});
	$('.three').click(function() {
		$('.three').each(function() {
			$(this).removeClass('selected');
		})
		$(this).addClass('selected');
	});
	$('.four').click(function() {
		$('.four').each(function() {
			$(this).removeClass('selected');
		})
		$(this).addClass('selected');
	});
	$('.five').click(function() {
		$('.five').each(function() {
			$(this).removeClass('selected');
		})
		$(this).addClass('selected');
	});
	$('.six').click(function() {
		$('.six').each(function() {
			$(this).removeClass('selected');
		})
		$(this).addClass('selected');
	});
	$('.seven').click(function() {
		$('.seven').each(function() {
			$(this).removeClass('selected');
		})
		$(this).addClass('selected');
	});
});
