$(document).ready(function(){

$.urlParam = function(name, url){
    var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(url);
    if (!results) { return 0; }
    return results[1] || 0;
  }; 

if(String(window.location).indexOf('&page=')!=-1)
{
	var location = String(window.location);
	$.colorbox({iframe:$.urlParam('iframe', location), innerHeight:$.urlParam('height', location), innerWidth:$.urlParam('width', location), href:$.urlParam('page', location), scrolling:false});
}	

 Cufon.replace(".ArialRoundedMTBoldHadow", { fontFamily: 'Arial Rounded MT Bold', textShadow: '2px 2px #333'});
 Cufon.replace(".ArialRoundedMTBold", { fontFamily: 'Arial Rounded MT Bold'});
$("a#flashdemo").colorbox({iframe:true, innerWidth:'927px', innerHeight:'720px',opacity:'0.90'});
$("a[rel='screenshots'], a.screenshot").colorbox({opacity:'0.90', current:""}); 
//$(".download_overlay, .download_link").colorbox({iframe:true, innerWidth:'500px', innerHeight:'660px', opacity:'0.90', scrolling:false, title:false}); 
$(".download_overlay, .download_link").colorbox({iframe:true, innerWidth:'526px', innerHeight:'418px', opacity:'0.90', scrolling:false, title:true});
$('.contactoverlay').colorbox({iframe:true, innerWidth:'550px', innerHeight:'460px', scrolling:false, title:false })
$(".discount_request").colorbox({innerWidth:function(){return $.urlParam('width', $(this).attr('href'));},
							innerHeight:function(){return $.urlParam('height', $(this).attr('href'));},
							iframe:true, scrolling:false});	
$(".youtube").colorbox({innerWidth:function(){return ( $.urlParam('width', $(this).attr('href')) == 0) ? 640 : $.urlParam('width', $(this).attr('href'));},
							innerHeight:function(){return ($.urlParam('height', $(this).attr('href')) == 0 ) ? 390 : $.urlParam('height', $(this).attr('href'));},
							iframe:true, scrolling:false, current:""});	
$('.screen_hover').hover(function(){$(this).parent('.featuresImage').animate({'opacity':'1'}, 200)}, function(){$(this).parent('.featuresImage').animate({'opacity':'0.6'}, 100)});

$('.show_all').bind('click', function(){$($(this).attr('href')).css('display','inline'); $(this).remove(); return false});

$(".file_type_request").colorbox({innerWidth:function(){return $.urlParam('width', $(this).attr('href'));},
										innerHeight:function(){return $.urlParam('height', $(this).attr('href'));},
										iframe:true, scrolling:false});	
});










