
// JavaScript Document

jQuery.noConflict();
hs.showCredits = false;

hs.graphicsDir = 'highslide/graphics/';
hs.outlineType = null;
hs.skin.contentWrapper =
'<div class="highslide-body"></div>';

function showMediumProfile(obj, id)
{   
    hs.skin.contentWrapper =
    '<div id="m_h_body" class="highslide-body2" style="border:0px solid pink; margin-left:37px; margin-top:70px;"></div>';    
    jQuery.ajax({
            type: "POST",
            url: obj.href,
//            data: 'name=' + jQuery(this).attr('rel'),
            dataType: "html",

            success: function(data){                          
                jQuery("#m_highslide_maincontent_" + id).html(data);
                hs.htmlExpand(obj);
                jQuery("#m_highslide_maincontent_" + id).html("");
                //Scroller.init(id, 270);
				//jQuery(document).ready(function() {
				//	jQuery("div.highslide-body2").corner("round");
				//});
            },
            error: function(){
                alert('Error');
            }
        });
    return false;
}

function showPopBox(obj, oid)
{    
    hs.close();    
    hs.skin.contentWrapper = '<div class="highslide-body"></div>';   
    jQuery.ajax({
        type: "POST",
        url: obj.href + '&template=profile_shadowbox',
        dataType: "html",

        success: function(data){  
            jQuery("#highslide_maincontent_" + oid).html(data);			
			hs.htmlExpand(obj, {width: 490, height: 700});			
			hs.fullExpandPosition = 'bottom left';
            jQuery("#highslide_maincontent_" + oid).html("");            
            Scroller.init(oid, 270);
        },
        error: function(){
            alert('Error');
        }
    });
    return false;
}
function showQueryBox(obj, id)
{
		//alert('manny');
    hs.close();  
	//alert("a");
	//hs.skin.contentWrapper = '<div class="highslide-body"></div>';   
    jQuery.ajax({
        type: "POST",
        url: obj.href + '&template=profile_shadowbox',
        data: 'name=' + jQuery(this).attr('rel'),
        dataType: "html",

        success: function(data){
            jQuery("#q_profile_comment_" + id).html(data);
            hs.htmlExpand(obj, {width: 490});
            jQuery("#q_profile_comment_" + id).html("");
            Scroller.init(id + "_0", 230);
        },
        error: function(){
            alert('Error');
        }
    });              
    return false;
}

function onSubmitQuery(url, id)
{
    jQuery.ajax({
        type: "POST",
        //url: url + "/index.php?option=com_profile&view=fullprofile",
        url: url,
        data: jQuery('#commentform').serialize() + "&getlistajax=1", 
        dataType: "html",

        success: function(data){
            jQuery('#comments').val("");
            alert("Query submit successfully.");                
            jQuery('#scr_content' + id + "_0").html(data);
        },
        error: function(){
            alert('Error');
        }
    });
    return false;
}
