// jQuery stuff
var $ = jQuery.noConflict();
jQuery(document).ready(function() {

	$("h2:contains('Store Locations')").addClass("places");
	$("#field_1_6 #input_1_6_1, #input_1_6_1_label").hide();

	//jQuery(".portfolio_grid img").hide();
    
    jQuery('.portfolio_grid img').load(function(){
		jQuery(this).fadeIn("slow");
	});
    
	jQuery("#slideshow .slides-nav").hide();
	
    jQuery(".nav li a").last().addClass("last");
    jQuery("#footer .footer-widget li").last().addClass("last");
     jQuery("#footer .footer-widget li").first().addClass("first");
    jQuery(".portfolio_grid li").last().addClass("last");
    
    
    jQuery('.portfolio-head-img').load(function(){
		jQuery(".caption").animate({
			top: "215px"
		}, "easeInBounce");
	});
    
	jQuery(".portfolio-head-img, .rollover").fadeTo(0, 1);
	jQuery(".phone-pop").hide();
	jQuery(".scrollButtons").fadeTo(0, 0);
    jQuery(".rollover img, .portfolio_grid img, .portfolio-head-img").hover(function(){
	jQuery(this).fadeTo("slow", .3);
	},function(){
	jQuery(this).fadeTo("slow", 1.0);
	});
	
	jQuery(".scrollButtons, .panel").hover(function(){
	jQuery(".scrollButtons").fadeTo("fast", 1.0); // This should set the opacity to 100% on hover
	},function(){
	jQuery(".scrollButtons").fadeTo("fast", 0); // This should set the opacity back to 60% on mouseout
	});
	

/* to top */
jQuery(function () {
    jQuery(window).scroll(function () {
        if (jQuery(this).scrollTop() >=150) {
            jQuery('#toTop').fadeIn();
        } else {
            jQuery('#toTop').fadeOut();
        }
    });
    jQuery('#toTop').click(function () {
        jQuery('body,html').animate({
            scrollTop: 0
        },
        800);
    });
});
/* to top */
    
  }
);

