﻿$(document).ready( function() {
	$( "a[rel='fancy-tour']" ).fancybox({
		hideOnContentClick: true,
		overlayShow: true,
		overlayOpacity: 0.5,
		zoomSpeedIn: 1500,
		zoomSpeedOut:600
	});
	
	
});

getAnswer = function(id) {
	display = document.getElementById( 'ans_' + id ).style.display;
	
	if ( display == 'block' ) {
		$( '#que_' + id ).removeClass( 'que_act' );
		document.getElementById( 'ans_' + id ).style.display = 'none';
	} else {
		$( '#que_' + id ).addClass( 'que_act' );
		document.getElementById( 'ans_' + id ).style.display = 'block';
	}
getAddress = function(id) {
	display = document.getElementById( 'full_' + id ).style.display;
	
	if ( display == 'block' ) {
		$( '#short_' + id ).removeClass( 'que_act' );
		
		$( '#short_' + id ).removeClass( 'city-minus' );
		$( '#short_' + id ).addClass( 'city-plus' );
		
		document.getElementById( 'full_' + id ).style.display = 'none';
	} else {
		$( '#short_' + id ).addClass( 'que_act' );
		
		$( '#short_' + id ).removeClass( 'city-plus' );
		$( '#short_' + id ).addClass( 'city-minus' );
		
		document.getElementById( 'full_' + id ).style.display = 'block';
	}
}

winPopup = function(pic, width, height, title) {
	win = window.open( '', 'displayWindow', 'width=' + width + ',height=' + height + ',status=0,toolbar=0,menubar=0,location=0,left=200,top=100' );
	
	win.document.open();
	win.document.writeln( '<html><head><title>' + title + '</title></head><body topmargin="0" leftmargin="0"><img onclick="javascript: self.close()" style="cursor: pointer" title="нажмите, чтобы закрыть окно" width="' + width + '" height="' + height + '" alt="" src="' + pic + '"></body></html>' );
}

	win.document.close();
}

