/*  
* Custom JS
*/
$(document).ready(function(){
/*	Tooltip
/*----------------------------------------------------*/
	$('.tip').tooltip();
	
/*	Responsive Navigation
/*----------------------------------------------------*/	
	selectnav('footer-nav');

/*	prettyPhoto
/*----------------------------------------------------*/
	$("a[rel^='prettyPhoto']").prettyPhoto({social_tools: ''});
	
/*	Bx Slider
/*----------------------------------------------------*/
	$('.bxslider').bxSlider({
		controls: false, 
		mode : 'fade',	
		pager: true,
		pagerCustom: '#bx-tabs',
		auto: true
	});
	
	/* ---- Responsive Settings ----*/
	var Slides,
    width = $(window).width();
	if (width <= 360) {
		Slides = 1;
	}
	else if (width <= 767) {
		Slides = 2;
	}
	else if (width <= 960) {
		Slides = 3;
	} 
	else {
		Slides = 4;
	}
	
	$('.bxslider-media').bxSlider({
		slideWidth: 940,
		minSlides: Slides,
		maxSlides: Slides,
		useCSS: false,
		pager: false
	});
  
/*	Image Hover
/*----------------------------------------------------*/
	$('.img a').hover(function(){
		$(this).find('.zoom, .play').stop().fadeTo("slow", 1);},function() {
		$(this).find('.zoom, .play').stop().fadeTo('slow', 0);
	});
});

/*	Dropdown Navigation
/*----------------------------------------------------*/
jQuery('#main-navigation li.dropdown').hover(function() {
  jQuery(this).find('.dropdown-menu').stop(true, true).delay(100).slideDown();
}, function() {
  jQuery(this).find('.dropdown-menu').stop(true, true).delay(100).slideUp();
});