/**
 * @author Jeff common calls for jQuery $document ready
 *
 * Developed by topdown Webmasters United.org / Valid Webs.com
 *
 * Images and code with-in these custom files are (c) copy right protected and are NOT GLP
 *  (c) Webmasters United.org / Valid Webs.com Web Development, 2009 
 *
 * If you are considering pirating this theme, there is nothing I can do to stop you at this point.
 * However, I ask that you please consider that I am just a person trying to make some money 
 * doing what I love, designing themes. I am very flattered that my theme is popular enough to pirate,
 * but I would greatly appreciate it if you would not re-distribute my theme.
 * Thank You,
 *    topdown Webmasters United.org / Valid Webs.com
 *
*/

$(document).ready(function(){

	//Clickable rows, forums and topics						   
	$("dt.click").click(function() {
    	window.location = $(this).find("a").attr("href");
		return false;
	});
	
	//new window method for external links
	$('a.external').click(function(){
		window.open(this.href);
	return false;
	});

     //alert("Document Ready Test :P");
	 
	$(".btn-slide").click(function(){
		$("#panel").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});
	
	$(".btn-slide2").click(function(){
		$("#ucp").slideToggle("slow");
		$(this).toggleClass("active2"); return false;
	});
	
	$('#ucp').corner("round bottom 15px");
	
	$('.slide2').corner("round bottom 10px");
	
	$('.forabg').corner("round 10px");
	$('.panel').corner("round 10px");
	$('.navbar').corner("round 10px");
	//$('.forabg').corner("round 10px");
	
	$("h2").append('<em></em>')

	$(".thumbs a").click(function(){
	
		var largePath = $(this).attr("href");
		var largeAlt = $(this).attr("title");
		
		$("#largeImg").attr({ src: largePath, alt: largeAlt });
		
		$("h2 em").html(" (" + largeAlt + ")"); return false;
	});



	$(".menu2 a").append("<em></em>");
	
	$(".menu2 a").hover(function() {
		$(this).find("em").animate({opacity: "show", top: "-75"}, "slow");
		var hoverText = $(this).attr("title");
	    $(this).find("em").text(hoverText);
	}, function() {
		$(this).find("em").animate({opacity: "hide", top: "-85"}, "fast");
	});
	
	
	//Lightbox minimum   gallery eg. rel="prettyPhoto[gallery]"
	//$("a[rel^='prettyPhoto']").prettyPhoto();

	$("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'fast', /* fast/slow/normal */
		padding: 40, /* padding for each side of the picture */
		opacity: 0.8, /* Value betwee 0 and 1 */
		showTitle: true, /* true/false */
		allowresize: true, /* true/false */
		counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
		callback: function(){}
	});	


});

