/// <reference path="../Scripts/jquery-1.4.1-vsdoc.js" />

$(document).ready(function () {

    $('#nav li').hover(
		function () {
		    //show its submenu
		    $('ul', this).slideDown(100);
		    if ($(this).attr("class") != "navat")
		        $(this).addClass("navover");
		},
		function () {
		    //hide its submenu
		    $('ul', this).slideUp(100);
		    if ($(this).attr("class") != "navat")
		        $(this).removeClass("navover");
		}
	);
    var photoARel = "";
    $("a[name='photoA']").each(function () {
        if (photoARel != $(this).attr("rel")) {
            //            alert($(this).attr("rel"));
            photoARel = $(this).attr("rel");
            PhotoView(photoARel);
            //            $("a[rel='" + photoARel + "']").bind("colorbox", { transition: "none", width: "80%", height: "80%" }, function () {
            //                event.preventDefault();
            //            });
        }
    });
    /*	$('#nav li').mouseover(function(){
    $('#nav li').each(function(){
    $(this).removeClass("navover");
    });
    $(this).addClass("navover");
    });*/

});

function PhotoView(group) {
    $("a[rel='" + group + "']").colorbox({ transition: "none", width: "80%", height: "80%" });
}

