/** -------------------- Start js code for dock -------------------- */
document.write('');
document.write('');
// helper function for appending to onload
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
/** -------------------------------------- Start Left dock -------------------------------------- */
function mlUpdateModelPosition()
{
var model = document.getElementById('model');
var slide = document.getElementById('ml_slide');
slide.style.height = document.body.clientHeight;
slide.style.top = document.body.scrollTop;
model.style.top = (document.body.clientHeight/2) - 179;
}
addLoadEvent(function() {
jQuery.noConflict();
var content = '
' +
'
' +
'
' +
'
';
window.setTimeout(function() {
jQuery('#ml_slide').animate({ left: "-700px"}, 1000, function() {});
}, 3 * 1000);
jQuery("body").append(content);
jQuery('#model').click(toggleSlide);
// resize our left slide if we are using ie
if (navigator.appName == 'Microsoft Internet Explorer') {
jQuery('#ml_slide').width(710);
};
jQuery(function(){jQuery().pngFix( { blankgif:'//promos.meetlocals.com/images/blank.gif', element:'#model' } );});
jQuery(document).click(function(e) {
var position = jQuery('#ml_slide').position();
if ((e.pageX > jQuery('#ml_slide').width() - position.left + 50) && position.left == 0) {
toggleSlide();
}
});
mlUpdateModelPosition();
window.onresize = mlUpdateModelPosition;
window.onscroll = mlUpdateModelPosition;
});
function toggleSlide()
{
var position = jQuery("#ml_slide").position();
if (position.left <= -700) {
jQuery('#ml_slide').stop().animate({ left: "0px"}, 1000);
} else {
jQuery('#ml_slide').stop().animate({ left: "-700px"}, 1000);
}
}