';
$('block').appendChild(d);
}
function music(start, userControlled) {
if (start == undefined) start = playing ? 0 : 1;
else if (start == playing) return false; // neni treba nic delat
if (start == 1 && getCookie('no_music') == '1' && !userControlled) {
return false; // nehrajeme
}
if (start) { // play
playing = 1;
$('myPlayer').SetVariable("method:play", "");
$('myPlayer').SetVariable("enabled", "true");
} else {
playing = 0;
$('myPlayer').SetVariable("method:pause", "");
}
if (userControlled) {
setCookie('no_music', start ? '0' : '1', 60 * 24 * 7, '/'); // tyden
}
return false;
}
*/
var ph = {
slideshow: function (start) {
if (start == undefined) start = ph.sliding ? 0 : 1;
else if (start == ph.sliding) return false; // neni treba nic delat
if (start) {
ph.tid_sliding = setTimeout(function () {
ph.getPhoto(1);
}, 2500);
ph.sliding = 1;
//$('phSlideshow').className = 'slideOn';
} else {
clearTimeout(ph.tid_sliding);
ph.sliding = 0;
//$('phSlideshow').className = '';
}
return false;
},
music: function (start, userControlled) {
return false;
music(start, userControlled);
if (playing) {
$('phMusic').className = 'musicOn';
} else {
$('phMusic').className = '';
}
return false;
},
show: function (alink, all_galerie) {
ph.all_galerie = all_galerie == 1 ? 1 : 0;
if (!ph.init) { // prvni spusteni
ph.init = 1;
addEvent(document, 'keydown', fnArrows);
//--- popMask
ph.mask = document.createElement('div');
ph.mask.id = 'popMask';
ph.mask.onclick = ph.hide;
document.body.appendChild(ph.mask);
//--- preloader
ph.preloader = document.createElement('div');
ph.preloader.id = 'preloader';
document.body.appendChild(ph.preloader);
//--- popBar
ph.bar = document.createElement('div');
ph.bar.id = 'popBar';
// ' ';
ph.bar.innerHTML = ' / ';
document.body.appendChild(ph.bar);
ph.objCur = $('photos_cur');
ph.objTotal = $('photos_total');
//--- popWrap
ph.wrap = document.createElement('div');
ph.wrap.id = 'popWrap';
ph.wrap.onclick = ph.hide;
ph.img = document.createElement('img');
ph.wrap.appendChild(ph.img);
document.body.appendChild(ph.wrap);
}
//var img=alink.getElementsByTagName('IMG')[0];
var s = alink.href;
if (ph.preloadPath == s) return; // fotka se ted nacita
ph.preloadPath = s;
if (ph.im) ph.im.onload = function () {};
ph.im = new Image();
ph.im.onload = ph.loaded;
// najdeme fotogalerii
if (all_galerie) {
var i, j, k = 0,
as, divs = document.getElementsByTagName('DIV');
ph.ct = [];
for (i = 0; i < divs.length; i++) {
if (divs[i].className == 'galerie') {
as = divs[i].getElementsByTagName('A');
for (j = 0; j < as.length; j++) {
ph.ct[k++] = as[j];
}
}
}
} else {
ph.ct = getParent(alink, 'div').getElementsByTagName('A');
}
ph.total = ph.ct.length;
// soucet fotek
ph.objTotal.innerHTML = ph.total;
//--- ukazeme preloader
if (ph.view) { // zobrazuje fotogalerii => ukazeme preloader na aktualni fotce
obj = ph.wrap;
} else {
obj = alink;
}
var xy = findOffset(obj);
ph.preloader.style.left = (xy[0] + (obj.offsetWidth / 2) - 16) + 'px';
ph.preloader.style.top = (xy[1] + (obj.offsetHeight / 2) - 16) + 'px';
ph.preloader.style.display = 'block';
//window.setTimeout(function(){
ph.im.src = s;
//},1000);
// zapneme hudbicku - bez force!
ph.music(1);
return false;
},
hide: function () {
ph.bar.style.display = 'none';
ph.mask.style.display = 'none';
ph.wrap.style.display = 'none';
ph.view = 0;
ph.slideshow(0); // vypneme
ph.music(0); // vypneme hudbicku
},
loaded: function () {
dcl = 0;
if (ph.sliding) {
clearTimeout(ph.tid_sliding);
ph.tid_sliding = setTimeout(function () {
ph.getPhoto(1);
}, 2500);
}
if (ph.preloadPath != ph.im.src) return;
ph.preloadPath = '';
ph.preloader.style.display = 'none'; // schovame preloader
// maska
var wh = innerSize();
if (wh[1] < $('block').offsetHeight) wh[1] = $('block').offsetHeight;
ph.mask.style.height = (wh[1] > document.body.offsetHeight ? wh[1] : document.body.offsetHeight) + 'px';
ph.mask.style.display = 'block';
ph.view = 1; // zobrazili jsme panel
if (ph.total > 0) {
// najdeme pozici fotky
ph.cur = 0;
for (i = 0; i < ph.ct.length; i++) {
if (ph.ct[i] == ph.im.src) ph.cur = i;
}
ph.objCur.innerHTML = ph.cur + 1; // aktualni pozice fotky
//--- zobrazime panel
ph.bar.style.top = getScrollTop() + 'px';
ph.bar.style.display = 'block';
//--- preload dalsich 2 fotek
var s = ph.getPhotoSrc(1);
if (s) new Image().src = s;
var s = ph.getPhotoSrc(2);
if (s) new Image().src = s;
}
//--- zobrazime fotku pres cely monitor
// 35 = dame vetsi rezervu kvuli scrollbaru
var w = wh[0] - 40,
h = wh[1] - ph.bar.offsetHeight - 4; // 4=border wrapu
var w2 = ph.im.width,
h2 = ph.im.height;
var c = 1;
if (w2 > w) c = w2 / w; // koef zmenseni
if (h2 / c > h) c = h2 / h;
w2 = Math.round(w2 / c, 0);
h2 = Math.round(h2 / c, 0);
ph.img.width = w2;
ph.img.height = h2;
ph.img.src = ph.im.src;
ph.wrap.style.top = getScrollTop() + ph.bar.offsetHeight + 10 + 'px'; // + (h / 2) - (h2 / 2) - 2 + 'px'; // zarovname doprostred
ph.wrap.style.left = ((wh[0] - 22) / 2) - (w2 / 2) - 2 + 'px'; // scrollbar = 22
ph.wrap.style.display = 'block';
},
getPhotoSrc: function (move) {
var cur = ph.cur + move;
if (cur >= ph.ct.length) cur = 0;
if (cur < 0) cur = ph.ct.length - 1;
return ph.ct[cur].href;
},
getPhoto: function (move, returnPath) {
var cur = ph.cur + move;
if (cur >= ph.ct.length) cur = 0;
if (cur < 0) cur = ph.ct.length - 1;
ph.show(ph.ct[cur], ph.all_galerie);
return false;
}
}
function move2anchor(s, fnDone, mydiff) {
var o = $(s);
if (typeof mydiff == 'undefined') mydiff = 0;
if (!o) return false;
var fin = findOffset(o)[1] - 10 + mydiff;
var vh = getViewportHeight();
var isAbove = (vh/2 > (fin - sct));
if (sct == fin) fin = isAbove ? fin-100 : fin+100; // moves up or down if it is same, so visitor sees difference
if (fin < 0) fin=0;
smoothScrollTo(fin, fnDone);
return false;
}
function smoothScrollTo(y, fnDone) {
var sct = getScrollTop();
gtimer.add(400, 'sin', function (n) {
window.scrollTo(0, n);
}, sct, y, fnDone, 'anchoring');
}
function getViewportHeight() {
if (window.innerHeight != window.undefined) return window.innerHeight;
if (document.compatMode == 'CSS1Compat') return document.documentElement.clientHeight;
if (document.body) return document.body.clientHeight;
return window.undefined;
}
//--------------------------- SLIDE SHOW
var curim = [],
immax = [],
im = [],
animating = [],
xplaying = [],
tid = []; // definice fotoalb
function goplay(what, force) {
if (xplaying[what] && (force === 0 || force !== 1)) {
xplaying[what] = 0;
clearInterval(tid[what]);
$('bplay_' + what).className = 'bplay';
} else if (!xplaying[what] && (force === 1 || force !== 0)) {
var cur = curim[what];
$('slideshow_' + what).style.height = (im[what][cur].height + 48) + 'px';
xplaying[what] = 1;
$('bplay_' + what).className = 'bplay2';
tid[what] = setInterval(function () {
gopic(what, 1, 1);
}, 2500);
}
}
function gopic(what, i, animator) {
if (animating[what]) return;
if (!animator && tid[what]) goplay(what, 0); // vypnem slideshow
animating[what] = 1;
curim[what] += i;
if (curim[what] >= immax[what] && xplaying[what]) goplay(what);
if (curim[what] < 0) curim[what] = immax - 1;
if (!im[what][curim[what]]) curim[what] = 0;
var cur = curim[what];
var o = $('image2_' + what);
o.src = im[what][cur].src;
o.width = im[what][cur].width;
o.height = im[what][cur].height;
o.style.left = (730 / 2 - Math.round(im[what][cur].width / 2)) + 'px';
setOpacity(o, 0);
o.style.display = 'block';
var o2 = $('image_' + what);
setOpacity(o2, 10);
gtimer.add(500, 'sin', function (n) {
setOpacity(o2, n);
}, 10, 0, null, 'x');
gtimer.add(500, 'sin', function (n) {
setOpacity(o, n);
}, 0, 10, function () {
//o2.id='image3_'+what;
o.id = 'image_' + what;
o2.id = 'image2_' + what;
}, 'x2');
setTimeout(function () {
animating = 0;
}, 500);
$('slideshow_' + what).style.height = (im[what][cur].height + 48) + 'px';
$('pgno2_' + what).getElementsByTagName('SPAN')[0].innerHTML = cur + 1;
}
function setCookie(name, value, expires, path, domain, secure) {
var today = new Date();
today.setTime(today.getTime());
if (expires) expires *= 1000 * 60; // minutes (miliseconds)
var expires_date = new Date(today.getTime() + expires);
document.cookie = name + "=" + escape(value) +
((expires) ? ";expires=" + expires_date.toGMTString() : "") +
((path) ? ";path=" + path : "") +
((domain) ? ";domain=" + domain : "") +
((secure) ? ";secure" : "");
}
function getCookie(name) {
var nameEQ = name + '=';
var cookie_value = '';
var ca = unescape(document.cookie);
ca = ca.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i].replace(/^\s+|\s+$/g, '');
if (c.indexOf(nameEQ) == 0) {
cookie_value = c.substring(nameEQ.length, c.length);
break;
}
}
return cookie_value ? cookie_value : null;
}
function setOpacity(o, v) {
o.style.opacity = v / 10;
o.style.filter = 'alpha(opacity=' + v * 10 + ')';
}
function setOpacity2(o, v) {
o.style.opacity = v / 100;
o.style.filter = 'alpha(opacity=' + v + ')';
}
function win(url, w, h, x) {
var opts;
if (x) opts = x;
else opts = 'scrollbars=1,resizable=1,location=0,status=1';
if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4) {
var s = window.open(url, '', opts)
s.resizeTo(w, h)
s.moveTo(50, 100);
} else window.open(url, '', opts + ',width=' + w + ',height=' + h)
return false
}
function fsearch(i) {
document.getElementById('findsub').style.background = 'url(' + i + ')';
}
function qt(i) {
var x = document.getElementById('qty' + i);
x.value = (x.value == false ? '1' : '');
}
var last;
var lastbtn;
var lasti;
var h = false;
function opensubcat(i, o) {
h = false;
if (last) last.style.display = 'none';
if (lastbtn) lastbtn.className = 'cat_' + lasti;
if (document.getElementById('subcats_' + i)) {
o.className = 'cat_' + i + ' caton';
var sc = document.getElementById('subcats_' + i);
sc.style.left = o.offsetLeft + 'px';
sc.style.top = (o.offsetTop + 39) + 'px';
sc.style.display = 'block';
last = sc;
lastbtn = o;
lasti = i;
}
}
function hidesubcat(i) {
h = true;
window.setTimeout("hide(" + i + ")", 300);
}
function hide(i) {
window.clearTimeout();
if (h && document.getElementById('subcats_' + i)) {
document.getElementById('subcats_' + i).style.display = 'none';
if (lastbtn) lastbtn.className = 'cat_' + lasti;
}
}
function addEvent(elm, evType, fn, useCapture) {
if (elm.addEventListener) {
elm.addEventListener(evType, fn, useCapture);
return true;
} else if (elm.attachEvent) {
var r = elm.attachEvent('on' + evType, fn);
return r;
} else {
elm['on' + evType] = fn;
}
}
function removeEvent(elm, evType, fn, useCapture) {
if (elm.removeEventListener) {
elm.removeEventListener(evType, fn, useCapture);
return true;
} else if (elm.detachEvent) {
var r = elm.detachEvent('on' + evType, fn);
return r;
} else {
elm['on' + evType] = fn;
}
}
var sct = 0;
var winh = 0;
var sct0 = 0;
function showMyPic(o) {
var url = o.href;
var wdb = window.document.body;
var mask = $('popupMask');
var inner = $('popupInner');
var img = $('popupImg');
if (!mask) {
mask = document.createElement('div');
mask.id = "popupMask";
addEvent(mask, 'click', function () {
hideMyPic();
});
wdb.appendChild(mask);
}
if (!inner) {
inner = document.createElement('div');
inner.id = "popupInner";
addEvent(inner, 'click', function () {
hideMyPic();
});
img = document.createElement('img');
img.id = "popupImg";
inner.appendChild(img);
wdb.appendChild(inner);
}
//------------
if (typeof (window.pageYOffset) == 'number') { //Netscape compliant
sct = window.pageYOffset;
} else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) { //DOM compliant
sct = document.body.scrollTop;
} else {
sct = document.documentElement.scrollTop;
}
if (typeof (window.innerWidth) == 'number') { //Non-IE
winh = window.innerHeight;
} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { //IE 6+
winh = document.documentElement.clientHeight;
} else { //IE 4 compatible
winh = document.body.clientHeight;
}
//------------
mask.style.top = sct + 'px';
mask.style.height = winh + 'px';
sct0 = sct;
addEvent(top.window, 'scroll', noscroll);
mask.style.display = 'block';
preimg = new Image();
addEvent(preimg, 'load', function () {
picOnLoad(url);
});
preimg.src = url;
return false;
}
function picOnLoad(url) {
var h = preimg.height;
$('popupImg').src = url;
var inner = $('popupInner');
inner.style.top = (sct + winh / 2 - h / 2) + 'px';
inner.style.display = 'block';
}
function noscroll() {
window.scrollTo(0, sct0);
}
function hideMyPic() {
removeEvent(top.window, 'scroll', noscroll);
removeEvent(preimg, 'scroll', noscroll);
$('popupMask').style.display = 'none';
$('popupInner').style.display = 'none';
}
//-----------------------------------------------------------------------------------
// TIMER PROTOTYPE (c)2008 Martin Zvarik
// - v pripade pouziti mi prosim dejte vedet: mzvarik@gmail.com, jen ze zvedavosti =)
//-----------------------------------------------------------------------------------
function timer(interval, onAllComplete) {
this.interval = interval;
this.actions = [];
this.starttime = [];
this.finished = 0;
var _this = this;
this.timerDelegate = function () {
_this.onTimer()
};
this.onAllComplete = onAllComplete;
}
timer.prototype = {
add: function (actions, id, onFinish) {
this.actions[id] = [];
for (var i = 0; i < actions.length; i++) {
var duration = actions[i][0];
var nStart = actions[i][3];
var nEnd = actions[i][4];
var nCurrent = actions[i][5];
var nDiff = (nEnd > nStart) ? nEnd - nStart : nStart - nEnd;
if (nCurrent != undefined && nCurrent != nStart) {
duration = duration / nDiff * (nEnd > nCurrent ? nEnd - nCurrent : nCurrent - nEnd);
nStart = nCurrent;
nDiff = (nEnd > nStart) ? nEnd - nStart : nStart - nEnd;
}
this.actions[id][i] = [duration, actions[i][1], actions[i][2], nStart, nEnd, nDiff];
}
this.onFinish = onFinish;
},
start: function (id) {
this.starttime[id] = new Date().getTime();
if (!this.intID) this.intID = window.setInterval(this.timerDelegate, this.interval); // jenom jeden interval vzdy
},
startAll: function () {
this.finished = 0;
for (var i = 0; i < this.actions.length; i++) {
this.start(i);
}
},
hasAllFinished: function () {
if (this.finished == this.actions.length) {
if (this.onAllComplete) this.onAllComplete();
window.clearInterval(this.intID);
}
},
onTimer: function () {
var i, id, elapsed, progress, moved = 0,
movement = 0;
var now = new Date().getTime();
for (id in this.actions) {
for (i = 0; i < this.actions[id].length; i++) {
elapsed = now - this.starttime[id];
if (this.actions[id][i][0] <= elapsed) {
movement = this.actions[id][i][4];
this.actions[id][i][2](movement);
this.actions[id].splice(i, 1);
} else {
moved = 1;
progress = this.actions[id][i][0] / elapsed;
if (this.actions[id][i][1] == 'sqsin') {
movement = Math.sqrt(Math.cos((1 - 1 / progress) * Math.PI / 2)) * this.actions[id][i][5];
} else if (this.actions[id][i][1] == 'sin') {
movement = Math.cos((1 - 1 / progress) * Math.PI / 2) * this.actions[id][i][5]; // tady mam neco spatne
} else if (this.actions[id][i][1] == 'cos') {
movement = Math.sin((1 / progress) * Math.PI / 2) * this.actions[id][i][5];
} else {
movement = this.actions[id][i][5] / progress;
}
if (this.actions[id][i][3] > this.actions[id][i][4]) {
movement = this.actions[id][i][3] - movement;
} else {
movement = this.actions[id][i][3] + movement;
}
this.actions[id][i][2](movement);
}
}
}
if (!moved) {
if (this.onFinish) this.onFinish();
this.finished++;
this.hasAllFinished();
}
}
}
var regenerated = 0;
function regenerate(o) // captcha
{
if (++regenerated > 2) return;
o.src = o.src + '®enerate=1';
}
//------------------------------- TIMER, Martin Zvarik
var gtimer = {
add : function(duration, type, fx, nStart, nEnd, donefx, uid, dontStart){
var t=this;
if(typeof t.idcounter=='undefined') t.idcounter = 0;
if(typeof t.actions=='undefined') t.actions = [];
if(typeof t.starttime=='undefined') t.starttime = [];
if(typeof t.done=='undefined') t.done = []; // uklada se sem done(id) nebo done(id,i)
if(typeof t.uid2id=='undefined') t.uid2id = [];
var act, ta = t.actions, id, i=0, nDiff = (nEnd > nStart) ? nEnd-nStart : nStart-nEnd;
if(uid && t.uid2id[uid]>0){
if(!dontStart) t.stopUID(uid);
id = t.uid2id[uid];
}else{
id = ++t.idcounter;
if(uid) t.uid2id[uid] = id;
}
act = [duration, type, fx, nStart, nEnd, nDiff];
if(ta[id]){
i=ta[id].length;
ta[id][i] = act;
}else
ta[id] = [act];
if(donefx) t.done[id+','+i] = donefx;
if(!dontStart) t.start(id);
return id;
},
stopUID : function(uid, forceFinish){
var t=this;
if(typeof t.uid2id!='undefined' && t.uid2id[uid]>0) t.stop(t.uid2id[uid], forceFinish);
},
startUID : function(uid){
var t=this;
if(typeof t.uid2id!='undefined' && t.uid2id[uid]>0) t.start(t.uid2id[uid]);
},
stop : function(id, forceFinish){ // forceFinish TODO
var t=this, i, ta=t.actions;
if(ta[id]){
if(forceFinish){
for(i=0; i ta[id][i][4]) ? ta[id][i][3] - movement : ta[id][i][3] + movement;
movement = Math.round(movement);
ta[id][i][2](movement);
}
}
if(!moved){
ta[id] = 0; // tato skupina se uz nebude prochazet
if(t.done[id]){
t.done[id]();
t.done[id] = 0;
}
moved = 1; // ukoncime to az priste, v uzivatelske funkci muze byt dalsi gtimer, a ted bysme ho zastavili
}
}
if(!moved) t.die(); // pokud se nic nepohlo => koncime
},
/*isDone : function(uid){
},
onDone : function(uid, fn){
var t=this;
if(t.uid2id[uid]>0) t.done[t.uid2id[uid]] = fn;
},*/
die : function(){
var t=this;
window.clearInterval(t.intID);
t.intID = 0;
t.actions = [];
t.starttime = [];
t.done = [];
}
}
WEDDING
Celebrating Life with Flowers
Welcome to Halladay's Flowers & Gifts!
Our creative design team is here to help you add even more beauty into your special day!
We are madly in love with flowers, and find ourselves inspired by nature and the beautiful landscape here in Vermont, every day!
We have helped make over 500 fresh and unique wedding dreams come true. We work closely with our clients, and will make sure everything is exactly how it should be on your wedding day.
Let us bring your wedding vision to life!
Marsha and your Halladay's Team
Please call 802-463-3331 or submit an event inquiry to halladaysflowers@gmail.com with your name, contact information and the date of your event and location.
If your date is available we will be happy to consult with you by phone or in person by appointment.
Pinterest boards are a great way to share ideas.
We will be happy to draw up a proposal with pricing.
If you would like Halladays to create your wedding flowers a deposit is required for us to hold your date.