//Скрипт очищающий форму от текста при нажатии на нее курсора 
function doClear(theText) { if (theText.value == theText.defaultValue) { theText.value = "" } }
function doDefault(theText) { if (theText.value == "") { theText.value = theText.defaultValue } }

function slideshowInit(selector)
{
    var container = $(selector);
    var width = container.width();
    var height = container.height();
    container.slideshow({
        width: width,
        height: height,
        title: true,
        titleshow: true,
        playframe: false,
        effecttime: 1000,
        controls: {
            help: false
        }
    }).playSlide();
    
}

$(document).ready(function(){    
    
    slideshowInit('.slideshow');
    
    $(document).pngFix();

    //Очистка полей формы по клику
    $(".autoclear").focus(function(){doClear(this);}).blur(function(){doDefault(this);});

    //Menu
    $('ul#menu').superfish();
    
    
    //prettyPhoto
	$("a[rel^='images']").prettyPhoto({
		social_tools: false /* html or false to disable */
	});
    
    //Close Box 
     $(".close-box").click(function(){
    	$(this).toggleClass("active").parent("div").fadeOut(500);
    	return false; 
    });

});
