function wo(link,ww,hh,title) {
w=window.open(link,'',(ww ? 'width='+ww+',' : '')+(hh ? 'height='+hh+',' : '')+'toolbar=0,scrollbars=0,resizable=yes');
w.document.open();
w.document.write('
'+title+'');
w.document.write('');
w.document.close();
w.print();
w.focus();
}
$(document).ready(function(){
resizeHandler();
$(window).bind('resize', resizeHandler);
/* переделываем селекты */
$('.select, #salonSelect').selectbox();
/* фотографии в фоне */
$('.photo').cycle({
timeout: 10000
});
$(".wrapStroy .allItems .item").hover(function() {
$(this).children('h3').animate({ backgroundColor: "#ffd925" }, 250);
$(this).children('ul').animate({ backgroundColor: "#ffffff" }, 250);
},function() {
$(this).children('h3').animate({ backgroundColor: "#ffffff" }, 500);
$(this).children('ul').animate({ backgroundColor: "#ECECEC" }, 500);
});
$(".wrapStroy .generalItems td").hover(function() {
$(this).animate({ backgroundColor: "#ffd925" }, 250);
},function() {
$(this).animate({ backgroundColor: "#ffffff" }, 500);
});
{ // search
$('#search a').click(function(){
if($(this).hasClass('opened')){
$(this).removeClass('opened');
$('button' ,$(this).parents('div')).removeClass('show');
$('.button' ,$(this).parents('div')).show();
$('.form' ,$(this).parents('div')).animate({ width: 16 }, 250);
} else {
$(this).addClass('opened');
$('button' ,$(this).parents('div')).addClass('show');
$('.button' ,$(this).parents('div')).hide();
$('.form' ,$(this).parents('div')).animate({ width: 152 }, 250);
}
return false;
});
}
{ // Выбор плитки
/* Draggable select */
$('.mainSelect .title').click(function(){
$(this).parent('.mainSelect').toggleClass('open');
})
$('.mainSelectList>li span.item').click(function(){
if($(this).parent('li').is('.active')){
$(this).parent('li').removeClass('active');
}else{
$('.mainSelectList>li').removeClass('active');
$(this).parent('li').addClass('active');
}
});
$('.checkList .close').click(function(){
$(this).parent().parent('li').removeClass('active');
});
$('.mainSelect').draggable({
handle: '.drag',
containment: '.wrapper',
scroll: false
});
}
// ????
{
$('.filterTitle').click(function(){
$(this).parent('.filter').toggleClass('active');
})
if ($('.floatFilter').length){
var top = $('.floatFilter').offset().top - parseFloat($('.floatFilter').css('marginTop').replace(/auto/, 0));
$(window).scroll(function (event) {
var y = $(this).scrollTop();
if (y >= top) {
$('.floatFilter').addClass('fixed');
} else {
$('.floatFilter').removeClass('fixed');
}
});
}
}
if ($('#historyFlash').length){
var _playerVersion = $.flash.version,
_majorVersion = _playerVersion.major;
if (_majorVersion >= 9){
$('#historyFlash').flash({
swf: _root + 'public/flash/history.swf',
width: 100+'%',
height: 280,
wmode: 'opaque',
bgcolor: '#ECECEC',
flashvars: {
XMLHistoryURL: _root+'public/flash/history.xml', // + '?rand=' + Math.random(),
imagesURL: _root+'public/flash/history/'
}
});
//$('.content h1').css('margin-bottom','310px');
} else {
$('#historyFlash').hide();
}
}
});
var resizeHandler = function () {
var ww = $('body').width(),
hh = $('body').height();
if(ww > 1600){
$('.map').css('right', (-300+(1600-ww)/2));
}
if($.browser.msie){
if(ww > 1600){
$('.photo .blank').css('width', ww);
} else {
$('.photo .blank').css('width', 1600);
}
}
}