 $(document).ready(function(){
 				
		$("ul#portfolio li.1").siblings().hide();
		
       
        
       	
       	$('#thumbs p').hover(function(){
            if(!$(this).hasClass('active')){
				$(this).stop().animate({opacity:1});
				}
            },
            function(){
            if(!$(this).hasClass('active')){
            $(this).stop().animate({opacity:0.5});}


       	});
       	
       	$('#thumbs p').click(function(){//what happens on click
       		$(this).stop(true).addClass('active');
       		$(this).siblings().removeClass('active').removeAttr('style');
       		
       		
       	});
       		
         $('#thumbs p').click(function(e){

        var  image = $(e.target).attr('title');

        $("ul#portfolio li."+image).siblings().stop().fadeOut();
		$("ul#portfolio li."+image).fadeIn();
		

        	 
    });
	
		
	$("#jform").attr("action",'jsForm.php');
		 
	 
		 
	//clearform
	$('form').clearForm();
	$('input#url').val('http://');
	
	
	// submit
	$('#jform').bind('submit', function() {
            var url=$('input#url').val();
            if (url == 'http://'){$('input#url').val('');}
		$(this).ajaxSubmit({
			target: '#response', 
			success: function() { 
			$('#response').fadeIn('1500');
			} 
		});
		return false; // <-- important!
	});

(function($){$.fn.filestyle=function(options){var settings={width:250};if(options){$.extend(settings,options);};return this.each(function(){var self=this;var wrapper=$("<div>").css({"width":settings.imagewidth+"px","margin-left":"10px","height":settings.imageheight+"px","background":"url("+settings.image+") 0 0 no-repeat","background-position":"right","display":"inline","position":"absolute","overflow":"hidden"});var filename=$('<input class="file">').addClass($(self).attr("class")).css({"display":"inline","width":settings.width+"px"});$(self).before(filename);$(self).wrap(wrapper);$(self).css({"position":"relative","height":settings.imageheight+"px","width":settings.width+"px","display":"inline","cursor":"pointer","opacity":"0.0"});if($.browser.mozilla){if(/Win/.test(navigator.platform)){$(self).css("margin-left","-142px");}else{$(self).css("margin-left","-168px");};}else{$(self).css("margin-left",settings.imagewidth-settings.width+"px");};$(self).bind("change",function(){filename.val($(self).val());});});};})(jQuery);
 $("input[type=file]").filestyle({
     image: "./css/images/file-input.jpg",
     imageheight : 34,
     imagewidth : 100,
     width : 190
 });
 });

