$(window).load(function() {
var startIndex = 1;
 if (window.location.hash != "") {
 startIndex = window.location.hash.substr(1);
 startIndex = startIndex - 1;
 }
 $('.flexslider').flexslider({
controlNav: true,
slideshow: false,
directionNav: true,
manualControls: '.custom-controls li a',
controlsContainer: '.flex-container',
 slideToStart: startIndex 
  });
 
 });

//$("img.lazy").lazyload({ 
//    effect : "fadeIn",
//    threshhold: 200
//});


//$("h2").each(function() {
//        var wordArray = $(this).text().split(" ");
//        wordArray[wordArray.length-2] += "&nbsp;" + wordArray[wordArray.length-1];
//        wordArray.pop();
//        $(this).html(wordArray.join(" "));
//});

$(document).ready(function(){
		$('#select_nav').mobileMenu(
//		switchWidth: 768,                   //width (in px to switch at)
		
		);
});

//$(document).ready(function(){
//$("img.grey").hover(
//function() {
//$(this).stop().animate({"opacity": "0"}, "fast");
//},
//function() {
//$(this).stop().animate({"opacity": "1"}, "fast");
//});
//});

//$('.thumb a').bind('mouseover', function(){
//    $(this).parent('li').css({position:'relative'});
//    var img = $(this).children('img');
//    $('<a />').text(' ').css({
//        'height': img.height(),
//        'width': img.width(),
//        'background-color': '#fe57a1',
//        'position': 'absolute',
//        'top': 0,
//        'left': 0,
//        'opacity': 0.0
//    }).bind('mouseout', function(){
//        $(this).fadeOut('fast', function(){
//            $(this).remove();
//        });
//    }).insertAfter(this).animate({
//        'opacity': 0.5
//    }, 'fast');
//});

//$(window).load(function() {
//	$('.ex2').hoverizr({speedOut: 'fast', stretch: "no", width:"responsive"});
//});

//$('.thumb').fadeIn('slow', function() {
       // Animation complete
//     });
//
//
//$(window).load(function() {
//	$('.gray').hoverizr({speedIn:"slow", speedOut:"fast", width:"responsive"});
//	});
