$(function () {
$('div.boxLinkA').click(function () {
var boxLinkA = $(this).find('a');
if (boxLinkA.attr('target') == '_blank') {
window.open(boxLinkA.attr('href'));
}
else window.location = boxLinkA.attr('href');
return false;
});
$('div.boxLinkA').hover(function () {
$(this).addClass('blaHover');
}, function () {
$(this).removeClass('blaHover');
});
});


$(function () {
$('div.boxLinkB').click(function () {
var boxLinkB = $(this).find('a');
if (boxLinkB.attr('target') == '_blank') {
window.open(boxLinkB.attr('href'));
}
else window.location = boxLinkB.attr('href');
return false;
});
$('div.boxLinkB').hover(function () {
$(this).addClass('blbHover');
}, function () {
$(this).removeClass('blbHover');
});
});


$(function () {
$('span.txtLink').click(function () {
var txtLink = $(this).find('a');
if (txtLink.attr('target') == '_blank') {
window.open(txtLink.attr('href'));
}
else window.location = txtLink.attr('href');
return false;
});
$('span.txtLink').hover(function () {
$(this).addClass('tlHover');
}, function () {
$(this).removeClass('tlHover');
});
});


$(document).ready(function() {
$("a.zoom").fancybox({
'type'     : 'image',
'titlePosition'  : 'inside',
'padding'  : 10 
});
});


$(document).ready(function() {
$("a[rel=group_H000000]").fancybox({
'padding'  : 10 ,
'type'     : 'image',
'titlePosition'     : 'over',
'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
    return '<span id="fancybox-title-over">Photo ' +  (currentIndex + 1) + ' / ' + currentArray.length + '</span>';
}
});
});


var name = "#float_ptop";
var menuYloc = null;
$(document).ready(function(){
menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))
$(window).scroll(function () { 
offset = menuYloc+$(document).scrollTop()+"px";
$(name).animate({top:offset},{duration:500,queue:false});
});
}); 


$(function(){
$("a[href^=#]").click(function(){
var Hash = $(this.hash);
var HashOffset = $(Hash).offset().top;
$("html,body").animate({
scrollTop: HashOffset
}, 500);
return false;
});
});



