
getTwitters('twitter', { 
  id: '48532813',
  count: 5,
  enableLinks: true, 
  ignoreReplies: false, 
  clearContents: true,
  prefix: '"%name%" sais',
  template: '<hr><img src="%user_profile_image_url%" class="usrimg"><div style="margin-left: 32px"><a href="http://twitter.com/%user_screen_name%" title="%user_description%">%user_name%</a>: %text%</div>',
  timeout: 10,
  onTimeout: function() {
	  $(this).html('<img src="images/excl.png" style="float: left; margin-top: 3px; padding-right: 5px;"><p>Cannot load twitter at this time,<br>please check your connection.</p>');
  }
});

$(function(){
		   
	$('.frontpglogo').cycle({ 
		fx:     'fade'
	});
	
	$(".fancy").facebox();
	
	$(".imgs a").facebox();
	
	$(".graphicproj a, .frontpage").facebox();
	
	  
	$("#dropdown").toggle(
	function() {
		$(this).removeClass("dropdown").addClass("dropup").text("Hide Menu");
		$('#more').show().removeAttr("filter");
		$('.middle').slideDown(function() {
			$('.middle table:first').animate({opacity: "1"}, 200).removeAttr("filter");$('.imgs img').removeAttr("filter");
		});
	},function() {
		$(this).addClass("dropdown").removeClass("dropup").text("Show Menu");
		$('#more').hide();
		$('.middle table:first').animate({opacity: "0"}, 200, function(){$('.middle').slideUp();});
	});
  
	$("#more").toggle(
	function() {
		$('.middle').animate({height: "286px"}, 500,"easeOutCubic", function(){
				$(".middlebot").show().animate({opacity: "1"},200).removeAttr("filter");});
		$(this).removeClass("more").addClass("less").text("Less");
	}, function() {
		$(".middlebot").animate({opacity:"0"}, 200, function(){
			$('.middle').animate({height: "142px"}, 500,"easeOutCubic");
			$('.middlebot').hide();
		});
		$(this).addClass("more").removeClass("less").text("More");
	});
	
	$('.round').add_layer("url('images/borders/tl.png') top left no-repeat");
	$('.round').add_layer("url('images/borders/tr.png') top right no-repeat");
	$('.round').add_layer("url('images/borders/br.png') bottom right no-repeat");
	$('.round').add_layer("url('images/borders/bl.png') bottom left no-repeat",
						  {
							insideCss : {'padding':'10px'}
						  });
	
	$('.graphicround').add_layer("url('images/borders/tl.png') top left no-repeat");
	$('.graphicround').add_layer("url('images/borders/tr.png') top right no-repeat");
	$('.graphicround').add_layer("url('images/borders/br.png') bottom right no-repeat");
	$('.graphicround').add_layer("url('images/borders/bl.png') bottom left no-repeat");
   
	$("a[href$='.pdf']").addClass("pdf");
	$("a[href$='.doc'], a[href$='.txt'], a[href$='.rft']").addClass("txt");
	$("a[href$='.zip'], a[href$='.rar']").addClass("zip"); 
	
	
	$('.drag').draggable({ opacity: '0.85', cursor: 'default', stack: { group: '.drag', min: 31 } });
	$('#slidercont, .nav').disableSelection()
	$('.sortable').sortable({revert: true});
  
	$(".googleopen").toggle(
	function() {$('#google').fadeIn();$(this).css({background:'#e4e4e4'});},
	function() {$('#google').fadeOut();$(this).css({background:'none'});}
	);
  
	$("#slider").draggable({ axis: 'x', containment: '#slidercont', scroll: false, cursor: 'url(images/hand.png), pointer' });
	$("#none").droppable({
			accept: "#slider",
			drop: function(event, ui) {
				$('.wack').fadeOut('2000');
			}
	});
	
	$("#med").droppable({
			accept: "#slider",
			drop: function(event, ui) {
				$('.med').fadeIn('2000').removeAttr("filter");
				$('.fulldisp').fadeOut('2000');
			}
	});
	$("#fulldisp").droppable({
			accept: "#slider",
			drop: function(event, ui) {
				$('.med').fadeIn('2000').removeAttr("filter");
				$('.fulldisp').fadeIn('2000');
			}
	});  
	
	$('#slider').css({opacity: "0"}, 0).animate({opacity: "1"}, 300).animate({left: '123px'}, 500);
	
	$('#slidercont').fadeIn();
	
	$("#page, .bottom, #shadow, #slidercont, .middle, .wack").removeAttr("filter");
	
	$('#bottomdiv img, .follow img, .bt').bt({
	strokeWidth: '1',
	strokeStyle: 'rgba(0, 0, 0, .7)',
	spikeLength: 6, 
	spikeGirth: 8,  
	cornerRadius: 2,
	fill: 'rgba(0, 0, 0, .73)',
	width: 'inherit',
	positions: 'top',
	cssStyles: {
	fontFamily: '"lucida grande",tahoma,verdana,arial,sans-serif', 
	fontSize: '11px',
	padding: '3px 8px'
	}
	});
	
	$('.slideroptions').bt({
	fill: '#000',
	strokeWidth: '1',
	strokeStyle: '#333',
	spikeLength: 6, 
	spikeGirth: 8,  
	cornerRadius: 4,
	fill: 'rgba(0, 0, 0, .8)',
	positions: 'top',
	cssStyles: {
	fontFamily: '"lucida grande",tahoma,verdana,arial,sans-serif', 
	fontSize: '11px',
	padding: '4px 8px'
	}
	});
	
	$('#vidchat').draggable({handle: '.handle'});
	
	$(".exitchat").click(function() {
	$('#vidchat').hide();
	});
	
	$(".vidchat").click(function() {
	$('#vidchat').show();
	});
	
	$('#title').hover(
	function(){ 
		$(this).animate({backgroundPosition:"(0 -250px)"},200);
	},function(){
		$(this).animate({backgroundPosition:"(0 -250px)"},200);  
	});
	
	$(".submitsearch").attr("disabled", "disabled");
	
	swapValues = [];
	$(".searchbox").each(function(i){
		swapValues[i] = $(this).val();
		$(this).focus(function(){
			if ($(this).val() == swapValues[i]) {
				$(this).css({"color":"#000","borderColor":"#000","background":"#fff"}).val("");
				$(".submitsearch").removeAttr("disabled");
			}
		}).blur(function(){
			if ($.trim($(this).val()) == "") {
				$(this).css({"color":"#999","borderColor":"#333","background":"#ddd"}).val(swapValues[i]);
				$(".submitsearch").attr("disabled", "disabled");
			}
		});
	});
	
	swapcont = [];
	$(".getintact input[type='text'], .getintact textarea").each(function(i){
        swapcont[i] = $(this).val();
        $(this).focus(function(){
            if ($(this).val() == swapcont[i]) {
                $(this).val("");
            }
        }).blur(function(){
            if ($.trim($(this).val()) == "") {
                $(this).val(swapcont[i]);
            }
        });
    });
	
	
		
  
    $(".submitsearch").click(function() {	
	var val = $(".searchbox").val();
		if (val!="" && val!="Click Here To Search") {
			$(".results").fadeIn();
		}
    });
  
	$("#searchback").click(function() {
	$(".results").fadeOut();
	});
	
	
	$(".getintact input[type='text'], .stuff, #shoutbox").wrap("<div class='inputwrap'></div>");
	
	$('.hidefade').click(function() {
	$('.fadegal').hide();
	$('.showfade').show();
	});
	
	$('.showfade').click(function() {
	$('.fadegal').show();
	$('.showfade').hide();
	});
	
	$(".follow a").attr('target','_blank');
	
	$('.nighttheme').click(function(){
	$('.overlay').show().animate({opacity: '0.9'},function(){
		$('.nighttheme').css({background:"url(images/night_sel.png)"});
		$('.daytheme').css({background:"url(images/day_alt.png)"});
		$('body').css({background: "#555 url(images/bg_n.png) repeat-x"});
		$('.bottom').css({color:"#999", textShadow:"0px -1px 0px #444"});
		$('.stuff, .getintact input[type="text"], .getintact textarea').css({background: "#606060", borderColor:"#696969"});
		$('.inputwrap, .textareaspan').css({borderColor:"#494949"});
		$('.bottom h3').css({color:"#aaa", textShadow:"0px -1px 0px #444"});
		$('.getintact h1').css({color:"#444", textShadow:"0px 1px 0px #666"});
		$('.fadebottom').css({background:"url(images/fadedark.png)"});
		$('hr').css({borderTop: "1px dashed #404040", borderBottom: "1px dashed #aaa"});
		$('.getintact input[type="submit"]').css({color: "#444"});
		$('.left, .right').css({backgroundColor: "#f0f0f0"});
		$('#leftwack').css({background:"url(images/left_n.png) no-repeat"});
		$('#rightwack').css({background:"url(images/rightwack_n.png) no-repeat"});
		$('#arcadefull').css({background:"url(images/arcadefull_n.png) no-repeat"});
		$('#leftfull').css({background:"url(images/left2_n.png) no-repeat"});
		$('#title').css({background: "url(images/logo_n.png) no-repeat"});
	}).animate({opacity: '0.9'}, 200).animate({opacity: '0'}, function(){$('.overlay').hide();});
	});
	
	$('.daytheme').click(function(){
	$('.overlay').show().animate({opacity: '0.9'},function(){
		$('.daytheme').css({background:"url(images/day_sel.png)"});
		$('.nighttheme').css({background:"url(images/night.png)"});
		$('body').css({background: "#666 url(images/bg.png) repeat-x"});
		$('.bottom').css({color:"#bbb", textShadow:"0px -1px 0px #505050"});
		$('.stuff, .getintact input[type="text"], .getintact textarea').css({background: "#707070", borderColor:"#797979"});
		$('.inputwrap, .textareaspan').css({borderColor:"#595959"});
		$('.bottom h3').css({color:"#ddd", textShadow:"0px -1px 0px #555"});
		$('.getintact h1').css({color:"#555", textShadow:"0px 1px 0px #777"});
		$('.fadebottom').css({background:"url(images/fadebottom.png)"});
		$('hr').css({borderTop: "1px dashed #525252", borderBottom: "1px dashed #bbb"});
		$('.getintact input[type="submit"]').css({color: "#555"});
		$('.left, .right').css({backgroundColor: "#f6f6f6"});
		$('#leftwack').css({background:"url(images/left.png) no-repeat"});
		$('#rightwack').css({background:"url(images/rightwack.png) no-repeat"});
		$('#arcadefull').css({background:"url(images/arcadefull.png) no-repeat"});
		$('#leftfull').css({background:"url(images/left2.png) no-repeat"});
		$('#title').css({background: "url(images/logo.png) no-repeat"});
	}).animate({opacity: '0.9'}, 200).animate({opacity: '0'}, function(){$('.overlay').hide();});
	});
	
	$('.below').click(function(){
	$('html,body').animate({scrollTop: '650px'},1500, 'easeInOutCubic');
	});
	
	$('.scrolltotop').click(function(){
	$('html,body').animate({scrollTop: '0px'},1500, 'easeInOutCubic');
	});

});
