include("jcarousel.js");
include("fancybox.js");

function consShow() {
    $("#b_overlay").show();
    $("#cons").show();
}

function consHide() {
    $("#b_overlay").hide();
    $("#cons").hide();
}

$(document).ready(function() {

	$(".fancy1").fancybox(
		{
			'easingIn':'swing',
			'easingOut':'swing',
			'speedIn':150,
			'speedOut':200,
			'showNavArrows':false,
			'padding':0,
	        'titleShow':false,
			'titlePosition':'over',
			'margin':0,
			'overlayShow':true,
			'overlayOpacity':0.5,
			'autoScale':true
		}
	);
    $(".searchbar_toggle").click(function () {
		$(".searchbar").toggleClass("closed");
		$(this).toggleClass("chs");
	});

    $(".b_ask").click(function () {
        $('.cap').html($(this).parent('div.cons_left').parent('div.cons_item').find('.doc_name').html());
        $('.desc').html($(this).parent('div.cons_left').parent('div.cons_item').find('.doc_resume').html());
        $('#doctor').val($(this).parent('div.cons_left').parent('div.cons_item').find('.doc_name').html());
        consShow();
	});

    $("#b_overlay").click(function () {
        consHide();
	});
    
    $("#cons .close").click(function () {
        consHide();
	});    

    /*$(".curr1").click(function () {
		$(this).find("span").toggleClass("closed");
		$(".city_list_wrap").toggle();
	});*/
});
