﻿
$(document).ready(function() {
    //	$("div.carousel").each(function() {
    //	    
    //	    $("div.carousel").carousel({
    //	        
    //	        pagination: true,
    //	        autoSlideInterval: 5000,
    //	        loop: true,
    //	        autoSlide: true,
    //	        nextBtn: "",
    //	        prevBtn: "",
    //	        stopSlideBtn: true,
    //	        effect: "no"
    //	    });
    //	    
    //		$("div.carousel").css("display", "block");
    //		$("div.carousel").focus(function() { $(this).blur(); });
    //		// get max height of body
    //		var maxH = 0;
    //		// two lines height
    //		var def = 66




    //	});
    $("div.photowall").each(function() {
        // dont need titles
        //$("div.photowall h3").remove();
        // pck up all images and wrap them in anchor tags for fancy box
//        $("div.photowall .image img").each(function() {
//            var src = $(this).attr("src");
//            var msrc = src.substring(0, src.indexOf("?"));
//            var caption = $(this).attr("title");
//            var al = $("<a rel='gallery' href='" + msrc + "' title='" + caption + "'><img src='" + src + "'/></a>");
//            $(this).parent().append(al);
//            $(this).remove();
//            $(this).parent().append(al);
//        });
        //$("div.photowall").css("display", "block");
        		
//        		var car = $("div.photowall").carousel({
//        		    
//        		    showEmptyItems: false,
//        		    /*autoSlideInterval: 5000,*/
//        		    btnsPosition: "outside",
//        		    loop: true,
//        		    autoSlide: false,
//        		    nextBtn: "<img style='cursor: pointer' src='/global/img/photowall-right.gif' />",
//        		    prevBtn: "<img style='cursor: pointer' src='/global/img/photowall-left.gif' />",
//        		    stopSlideBtn: true
//        		});
        		
        		$("div.photowall").focus(function() { $(this).blur(); });
        // fancybox
        		$("div.photowall .image a[rel=photowall]").fancybox({
            'overlayShow': true,
            'transitionIn': 'elastic',
            'transitionOut': 'elastic',
            'onClosed': function() {
                //car.trigger("fclick");
            },
            'onStart': function() {
                //car.trigger("fclick");
            }
        });
    });
});
