

$(document).ready(function(){

	 $("img.overImg").fadeTo(.5, .5);
	  $("img.overImg").hover(
		function () {
		  $(this).fadeTo("fast", 1);
		},
		function () {
		  $(this).fadeTo("normal", .5);
		}
	  );


// round corners

			$('.round_this').corner({
			  tl: { radius: 10 },
			  tr: { radius: 10 },
			  bl: { radius: 0 },
			  br: { radius: 0 },autoPad: false});
			
   $('.round_this2').corner({
			  tl: { radius: 10 },
			  tr: { radius: 10 },
			  bl: { radius: 10 },
			  br: { radius: 10 },autoPad: false});
			
	  
	  	$("div.card_fullDetails").addClass("hide");
	$("div.priv_fullDetails").addClass("hide");
    $("p.show_details").click(function() {
	        var img = $(this).find("img"); //get a handle of the image tag inside title link
	        var src = $(img).attr("src"); //get the source of the image	 
	        //toggle the source of the image to show either plus/minus
	        if (src.endsWith("plus.jpg"))
	          {  src = src.replace('plus.jpg', 'minus.jpg');
				//add printability
			/*var parent_div = $(this).parents('div.priv_group'); 
			$(parent_div).attr("id", "divToPrint");*/
			
			  }
	        else{
	            src = src.replace('minus.jpg', 'plus.jpg');
				/*var parent_div = $(this).parents('div.priv_group'); 
			$(parent_div).attr("id", "");*/
			}
	        $(img).attr("src", src);
	 
	        //get the title of the anchor tag which corresponds to the id of the content div
	        var content = $(this).attr("title");
	        //toggle the display of the content div
	        $('#'+content).slideToggle();
			
			
			
			
			
	    });
	
	 



$('#nav li')
	.css( { marginTop: "0px"} )
	.mouseover(function(){
		$(this).stop().animate(
			{ marginTop: "-3px"}, 
			{duration:300})
		})
	.mouseout(function(){
		$(this).stop().animate(
			{ marginTop: "0px"}, 
			{duration:300})
		});
	
	


$(function()
	{
		$('.scroll-pane').jScrollPane({scrollbarWidth:10, scrollbarMargin:10, reinitialiseOnImageLoad:true});
	});
	
 });

	String.prototype.endsWith = function(str) {
	    return this.lastIndexOf(str) == this.length - str.length;
	}
//Jquery popupWindow

var profiles =
{

	window800:
	{
		height:800,
		width:800,
		status:1
	},

	window200:
	{
		height:200,
		width:200,
		status:1,
		resizable:0
	},

	windowCenter:
	{
		height:300,
		width:400,
		center:1
	},

	windowNotNew:
	{
		height:300,
		width:400,
		center:1,
		createnew:0
	},

	windowCallUnload:
	{
		height:300,
		width:400,
		center:1,
		onUnload:unloadcallback
	}

};

function unloadcallback(){
	alert("unloaded");
};


$(function()
{
  		$(".popupwindow").popupwindow(profiles);
});


//Lightbox
  $(function() {
        $('.order_thumb a').lightBox();
    });
