$(document).ready(function() {
	// Wrappers L&R;
	var width = $('body').width();
	var width_div = (width - 960)/2 + 'px';
	$('#wrapper-left').css('width',width_div);
	$('#wrapper-right').css('width',width_div);
	
	$(function() {
		$('body').resize(function() {
			var width = $('body').width();
			var width_div = (width - 960)/2 + 'px';
			//alert(width+','+parseInt((width - 960)/2));
			if(parseInt((width - 960)/2) > 0)
			{
				$('#wrapper-left').css('width',width_div);
				$('#wrapper-right').css('width',width_div);
			}
			else
			{
				$('#wrapper-left').css('width','0px');
				$('#wrapper-right').css('width','0px');
			}
		});
	});
	// Form transform;
    $("form.jqtransform").jqTransform();	

    // Gallery
    $(function() {
        $('a.lightbox').lightBox({
            txtImage: '',
            txtOf: '/',
            imageLoading: '/img/lightbox/loading.gif',
            imageBtnClose: '/img/lightbox/closelabel.gif',
            imageBtnPrev: '/img/lightbox/prevlabel.png',
            imageBtnNext: '/img/lightbox/nextlabel.png'
        });
    });
    $(".popup").prettyPhoto({show_title: false});
    
    $(".l1").focus(function() {
    	if( this.value == this.defaultValue ) {
    		this.value = "";
    	}
    }).blur(function() {
    	if( !this.value.length ) {
    		this.value = this.defaultValue;
    	}
    }); 
});
