File: /home/design11/dreamweddinggroup.com/javascripts/application.js
jQuery.fn.extend({
replaceText: function(html){
this.live('click',function(e){
var right_side = $('.replacable');
$(right_side).fadeOut(1300, function(){
right_side.empty();
right_side.load(html, function(){
right_side.find('.transparent').supersleight();
right_side.delay(1000).fadeIn(1300);
});
});
e.stopPropagation();
});
},
loadNewPage: function(html){
var content = $('#content');
this.click(function(){
content.fadeOut(1300, function(){
content.empty();
content.find('.transparent').supersleight();
content.load(html, function(){
content.fadeIn(1300);
});
});
});
}
});
var app = {
setupEventListCallbacks: function(){
$('#original_wedding').replaceText("events/orig_wedding_expo.html");
$('#south').replaceText("events/sne_bridal_expo.html");
$('#grand_bridal').replaceText("events/grand_bridal_expo.html");
$('#newport_bridal').replaceText("events/newport_bridal_show.html");
},
setupVendorListCallbacks: function(){
$('#tuxedo').replaceText("vendors/tuxedo.html");
$('#catering').replaceText("vendors/catering.html");
$('#florist').replaceText("vendors/florist.html");
$('#limo').replaceText("vendors/coming_soon.html");
$('#minister').replaceText("vendors/coming_soon.html");
$('#bridal').replaceText("vendors/bridal.html");
$('#band').replaceText("vendors/band.html");
$('#cakes').replaceText("vendors/cakes.html");
$('#chocolate').replaceText("vendors/chocolate.html");
$('#dj').replaceText("vendors/dj.html");
$('#designs').replaceText("vendors/designs.html");
$('#linens').replaceText("vendors/designs.html");
$('#hair').replaceText("vendors/hair.html");
$('#massage').replaceText("vendors/massage.html");
$('#photo').replaceText("vendors/photo.html");
$('#singer').replaceText("vendors/coming_soon.html");
$('#travel').replaceText("vendors/travel.html");
$('#video').replaceText("vendors/video.html");
},
fadeInMenu: function(){
$('.menu').hide();
$('#menu').hide();
$('#menu').fadeIn(1750, function(){
$('.menu').fadeIn(1000);
});
},
setupMenuCallbacks: function(){
$('#about_us').loadNewPage("about_us.html");
$('#vendors').loadNewPage("vendors.html");
$('#why_us').loadNewPage("why.html");
$('#calender').loadNewPage("calender.html");
$('#home').click(function(){
var content = $('#content');
content.fadeOut(1000, function(){
content.empty();
});
});
},
setupBackgroundImage: function(){
$.fn.supersized.options = {
startwidth: 4,
startheight: 3,
vertical_center: 1,
slideshow: 1,
navigation: 0,
transition: 1, //0-None, 1-Fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left
pause_hover: 0,
slide_counter: 1,
slide_captions: 1,
slide_interval: 15000
};
$('#supersize').supersized();
}
};
$(window).load(
function() {
$("#pictureContainer").css("display", "block");
}
);
jQuery(function(){
app.setupBackgroundImage();
app.setupEventListCallbacks();
app.setupVendorListCallbacks();
app.setupMenuCallbacks();
app.fadeInMenu();
});