jQuery(document).ready(function() { var Tejani = { //Drop down menus for the top nav bar. menuDropDown: function() { jQuery('#header ul.nav li').hover( function() { var dropdown = jQuery(this).find('ul.dropdown_category'); dropdown.css('display', 'block'); }, function() { var dropdown = jQuery(this).find('ul.dropdown_category'); dropdown.css('display', 'none'); } ); //Retain the hover state for the initial tag while hovering the ul/li dropdown. jQuery('#header ul.nav li ul.dropdown_category').hover( function() { //get the original background position of the sprite. aTag = jQuery(this).siblings('a'); bgPos = aTag.css('backgroundPosition'); splitIt = bgPos.split(' '); aTag.css('backgroundPosition', splitIt[0] + ' bottom'); }, function() { aTag.css('backgroundPosition', splitIt[0] + ' 0'); } ); }, //Twitter plugin for the footer. tweet: function() { jQuery("#footer .tweet").tweet({ username: "TejaniBridal", join_text: "auto", count: 1, auto_join_text_default: "", auto_join_text_ed: "", auto_join_text_ing: "", auto_join_text_reply: "", auto_join_text_url: "", loading_text: "loading..." }); }, activateFonts: function() { try{Typekit.load();}catch(e){} }, featureRightHover: function() { jQuery('#featureRight li, #product-navigation li, #block-related li').hover( function() { jQuery(this).css('background', '#1b2059'); jQuery(this).find('h2 a').css('color', '#ffffff'); jQuery(this).find('h2').css('color', '#ffffff'); jQuery(this).find('.price').css('color', '#ffffff'); jQuery(this).find('.price-label').css('color', '#ffffff'); }, function() { jQuery(this).css('background', 'none'); jQuery(this).find('h2 a').css('color', '#222222'); jQuery(this).find('h2').css('color', '#222222'); jQuery(this).find('.price').css('color', '#666666'); jQuery(this).find('.price-label').css('color', '#444444'); } ); }, featureHomeHover: function() { jQuery('#feature .featuredImage').hover( function() { var theBg = jQuery(this).siblings('.featuredInfo').find('a'); theBg.addClass('bgBlue'); }, function() { var theBg = jQuery(this).siblings('.featuredInfo').find('a'); theBg.removeClass('bgBlue'); } ); }, stickyFooter: function() { var footer = jQuery('#footer'); footer.appendTo('body'); jQuery('.page').addClass('clearfix'); } }//End Tejani Tejani.menuDropDown(); Tejani.tweet(); Tejani.activateFonts(); Tejani.featureRightHover(); Tejani.featureHomeHover(); Tejani.stickyFooter(); });