// CONTACT FORM
$(document).ready(function() { 
var options = { 
target:        '#alert',
beforeSubmit:  showRequest,
success:       showResponse
}; 
$('#contactform').ajaxForm(options); 
}); 
function showRequest(formData, jqForm, options) { 
var queryString = $.param(formData); 
return true; 
} 
function showResponse(responseText, statusText)  {  
} 
$.fn.clearForm = function() {
  return this.each(function() {
	var type = this.type, tag = this.tagName.toLowerCase();
	if (tag == 'form')
	  return $(':input',this).clearForm();
	if (type == 'text' || type == 'password' || tag == 'textarea')
	  this.value = '';
	else if (type == 'checkbox' || type == 'radio')
	  this.checked = false;
	else if (tag == 'select')
	  this.selectedIndex = -1;
  });
};


// SHADOWBOX
	$(document).ready(function(){
    var options = {
        resizeLgImages:     true,
        counterType:		'skip',
        continuous: 		true,
        keysClose:          ['c', 27] 
             };
   Shadowbox.init(options);
	});
	
	
// POPUP
	$(document).ready( function() {
    
    $('a[rel="external"]').click( function() {
        window.open( $(this).attr('href'),this,'width=650,height=640' );
        return false;
    });
    
});


	

