');
$('.flashy').css({
'height' : imgY,
'width' : imgX
});
$('.flash').css('opacity', 1).stop(0).animate({
opacity: 0
}, (clockW / 1.5), function() {
$(this).detach();
});
}
function compileInfo(property) {
var galleryX = $(gallery).width();
var galleryY = $(gallery).height();
$(galleryTar).before('
');
$('#preloader div').css({
'width' : galleryX,
'height' : galleryY
});
$(galleryAssets).stop(0).animate({
opacity: 0
}, clockW, function() {
$('#img-holder div.retrieved-from, div.info div.prop.logo a, div.prop.desc .desc').remove();
runInfo(property);
var loaded = 0;
var imgLength = $('.info').find('img').length;
$('.info img').load(function() {
++loaded;
if( loaded === imgLength ) {
$(galleryAssets).stop(0).animate({
opacity: 1
}, clockW, function() {
$('div#preloader').remove();
});
$('#img-holder .retrieved-from').cycle(0);
}
});
});
}
function runInfo(property) {
$(galleryTar).attr('name',property)
$('#img-holder').prepend('
');
$('#' + property + '.prop').find('li.images #prop-images li').each(function() {
var imgSrc = $(this).attr('data-image');
$('
![]('%20+%20imgSrc%20+%20')
').appendTo('.retrieved-from.' + property);
});
$('.retrieved-from').find('img').each(function() {
$(this).css({
'height' : '140px',
'width' : '246px',
});
if($('body').hasClass('mozilla') == true) {
$(this).css('box-shadow' , '#000 0em 0em 0em');
}
});
attachCycle();
var propWebsite = $('#' + property + '.prop').find('li.website').text();
$('div.buttons a.website').attr({
'href' : propWebsite,
'target' : '_blank'
});
var propLogo = $('#' + property + '.prop').find('li.logo').attr('data-image');
$('
![' + property +']('%20+%20propLogo%20+%20')
').appendTo('div.info div.prop.logo');
var propMap = $('#' + property + '.prop').find('li.map').text();
$('div.buttons a.map').attr({
'href' : propMap,
'target' : '_blank'
});
var propWebcam = $('#' + property + '.prop').find('li.webcam').text();
if(propWebcam == '') {
$('div.buttons a.map').parent().css('margin-right','0');
$('div.buttons a.webcam').css('display','none');
}
else {
$('div.buttons a.map').parent().css('margin-right','20px');
$('div.buttons a.webcam').css('display','inline-block');
}
var propDesc = $('#' + property + '.prop').find('li.description').html();
$('
' + propDesc + '
').appendTo('div.info div.prop.desc');
$('div.prop.desc').scrollTop( 0 );
}
function attachCycle() {
$('#img-holder .retrieved-from').stop().cycle({
fx: 'custom',
cssFirst: {
width: '246px',
height: '140px',
padding: 0,
margin: 0
},
cssBefore: {
left: '0px',
top: '0px',
width: '246px',
padding: '0px',
margin: '0px',
height: '140px',
opacity: 1,
display: 'block'
},
animIn: {
left: '0px',
top: '0px',
width: '246px',
padding: '0px',
margin: '0px',
height: '140px'
},
animOut: {
left: '0px',
top: '0px',
width: '246px',
padding: '0px',
margin: '0px',
height: '140px',
opacity: 0
},
cssAfter: {
width: '246px',
padding: '0px',
margin: '0px',
height: '140px',
display: 'none'
},
easeIn: 'easeInQuad',
easeOut: 'easeOutQuad',
speed: 700,
startingSlide: 0,
sync: true,
next: '.next',
prev: '.prev'
});
}
function reviveVideo(videolocation) {
var galleryX = $(gallery).width();
var galleryY = $(gallery).height();
$('#img-holder .retrieved-from').stop().cycle('pause');
$(gallery).before('
');
$('#fadeov').animate({
height: galleryY,
opacity: .5
}, (clockW * 0.2), function() {
$('#fadeov').parent().before('
');
var closeloc = $('#videoov').position();
var closeoffset = $('#videoov').width();
$('.close_ov').css({
'left' : (closeloc.left + closeoffset),
'top' : closeloc.top - 10
});
$('#videoov').animate({
opacity: 1
}, (clockW * 0.4), function() {
$('#videoov').append('
');
$('.close_ov').on('click',closeov);
});
});
}
function wink(objA,objB) {
$(objA).css('opacity',0.4).stop(0).animate({
opacity: 1
}, objB);
}
$('.wink').each(function() {
$(this).click(function() {
wink(this,(clockW * 0.4));
});
});
$('.wink-me').each(function() {
$(this).mouseenter(function() {
wink(this,clockW);
});
});
/*$('.wink').each(function() {
$(this).click(function() {
$(this).css('opacity',0.4).stop(0).animate({
opacity: 1
}, (clockW * 0.2));
});
});*/
function closeov() {
$('#ov_par.ov_fade').detach();
$('#ov_par.ov_vid').detach();
$('#img-holder .retrieved-from').stop().cycle('resume');
}
$('ul#track li a').each(function() {
$(this).attr('href','javascript:void(0)');
});
$('.buttons .webcam').click(function() {
var propURL = $('.buttons').find('.website').attr('href');
webcamWindow(propURL);
});
});
Your Home Away From Home