/* Author: meister

*/
$(document).ready(function() {
	$('.photodet a').slimbox({
		loop: true,
		overlayOpacity: 0.8,
		counterText:"Изображение {x} из {y}",
	});
	$('.photodt a').slimbox({
		loop: true,
		overlayOpacity: 0.8,
		counterText:"Изображение {x} из {y}",
	});

    $('#mainmenu > li:first-child').addClass('li-first-child');
    $('#mainmenu > li:last-child').addClass('li-last-child');
    $('.fancybox').fancybox({
        'transitionIn' : 'elastic',
        'transitionOut' : 'elastic',
        'speedIn' : 600,
        'speedOut' : 200,
        'height' : 622,
        'width' : 478,
        'overlayShow' : true
    });

	/*$('.colors span:not(:last-child)').after(",");*/
		$.datepicker.setDefaults($.extend($.datepicker.regional["ru"]));
		$( "#datepicker" ).datepicker({
			showOn: "both",
			buttonImage: "/img/calendar.gif",
			buttonImageOnly: true,
			changeMonth: true,
			changeYear: true,
			showAnim: "slideDown"			
			
		});
		$( "#datepicker" ).datepicker();

});
function clearval() {
    $('#keyword-text-box').attr('value', '');
}

function changePhoto(i) {
    //alert(i);
    // document.getElementById('model').src = '/content/images/products/' + i;
    $('#model').attr('src', '/content/images/products/' + i);
}

function zoomlink(e) {
    $('#zoomlink').attr('href', e);
}
function showblock(cl){
    $('.'+cl).css('display','block');
}
function hideblock(cl){
    $('.'+cl).css('display','none');
}
