﻿        $(document).ready(function() {
			$("a[rel^='prettyPhoto']").prettyPhoto({
				animationSpeed: 'normal', /* fast/slow/normal */
				padding: 40, /* padding for each side of the picture */
				opacity: 0.85, /* Value betwee 0 and 1 */
				showTitle: true, /* true/false */
				allowresize: true, /* true/false */
				counter_separator_label: ' из ', /* The separator for the gallery counter 1 "of" 2 */
				theme: 'light_square' /* light_rounded / dark_rounded / light_square / dark_square */
			});
			
	        changeStyle();
			
			$("td.caller_td").click(function(){
				$("#caller").fadeOut('slow');
			});
        });
		
        var changeStyle = function() {
            $(document.body).removeClass('big1900');
            $(document.body).removeClass('big1600');
            $(document.body).removeClass('big1200');
            $(document.body).removeClass('normal');
            var width = $.browser.opera? window.innerWidth : $(window).width();
            if(width >= 1850){$(document.body).addClass('big1900');}
            else if(width >= 1550){$(document.body).addClass('big1600');}
            else if(width >= 1200){$(document.body).addClass('big1200');}
            else {$(document.body).addClass('normal');}
        };
		var showCall = function() {
			$("#caller").fadeIn('slow');
		}
		
		
		var sendCall = function() {
			$.post("_caller.php", 
				{
					name: $("#clr_name").val(),
					phone: $("#clr_num").val(),
					txt: $("#clr_txt").val()
				},
				function(result){
					eval(result);
				}
			);
		}
